From 9d60993615765516c71b89c9a94cb6b0a375febe Mon Sep 17 00:00:00 2001 From: Luan Santos Date: Sat, 9 Dec 2023 11:06:46 -0800 Subject: [PATCH 01/28] feat: opentelemetry metrics (#1966) # Canary Metrics (OpenTelemetry) By default, no metrics are collected or exported. To enable metrics, you must setup a metrics exporter. The following example shows how to setup a Prometheus exporter. config.lua ```lua metricsEnablePrometheus = true metricsPrometheusAddress = "0.0.0.0:9464" ``` This, in and of itself will expose a Prometheus endpoint at `http://localhost:9464/metrics`. However, you will need to configure Prometheus to scrape this endpoint. The easiest, batteries included way, to do this is using the provided `docker-compose.yml` file provided in this `metrics` directory. Simply run `docker-compose up` and you will have a Prometheus instance running and scraping the Canary metrics endpoint. The `docker-compose.yml` file also includes a Grafana instance that is preconfigured to use the Prometheus instance as a data source. The Grafana instance is exposed at `http://localhost:3000` and the default username and password are `admin` and `admin` respectively (you will be prompted to change the password on first login). ## Usage This is an **advanced** feature. While you can simply enable OStream and get metrics in your logs, that is not recommended to do in production. Prometheus can be run efficiently in production with minimal impact to server performance. _Enabling OStream:_ ```config.lua metricsEnableOstream = true metricsOstreamInterval = 1000 ``` If you **don't** how what Prometheus and Grafana are, you need to learn that first: https://prometheus.io/ is your starting point. You can come back to this feature once you've understood how to install and run this software. ## Metrics We export all kinds of metrics, but the most important ones are: Here's an interactive demo of a dashboard from a real production server: https://snapshots.raintank.io/dashboard/snapshot/bpiq45inK3I2Xixa2d7oNHWekdiDE6zr - Latency metrics for C++ methods - Latency metrics for Lua functions - Latency metrics for SQL queries - Latency metrics for Dispatcher tasks - Latency metrics for DB Lock contention **Screenshot** ![grafana](https://github.com/opentibiabr/canary/assets/223760/b307c335-9af9-4c1a-bf7e-5c3dc86a016d) ## Analytics We also export analytic event, counters and other useful data. This is useful for debugging and understanding the behavior of the server. Some interesting ones are: - Stats around monsters killed (per monster type, player, etc) - Stats around raw exp and total exp gained - Stats around wealth gained (based on gold and item drops, with their NPC value) ### Examples: _Note: you can normally see player names here, I've hidden those for privacy._ **Raw exp/h** ![exp-per-hour](https://github.com/opentibiabr/canary/assets/223760/3a873aca-f2e4-4d19-8e61-ed20c176a30f) **Raw gold/h** ![gold-per-hour](https://github.com/opentibiabr/canary/assets/223760/1c0d1e99-c4b9-4d9a-aced-75ac376b4673) **Monsters killed/h** ![monsters-per-hour](https://github.com/opentibiabr/canary/assets/223760/4d8c9e19-d579-4405-a018-fc69c79a11c2) --- cmake/modules/BaseConfig.cmake | 2 + cmake/modules/CanaryLib.cmake | 8 + config.lua.dist | 9 + docker/Dockerfile.arm | 1 + docker/Dockerfile.dev | 1 + docker/Dockerfile.x86 | 1 + metrics/README.md | 65 +++ metrics/docker-compose.yml | 43 ++ metrics/prometheus/prometheus.yml | 9 + src/account/account.cpp | 3 +- src/account/account.hpp | 3 +- src/account/account_repository_db.cpp | 2 +- src/canary_server.cpp | 11 + src/config/config_definitions.hpp | 466 +++++++++--------- src/config/configmanager.cpp | 6 + src/creatures/combat/combat.cpp | 7 +- src/creatures/creature.cpp | 66 ++- src/creatures/npcs/npc.cpp | 3 + src/creatures/npcs/npcs.cpp | 4 +- src/creatures/players/player.cpp | 38 ++ src/database/database.cpp | 12 +- src/game/bank/bank.cpp | 10 +- src/game/functions/game_reload.cpp | 1 + src/game/game.cpp | 48 +- src/game/game.hpp | 2 +- src/game/scheduling/task.cpp | 4 +- src/game/scheduling/task.hpp | 2 +- src/game/zones/zone.cpp | 4 +- src/io/functions/iologindata_save_player.cpp | 1 + src/io/io_wheel.cpp | 4 +- src/io/iobestiary.cpp | 2 + src/io/iologindata.cpp | 3 + src/io/ioprey.cpp | 6 + src/lib/CMakeLists.txt | 1 + src/lib/metrics/metrics.cpp | 105 ++++ src/lib/metrics/metrics.hpp | 171 +++++++ src/lua/functions/core/CMakeLists.txt | 1 + .../functions/core/game/game_functions.cpp | 20 +- .../core/libs/core_libs_functions.hpp | 2 + .../functions/core/libs/metrics_functions.cpp | 40 ++ .../functions/core/libs/metrics_functions.hpp | 21 + .../creatures/player/player_functions.cpp | 1 + src/lua/scripts/luascript.cpp | 30 ++ src/lua/scripts/luascript.hpp | 2 + src/map/house/house.cpp | 2 + src/server/server.hpp | 1 + vcpkg.json | 25 +- vcproj/canary.vcxproj | 10 +- vcproj/settings.props | 18 + 49 files changed, 1026 insertions(+), 271 deletions(-) create mode 100644 metrics/README.md create mode 100644 metrics/docker-compose.yml create mode 100644 metrics/prometheus/prometheus.yml create mode 100644 src/lib/metrics/metrics.cpp create mode 100644 src/lib/metrics/metrics.hpp create mode 100644 src/lua/functions/core/libs/metrics_functions.cpp create mode 100644 src/lua/functions/core/libs/metrics_functions.hpp diff --git a/cmake/modules/BaseConfig.cmake b/cmake/modules/BaseConfig.cmake index 86b2890d11e..b79167ed6a2 100644 --- a/cmake/modules/BaseConfig.cmake +++ b/cmake/modules/BaseConfig.cmake @@ -31,6 +31,8 @@ find_package(asio CONFIG REQUIRED) find_package(eventpp CONFIG REQUIRED) find_package(jsoncpp CONFIG REQUIRED) find_package(magic_enum CONFIG REQUIRED) +find_package(opentelemetry-cpp CONFIG REQUIRED) +find_package(prometheus-cpp CONFIG REQUIRED) find_package(mio REQUIRED) find_package(pugixml CONFIG REQUIRED) find_package(spdlog REQUIRED) diff --git a/cmake/modules/CanaryLib.cmake b/cmake/modules/CanaryLib.cmake index 4b7d69d2b80..d5fdd782b1f 100644 --- a/cmake/modules/CanaryLib.cmake +++ b/cmake/modules/CanaryLib.cmake @@ -90,6 +90,14 @@ target_link_libraries(${PROJECT_NAME}_lib unofficial::argon2::libargon2 unofficial::libmariadb unofficial::mariadbclient + opentelemetry-cpp::common + opentelemetry-cpp::metrics + opentelemetry-cpp::api + opentelemetry-cpp::ext + opentelemetry-cpp::sdk + opentelemetry-cpp::logs + opentelemetry-cpp::ostream_metrics_exporter + opentelemetry-cpp::prometheus_exporter ) if(CMAKE_BUILD_TYPE MATCHES Debug) diff --git a/config.lua.dist b/config.lua.dist index efef42dc91a..57257748195 100644 --- a/config.lua.dist +++ b/config.lua.dist @@ -490,3 +490,12 @@ vipKeepHouse = false -- NOTE set rewardChestMaxCollectItems max items per collect action rewardChestCollectEnabled = true rewardChestMaxCollectItems = 200 + +-- Metrics +--- Prometheus +metricsEnablePrometheus = false +metricsPrometheusAddress = "0.0.0.0:9464" + +--- OStream +metricsEnableOstream = false +metricsOstreamInterval = 1000 diff --git a/docker/Dockerfile.arm b/docker/Dockerfile.arm index 200bed73a02..ef159ba142f 100644 --- a/docker/Dockerfile.arm +++ b/docker/Dockerfile.arm @@ -4,6 +4,7 @@ FROM ubuntu:23.04 AS dependencies RUN apt-get update && apt-get install -y --no-install-recommends cmake git \ unzip build-essential ca-certificates curl zip unzip tar \ pkg-config ninja-build autoconf automake libtool libluajit-5.1-dev libluajit-5.1-common \ + python3 \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* diff --git a/docker/Dockerfile.dev b/docker/Dockerfile.dev index 1329df0462a..161a80a2e21 100644 --- a/docker/Dockerfile.dev +++ b/docker/Dockerfile.dev @@ -5,6 +5,7 @@ RUN --mount=type=cache,target=/var/cache/apt \ apt-get update && apt-get install -y --no-install-recommends cmake git \ unzip build-essential ca-certificates curl zip unzip tar \ pkg-config ninja-build autoconf automake libtool \ + python3 \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* diff --git a/docker/Dockerfile.x86 b/docker/Dockerfile.x86 index 32653f9c09f..3b035ecfd37 100644 --- a/docker/Dockerfile.x86 +++ b/docker/Dockerfile.x86 @@ -4,6 +4,7 @@ FROM ubuntu:23.04 AS dependencies RUN apt-get update && apt-get install -y --no-install-recommends cmake git \ unzip build-essential ca-certificates curl zip unzip tar \ pkg-config ninja-build autoconf automake libtool \ + python3 \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* diff --git a/metrics/README.md b/metrics/README.md new file mode 100644 index 00000000000..551fc6d8731 --- /dev/null +++ b/metrics/README.md @@ -0,0 +1,65 @@ +# Canary Metrics (OpenTelemetry) + +By default, no metrics are collected or exported. To enable metrics, you must setup a metrics exporter. The following example shows how to setup a Prometheus exporter. + +config.lua + +```lua +metricsEnablePrometheus = true +metricsPrometheusAddress = "0.0.0.0:9464" +``` + +This, in and of itself will expose a Prometheus endpoint at `http://localhost:9464/metrics`. However, you will need to configure Prometheus to scrape this endpoint. + +The easiest, batteries included way, to do this is using the provided `docker-compose.yml` file provided in this `metrics` directory. Simply run `docker-compose up` and you will have a Prometheus instance running and scraping the Canary metrics endpoint. + +The `docker-compose.yml` file also includes a Grafana instance that is preconfigured to use the Prometheus instance as a data source. The Grafana instance is exposed at `http://localhost:3000` and the default username and password are `admin` and `admin` respectively (you will be prompted to change the password on first login). + +## Usage + +This is an **advanced** feature. While you can simply enable OStream and get metrics in your logs, that is not recommended to do in production. Prometheus can be run efficiently in production with minimal impact to server performance. + +_Enabling OStream:_ + +```config.lua +metricsEnableOstream = true +metricsOstreamInterval = 1000 +``` + +If you **don't** how what Prometheus and Grafana are, you need to learn that first: https://prometheus.io/ is your starting point. You can come back to this feature once you've understood how to install and run this software. + +## Metrics + +We export all kinds of metrics, but the most important ones are: + +Here's an interactive demo of a dashboard from a real production server: https://snapshots.raintank.io/dashboard/snapshot/bpiq45inK3I2Xixa2d7oNHWekdiDE6zr + +- Latency metrics for C++ methods +- Latency metrics for Lua functions +- Latency metrics for SQL queries +- Latency metrics for Dispatcher tasks +- Latency metrics for DB Lock contention + +**Screenshot** +![grafana](https://github.com/opentibiabr/canary/assets/223760/b307c335-9af9-4c1a-bf7e-5c3dc86a016d) + +## Analytics + +We also export analytic event, counters and other useful data. This is useful for debugging and understanding the behavior of the server. Some interesting ones are: + +- Stats around monsters killed (per monster type, player, etc) +- Stats around raw exp and total exp gained +- Stats around wealth gained (based on gold and item drops, with their NPC value) + +### Examples: + +_Note: you can normally see player names here, I've hidden those for privacy._ + +**Raw exp/h** +![exp-per-hour](https://github.com/opentibiabr/canary/assets/223760/3a873aca-f2e4-4d19-8e61-ed20c176a30f) + +**Raw gold/h** +![gold-per-hour](https://github.com/opentibiabr/canary/assets/223760/1c0d1e99-c4b9-4d9a-aced-75ac376b4673) + +**Monsters killed/h** +![monsters-per-hour](https://github.com/opentibiabr/canary/assets/223760/4d8c9e19-d579-4405-a018-fc69c79a11c2) diff --git a/metrics/docker-compose.yml b/metrics/docker-compose.yml new file mode 100644 index 00000000000..28ce37108fe --- /dev/null +++ b/metrics/docker-compose.yml @@ -0,0 +1,43 @@ +--- +version: "3" + +services: + prometheus: + image: prom/prometheus:latest + restart: unless-stopped + volumes: + - ./prometheus:/etc/prometheus + - prometheus-data:/prometheus + command: + - "--config.file=/etc/prometheus/prometheus.yml" + - "--storage.tsdb.path=/prometheus" + - "--web.enable-lifecycle" + - "--log.level=debug" + ports: + - "9090:9090" + extra_hosts: + - "host.docker.internal:host-gateway" + networks: + - monitoring-net + + grafana: + image: grafana/grafana:latest + restart: unless-stopped + volumes: + - grafana-data:/var/lib/grafana + environment: + - GF_SECURITY_ADMIN_PASSWORD=admin + - GF_USERS_ALLOW_SIGN_UP=false + depends_on: + - prometheus + ports: + - "4444:3000" + networks: + - monitoring-net + +volumes: + prometheus-data: + grafana-data: + +networks: + monitoring-net: diff --git a/metrics/prometheus/prometheus.yml b/metrics/prometheus/prometheus.yml new file mode 100644 index 00000000000..97a21bc19f2 --- /dev/null +++ b/metrics/prometheus/prometheus.yml @@ -0,0 +1,9 @@ +--- +global: + scrape_interval: 5s + scrape_timeout: 2s + evaluation_interval: 5s +scrape_configs: + - job_name: canary + static_configs: + - targets: ['host.docker.internal:9464'] diff --git a/src/account/account.cpp b/src/account/account.cpp index 881b9491406..2179482ef87 100644 --- a/src/account/account.cpp +++ b/src/account/account.cpp @@ -170,8 +170,9 @@ namespace account { } void Account::addPremiumDays(const int32_t &days) { - auto timeLeft = static_cast((m_account.premiumLastDay - getTimeNow()) % 86400); + auto timeLeft = std::max(0, static_cast((m_account.premiumLastDay - getTimeNow()) % 86400)); setPremiumDays(m_account.premiumRemainingDays + days); + m_account.premiumDaysPurchased += days; if (timeLeft > 0) { m_account.premiumLastDay += timeLeft; diff --git a/src/account/account.hpp b/src/account/account.hpp index 839b9928383..061f7dcdc31 100644 --- a/src/account/account.hpp +++ b/src/account/account.hpp @@ -13,6 +13,7 @@ #include "config/configmanager.hpp" #include "utils/definitions.hpp" #include "security/argon.hpp" +#include "utils/tools.hpp" namespace account { class Account { @@ -106,7 +107,7 @@ namespace account { void addPremiumDays(const int32_t &days); void setPremiumDays(const int32_t &days); [[nodiscard]] inline uint32_t getPremiumRemainingDays() const { - return m_account.premiumRemainingDays; + return m_account.premiumLastDay > getTimeNow() ? static_cast((m_account.premiumLastDay - getTimeNow()) / 86400) : 0; } [[nodiscard]] inline uint32_t getPremiumDaysPurchased() const { diff --git a/src/account/account_repository_db.cpp b/src/account/account_repository_db.cpp index c4a960e6244..321741bd7bb 100644 --- a/src/account/account_repository_db.cpp +++ b/src/account/account_repository_db.cpp @@ -160,11 +160,11 @@ namespace account { acc.id = result->getNumber("id"); acc.accountType = static_cast(result->getNumber("type")); - acc.premiumRemainingDays = result->getNumber("premdays"); acc.premiumLastDay = result->getNumber("lastday"); acc.sessionExpires = result->getNumber("expires"); acc.premiumDaysPurchased = result->getNumber("premdays_purchased"); acc.creationTime = result->getNumber("creation"); + acc.premiumRemainingDays = acc.premiumLastDay > getTimeNow() ? (acc.premiumLastDay - getTimeNow()) / 86400 : 0; setupLoyaltyInfo(acc); diff --git a/src/canary_server.cpp b/src/canary_server.cpp index 5b644d4ed10..25439532b8c 100644 --- a/src/canary_server.cpp +++ b/src/canary_server.cpp @@ -61,6 +61,16 @@ int CanaryServer::run() { loadConfigLua(); logger.info("Server protocol: {}.{}{}", CLIENT_VERSION_UPPER, CLIENT_VERSION_LOWER, g_configManager().getBoolean(OLD_PROTOCOL, __FUNCTION__) ? " and 10x allowed!" : ""); + metrics::Options metricsOptions; + metricsOptions.enablePrometheusExporter = g_configManager().getBoolean(METRICS_ENABLE_PROMETHEUS, __FUNCTION__); + if (metricsOptions.enablePrometheusExporter) { + metricsOptions.prometheusOptions.url = g_configManager().getString(METRICS_PROMETHEUS_ADDRESS, __FUNCTION__); + } + metricsOptions.enableOStreamExporter = g_configManager().getBoolean(METRICS_ENABLE_OSTREAM, __FUNCTION__); + if (metricsOptions.enableOStreamExporter) { + metricsOptions.ostreamOptions.export_interval_millis = std::chrono::milliseconds(g_configManager().getNumber(METRICS_OSTREAM_INTERVAL, __FUNCTION__)); + } + g_metrics().init(metricsOptions); rsa.start(); initializeDatabase(); @@ -375,4 +385,5 @@ void CanaryServer::modulesLoadHelper(bool loaded, std::string moduleName) { void CanaryServer::shutdown() { inject().shutdown(); g_dispatcher().shutdown(); + g_metrics().shutdown(); } diff --git a/src/config/config_definitions.hpp b/src/config/config_definitions.hpp index 3381e671a98..700f5bfdb0c 100644 --- a/src/config/config_definitions.hpp +++ b/src/config/config_definitions.hpp @@ -11,270 +11,274 @@ // Enum enum ConfigKey_t : uint16_t { - ALLOW_CHANGEOUTFIT, - ONE_PLAYER_ON_ACCOUNT, + ACTIONS_DELAY_INTERVAL, + ADVENTURERSBLESSING_LEVEL, AIMBOT_HOTKEY_ENABLED, - REMOVE_RUNE_CHARGES, - EXPERIENCE_FROM_PLAYERS, - FREE_PREMIUM, - REPLACE_KICK_ON_LOGIN, - BIND_ONLY_GLOBAL_ADDRESS, - OPTIMIZE_DATABASE, - MARKET_PREMIUM, - EMOTE_SPELLS, - STAMINA_SYSTEM, - WARN_UNSAFE_SCRIPTS, - CONVERT_UNSAFE_SCRIPTS, - CLASSIC_ATTACK_SPEED, - SCRIPTS_CONSOLE_LOGS, - REMOVE_WEAPON_AMMO, - REMOVE_BEGINNING_WEAPON_AMMO, - REFUND_BEGINNING_WEAPON_MANA, - REMOVE_WEAPON_CHARGES, - REMOVE_POTION_CHARGES, - GLOBAL_SERVER_SAVE_NOTIFY_MESSAGE, - GLOBAL_SERVER_SAVE_CLEAN_MAP, - GLOBAL_SERVER_SAVE_CLOSE, - GLOBAL_SERVER_SAVE_SHUTDOWN, - FORCE_MONSTERTYPE_LOAD, - HOUSE_OWNED_BY_ACCOUNT, - CLEAN_PROTECTION_ZONES, ALLOW_BLOCK_SPAWN, - HOUSE_PURSHASED_SHOW_PRICE, - ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS, - WEATHER_RAIN, - WEATHER_THUNDER, - TOGGLE_FREE_QUEST, - ONLY_PREMIUM_ACCOUNT, - TOGGLE_MAP_CUSTOM, + ALLOW_CHANGEOUTFIT, + ALLOW_RELOAD, ALL_CONSOLE_LOG, - STAMINA_TRAINER, - STAMINA_PZ, - PUSH_WHEN_ATTACKING, - SORT_LOOT_BY_CHANCE, - TOGGLE_SAVE_INTERVAL, - TOGGLE_SAVE_INTERVAL_CLEAN_MAP, - PREY_ENABLED, - PREY_FREE_THIRD_SLOT, - TASK_HUNTING_ENABLED, - TASK_HUNTING_FREE_THIRD_SLOT, - STASH_MOVING, - TOGGLE_IMBUEMENT_SHRINE_STORAGE, - TOGGLE_IMBUEMENT_NON_AGGRESSIVE_FIGHT_ONLY, - AUTOLOOT, + AUTH_TYPE, AUTOBANK, - RATE_USE_STAGES, - INVENTORY_GLOW, - TELEPORT_SUMMONS, - TOGGLE_DOWNLOAD_MAP, - USE_ANY_DATAPACK_FOLDER, - ALLOW_RELOAD, + AUTOLOOT, + BESTIARY_KILL_MULTIPLIER, + BESTIARY_RATE_CHARM_SHOP_PRICE, + BIND_ONLY_GLOBAL_ADDRESS, + BLACK_SKULL_DURATION, + BOOSTED_BOSS_KILL_BONUS, + BOOSTED_BOSS_LOOT_BONUS, BOOSTED_BOSS_SLOT, - XP_DISPLAY_MODE, - TOGGLE_GOLD_POUCH_ALLOW_ANYTHING, - TOGGLE_GOLD_POUCH_QUICKLOOT_ONLY, - TOGGLE_SERVER_IS_RETRO, - TOGGLE_TRAVELS_FREE, - TELEPORT_PLAYER_TO_VOCATION_ROOM, - OLD_PROTOCOL, - TOGGLE_HAZARDSYSTEM, - LOYALTY_ENABLED, - PARTY_AUTO_SHARE_EXPERIENCE, - PARTY_SHARE_LOOT_BOOSTS, - RESET_SESSIONS_ON_STARTUP, - TOGGLE_WHEELSYSTEM, - TOGGLE_ATTACK_SPEED_ONFIST, - VIP_SYSTEM_ENABLED, - VIP_AUTOLOOT_VIP_ONLY, - VIP_KEEP_HOUSE, - VIP_STAY_ONLINE, - REWARD_CHEST_COLLECT_ENABLED, - TOGGLE_MOUNT_IN_PZ, - TOGGLE_HOUSE_TRANSFER_ON_SERVER_RESTART, - TOGGLE_RECEIVE_REWARD, - TOGGLE_MAINTAIN_MODE, - MAP_NAME, - MAP_DOWNLOAD_URL, - MAP_AUTHOR, - HOUSE_RENT_PERIOD, - SERVER_NAME, - SERVER_MOTD, - OWNER_NAME, - OWNER_EMAIL, - URL, - LOCATION, - IP, - WORLD_TYPE, - MYSQL_HOST, - MYSQL_USER, - MYSQL_PASS, - MYSQL_DB, - MYSQL_SOCK, - AUTH_TYPE, - DEFAULT_PRIORITY, - STORE_IMAGES_URL, - MAP_CUSTOM_NAME, - MAP_CUSTOM_AUTHOR, - DISCORD_WEBHOOK_URL, - SAVE_INTERVAL_TYPE, - GLOBAL_SERVER_SAVE_TIME, - DATA_DIRECTORY, - CORE_DIRECTORY, - FORGE_FIENDISH_INTERVAL_TYPE, - FORGE_FIENDISH_INTERVAL_TIME, - TIBIADROME_CONCOCTION_TICK_TYPE, - M_CONST, - MAINTAIN_MODE_MESSAGE, - SQL_PORT, - MAX_PLAYERS, - PZ_LOCKED, - DEFAULT_DESPAWNRANGE, - DEFAULT_DESPAWNRADIUS, - RATE_EXPERIENCE, - RATE_SKILL, - RATE_LOOT, - RATE_MAGIC, - RATE_SPAWN, - RATE_KILLING_IN_THE_NAME_OF_POINTS, - HOUSE_PRICE_PER_SQM, - HOUSE_BUY_LEVEL, - HOUSE_LOSE_AFTER_INACTIVITY, - MAX_MESSAGEBUFFER, - ACTIONS_DELAY_INTERVAL, - EX_ACTIONS_DELAY_INTERVAL, - KICK_AFTER_MINUTES, - PROTECTION_LEVEL, - DEATH_LOSE_PERCENT, - STATUSQUERY_TIMEOUT, - FRAG_TIME, - WHITE_SKULL_TIME, - GAME_PORT, - LOGIN_PORT, - STATUS_PORT, - STAIRHOP_DELAY, - MAX_CONTAINER, - MAX_CONTAINER_ITEM, - MARKET_OFFER_DURATION, - DEPOT_BOXES, - FREE_DEPOT_LIMIT, - PREMIUM_DEPOT_LIMIT, + BOSSTIARY_KILL_MULTIPLIER, + BOSS_DEFAULT_TIME_TO_DEFEAT, + BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN, + BUY_AOL_COMMAND_FEE, + BUY_BLESS_COMMAND_FEE, CHECK_EXPIRED_MARKET_OFFERS_EACH_MINUTES, - MAX_MARKET_OFFERS_AT_A_TIME_PER_PLAYER, - EXP_FROM_PLAYERS_LEVEL_RANGE, - MAX_PACKETS_PER_SECOND, + CLASSIC_ATTACK_SPEED, + CLEAN_PROTECTION_ZONES, COMPRESSION_LEVEL, - STORE_COIN_PACKET, + CONVERT_UNSAFE_SCRIPTS, + CORE_DIRECTORY, + CRITICALCHANCE, + DATA_DIRECTORY, DAY_KILLS_TO_RED, - WEEK_KILLS_TO_RED, - MONTH_KILLS_TO_RED, - RED_SKULL_DURATION, - BLACK_SKULL_DURATION, - ORANGE_SKULL_DURATION, - GLOBAL_SERVER_SAVE_NOTIFY_DURATION, - PUSH_DELAY, - PUSH_DISTANCE_DELAY, - STASH_ITEMS, - PARTY_LIST_MAX_DISTANCE, - STAMINA_ORANGE_DELAY, - STAMINA_GREEN_DELAY, - STAMINA_TRAINER_DELAY, - STAMINA_PZ_GAIN, - STAMINA_TRAINER_GAIN, - SAVE_INTERVAL_TIME, - PREY_REROLL_PRICE_LEVEL, - PREY_SELECTION_LIST_PRICE, - PREY_BONUS_TIME, - PREY_BONUS_REROLL_PRICE, - PREY_FREE_REROLL_TIME, - TASK_HUNTING_LIMIT_EXHAUST, - TASK_HUNTING_REROLL_PRICE_LEVEL, - TASK_HUNTING_SELECTION_LIST_PRICE, - TASK_HUNTING_BONUS_REROLL_PRICE, - TASK_HUNTING_FREE_REROLL_TIME, - MAX_ALLOWED_ON_A_DUMMY, - FREE_QUEST_STAGE, + DEATH_LOSE_PERCENT, + DEFAULT_DESPAWNRADIUS, + DEFAULT_DESPAWNRANGE, + DEFAULT_PRIORITY, DEPOTCHEST, - CRITICALCHANCE, - ADVENTURERSBLESSING_LEVEL, - FORGE_MAX_ITEM_TIER, - FORGE_COST_ONE_SLIVER, - FORGE_SLIVER_AMOUNT, - FORGE_CORE_COST, - FORGE_MAX_DUST, - FORGE_FUSION_DUST_COST, - FORGE_TRANSFER_DUST_COST, + DEPOT_BOXES, + DISCORD_WEBHOOK_DELAY_MS, + DISCORD_WEBHOOK_URL, + EMOTE_SPELLS, + EXPERIENCE_FROM_PLAYERS, + EXP_FROM_PLAYERS_LEVEL_RANGE, + EX_ACTIONS_DELAY_INTERVAL, + FAMILIAR_TIME, + FORCE_MONSTERTYPE_LOAD, + FORGE_AMOUNT_MULTIPLIER, FORGE_BASE_SUCCESS_RATE, FORGE_BONUS_SUCCESS_RATE, - FORGE_TIER_LOSS_REDUCTION, - FORGE_AMOUNT_MULTIPLIER, - FORGE_MIN_SLIVERS, - FORGE_MAX_SLIVERS, - FORGE_INFLUENCED_CREATURES_LIMIT, + FORGE_CORE_COST, + FORGE_COST_ONE_SLIVER, FORGE_FIENDISH_CREATURES_LIMIT, - BESTIARY_KILL_MULTIPLIER, - BOSSTIARY_KILL_MULTIPLIER, - BOOSTED_BOSS_LOOT_BONUS, - BOOSTED_BOSS_KILL_BONUS, - FAMILIAR_TIME, - BUY_AOL_COMMAND_FEE, - BUY_BLESS_COMMAND_FEE, - HAZARD_CRITICAL_INTERVAL, + FORGE_FIENDISH_INTERVAL_TIME, + FORGE_FIENDISH_INTERVAL_TYPE, + FORGE_FUSION_DUST_COST, + FORGE_INFLUENCED_CREATURES_LIMIT, + FORGE_MAX_DUST, + FORGE_MAX_ITEM_TIER, + FORGE_MAX_SLIVERS, + FORGE_MIN_SLIVERS, + FORGE_SLIVER_AMOUNT, + FORGE_TIER_LOSS_REDUCTION, + FORGE_TRANSFER_DUST_COST, + FRAG_TIME, + FREE_DEPOT_LIMIT, + FREE_PREMIUM, + FREE_QUEST_STAGE, + GAME_PORT, + GLOBAL_SERVER_SAVE_CLEAN_MAP, + GLOBAL_SERVER_SAVE_CLOSE, + GLOBAL_SERVER_SAVE_NOTIFY_DURATION, + GLOBAL_SERVER_SAVE_NOTIFY_MESSAGE, + GLOBAL_SERVER_SAVE_SHUTDOWN, + GLOBAL_SERVER_SAVE_TIME, HAZARD_CRITICAL_CHANCE, + HAZARD_CRITICAL_INTERVAL, HAZARD_CRITICAL_MULTIPLIER, HAZARD_DAMAGE_MULTIPLIER, HAZARD_DODGE_MULTIPLIER, - HAZARD_PODS_DROP_MULTIPLIER, - HAZARD_PODS_TIME_TO_DAMAGE, HAZARD_EXP_BONUS_MULTIPLIER, HAZARD_LOOT_BONUS_MULTIPLIER, HAZARD_PODS_DAMAGE, + HAZARD_PODS_DROP_MULTIPLIER, + HAZARD_PODS_TIME_TO_DAMAGE, HAZARD_PODS_TIME_TO_SPAWN, HAZARD_SPAWN_PLUNDER_MULTIPLIER, + HOUSE_BUY_LEVEL, + HOUSE_LOSE_AFTER_INACTIVITY, + HOUSE_OWNED_BY_ACCOUNT, + HOUSE_PRICE_PER_SQM, + HOUSE_PRICE_RENT_MULTIPLIER, + HOUSE_PURSHASED_SHOW_PRICE, + HOUSE_RENT_PERIOD, + HOUSE_RENT_RATE, + INVENTORY_GLOW, + IP, + KICK_AFTER_MINUTES, + LOCATION, + LOGIN_PORT, + LOGLEVEL, LOW_LEVEL_BONUS_EXP, + LOYALTY_BONUS_PERCENTAGE_MULTIPLIER, + LOYALTY_ENABLED, LOYALTY_POINTS_PER_CREATION_DAY, - LOYALTY_POINTS_PER_PREMIUM_DAY_SPENT, LOYALTY_POINTS_PER_PREMIUM_DAY_PURCHASED, - WHEEL_POINTS_PER_LEVEL, - MULTIPLIER_ATTACKONFIST, + LOYALTY_POINTS_PER_PREMIUM_DAY_SPENT, + MAINTAIN_MODE_MESSAGE, + MAP_AUTHOR, + MAP_CUSTOM_AUTHOR, + MAP_CUSTOM_NAME, + MAP_DOWNLOAD_URL, + MAP_NAME, + MARKET_OFFER_DURATION, + MARKET_PREMIUM, + MAX_ALLOWED_ON_A_DUMMY, + MAX_CONTAINER, + MAX_CONTAINER_ITEM, + MAX_MARKET_OFFERS_AT_A_TIME_PER_PLAYER, + MAX_MESSAGEBUFFER, + MAX_PACKETS_PER_SECOND, + MAX_PLAYERS, MAX_SPEED_ATTACKONFIST, - TIBIADROME_CONCOCTION_COOLDOWN, - TIBIADROME_CONCOCTION_DURATION, - T_CONST, + METRICS_ENABLE_OSTREAM, + METRICS_ENABLE_PROMETHEUS, + METRICS_OSTREAM_INTERVAL, + METRICS_PROMETHEUS_ADDRESS, + MONTH_KILLS_TO_RED, + MULTIPLIER_ATTACKONFIST, + MYSQL_DB, + MYSQL_HOST, + MYSQL_PASS, + MYSQL_SOCK, + MYSQL_USER, + M_CONST, + OLD_PROTOCOL, + ONE_PLAYER_ON_ACCOUNT, + ONLY_INVITED_CAN_MOVE_HOUSE_ITEMS, + ONLY_PREMIUM_ACCOUNT, + OPTIMIZE_DATABASE, + ORANGE_SKULL_DURATION, + OWNER_EMAIL, + OWNER_NAME, PARALLELISM, - BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN, - BOSS_DEFAULT_TIME_TO_DEFEAT, - VIP_BONUS_EXP, - VIP_BONUS_LOOT, - VIP_BONUS_SKILL, - VIP_FAMILIAR_TIME_COOLDOWN_REDUCTION, - REWARD_CHEST_MAX_COLLECT_ITEMS, - DISCORD_WEBHOOK_DELAY_MS, + PARTY_AUTO_SHARE_EXPERIENCE, + PARTY_LIST_MAX_DISTANCE, + PARTY_SHARE_LOOT_BOOSTS, + PARTY_SHARE_LOOT_BOOSTS_DIMINISHING_FACTOR, + PREMIUM_DEPOT_LIMIT, + PREY_BONUS_REROLL_PRICE, + PREY_BONUS_TIME, + PREY_ENABLED, + PREY_FREE_REROLL_TIME, + PREY_FREE_THIRD_SLOT, + PREY_REROLL_PRICE_LEVEL, + PREY_SELECTION_LIST_PRICE, + PROTECTION_LEVEL, + PUSH_DELAY, + PUSH_DISTANCE_DELAY, + PUSH_WHEN_ATTACKING, PVP_MAX_LEVEL_DIFFERENCE, - BESTIARY_RATE_CHARM_SHOP_PRICE, + PVP_RATE_DAMAGE_REDUCTION_PER_LEVEL, + PVP_RATE_DAMAGE_TAKEN_PER_LEVEL, + PZ_LOCKED, + RATE_ATTACK_SPEED, + RATE_BOSS_ATTACK, + RATE_BOSS_DEFENSE, + RATE_BOSS_HEALTH, + RATE_EXERCISE_TRAINING_SPEED, + RATE_EXPERIENCE, RATE_HEALTH_REGEN, RATE_HEALTH_REGEN_SPEED, + RATE_KILLING_IN_THE_NAME_OF_POINTS, + RATE_LOOT, + RATE_MAGIC, RATE_MANA_REGEN, RATE_MANA_REGEN_SPEED, - RATE_SOUL_REGEN, - RATE_SOUL_REGEN_SPEED, - RATE_SPELL_COOLDOWN, - RATE_ATTACK_SPEED, - RATE_OFFLINE_TRAINING_SPEED, - RATE_EXERCISE_TRAINING_SPEED, - RATE_MONSTER_HEALTH, RATE_MONSTER_ATTACK, RATE_MONSTER_DEFENSE, - RATE_BOSS_HEALTH, - RATE_BOSS_ATTACK, - RATE_BOSS_DEFENSE, - RATE_NPC_HEALTH, + RATE_MONSTER_HEALTH, RATE_NPC_ATTACK, RATE_NPC_DEFENSE, - LOYALTY_BONUS_PERCENTAGE_MULTIPLIER, - PARTY_SHARE_LOOT_BOOSTS_DIMINISHING_FACTOR, - PVP_RATE_DAMAGE_TAKEN_PER_LEVEL, - PVP_RATE_DAMAGE_REDUCTION_PER_LEVEL, - HOUSE_PRICE_RENT_MULTIPLIER, - HOUSE_RENT_RATE, - LOGLEVEL, + RATE_NPC_HEALTH, + RATE_OFFLINE_TRAINING_SPEED, + RATE_SKILL, + RATE_SOUL_REGEN, + RATE_SOUL_REGEN_SPEED, + RATE_SPAWN, + RATE_SPELL_COOLDOWN, + RATE_USE_STAGES, + RED_SKULL_DURATION, + REFUND_BEGINNING_WEAPON_MANA, + REMOVE_BEGINNING_WEAPON_AMMO, + REMOVE_POTION_CHARGES, + REMOVE_RUNE_CHARGES, + REMOVE_WEAPON_AMMO, + REMOVE_WEAPON_CHARGES, + REPLACE_KICK_ON_LOGIN, + RESET_SESSIONS_ON_STARTUP, + REWARD_CHEST_COLLECT_ENABLED, + REWARD_CHEST_MAX_COLLECT_ITEMS, + SAVE_INTERVAL_TIME, + SAVE_INTERVAL_TYPE, + SCRIPTS_CONSOLE_LOGS, + SERVER_MOTD, + SERVER_NAME, + SORT_LOOT_BY_CHANCE, + SQL_PORT, + STAIRHOP_DELAY, + STAMINA_GREEN_DELAY, + STAMINA_ORANGE_DELAY, + STAMINA_PZ, + STAMINA_PZ_GAIN, + STAMINA_SYSTEM, + STAMINA_TRAINER, + STAMINA_TRAINER_DELAY, + STAMINA_TRAINER_GAIN, + STASH_ITEMS, + STASH_MOVING, + STATUSQUERY_TIMEOUT, + STATUS_PORT, + STORE_COIN_PACKET, + STORE_IMAGES_URL, + TASK_HUNTING_BONUS_REROLL_PRICE, + TASK_HUNTING_ENABLED, + TASK_HUNTING_FREE_REROLL_TIME, + TASK_HUNTING_FREE_THIRD_SLOT, + TASK_HUNTING_LIMIT_EXHAUST, + TASK_HUNTING_REROLL_PRICE_LEVEL, + TASK_HUNTING_SELECTION_LIST_PRICE, + TELEPORT_PLAYER_TO_VOCATION_ROOM, + TELEPORT_SUMMONS, + TIBIADROME_CONCOCTION_COOLDOWN, + TIBIADROME_CONCOCTION_DURATION, + TIBIADROME_CONCOCTION_TICK_TYPE, + TOGGLE_ATTACK_SPEED_ONFIST, + TOGGLE_DOWNLOAD_MAP, + TOGGLE_FREE_QUEST, + TOGGLE_GOLD_POUCH_ALLOW_ANYTHING, + TOGGLE_GOLD_POUCH_QUICKLOOT_ONLY, + TOGGLE_HAZARDSYSTEM, + TOGGLE_HOUSE_TRANSFER_ON_SERVER_RESTART, + TOGGLE_IMBUEMENT_NON_AGGRESSIVE_FIGHT_ONLY, + TOGGLE_IMBUEMENT_SHRINE_STORAGE, + TOGGLE_MAINTAIN_MODE, + TOGGLE_MAP_CUSTOM, + TOGGLE_MOUNT_IN_PZ, + TOGGLE_RECEIVE_REWARD, + TOGGLE_SAVE_INTERVAL, + TOGGLE_SAVE_INTERVAL_CLEAN_MAP, + TOGGLE_SERVER_IS_RETRO, + TOGGLE_TRAVELS_FREE, + TOGGLE_WHEELSYSTEM, + T_CONST, + URL, + USE_ANY_DATAPACK_FOLDER, + VIP_AUTOLOOT_VIP_ONLY, + VIP_BONUS_EXP, + VIP_BONUS_LOOT, + VIP_BONUS_SKILL, + VIP_FAMILIAR_TIME_COOLDOWN_REDUCTION, + VIP_KEEP_HOUSE, + VIP_STAY_ONLINE, + VIP_SYSTEM_ENABLED, + WARN_UNSAFE_SCRIPTS, + WEATHER_RAIN, + WEATHER_THUNDER, + WEEK_KILLS_TO_RED, + WHEEL_POINTS_PER_LEVEL, + WHITE_SKULL_TIME, + WORLD_TYPE, + XP_DISPLAY_MODE, }; diff --git a/src/config/configmanager.cpp b/src/config/configmanager.cpp index f7603ba5143..d90c89f0e26 100644 --- a/src/config/configmanager.cpp +++ b/src/config/configmanager.cpp @@ -349,6 +349,12 @@ bool ConfigManager::load() { loadBoolConfig(L, TOGGLE_RECEIVE_REWARD, "toggleReceiveReward", false); + loadBoolConfig(L, METRICS_ENABLE_PROMETHEUS, "metricsEnablePrometheus", false); + loadStringConfig(L, METRICS_PROMETHEUS_ADDRESS, "metricsPrometheusAddress", "localhost:9464"); + + loadBoolConfig(L, METRICS_ENABLE_OSTREAM, "metricsEnableOstream", false); + loadIntConfig(L, METRICS_OSTREAM_INTERVAL, "metricsOstreamInterval", 1000); + loaded = true; lua_close(L); return true; diff --git a/src/creatures/combat/combat.cpp b/src/creatures/combat/combat.cpp index 151e5458a85..a348f364078 100644 --- a/src/creatures/combat/combat.cpp +++ b/src/creatures/combat/combat.cpp @@ -14,11 +14,13 @@ #include "lua/creature/events.hpp" #include "creatures/players/wheel/player_wheel.hpp" #include "game/game.hpp" +#include "game/scheduling/dispatcher.hpp" #include "io/iobestiary.hpp" #include "creatures/monsters/monster.hpp" #include "creatures/monsters/monsters.hpp" #include "items/weapons/weapons.hpp" #include "map/spectators.hpp" +#include "lib/metrics/metrics.hpp" int32_t Combat::getLevelFormula(std::shared_ptr player, const std::shared_ptr wheelSpell, const CombatDamage &damage) const { if (!player) { @@ -584,7 +586,7 @@ void Combat::CombatHealthFunc(std::shared_ptr caster, std::shared_ptr< } damage.damageMultiplier += attackerPlayer->wheel()->getMajorStatConditional("Divine Empowerment", WheelMajor_t::DAMAGE); - g_logger().debug("Wheel Divine Empowerment damage multiplier {}", damage.damageMultiplier); + g_logger().trace("Wheel Divine Empowerment damage multiplier {}", damage.damageMultiplier); } if (g_game().combatBlockHit(damage, caster, target, params.blockedByShield, params.blockedByArmor, params.itemId != 0)) { @@ -919,6 +921,7 @@ void Combat::doChainEffect(const Position &origin, const Position &dest, uint8_t } bool Combat::doCombatChain(std::shared_ptr caster, std::shared_ptr target, bool aggressive) const { + metrics::method_latency measure(__METHOD_NAME__); if (!params.chainCallback) { return false; } @@ -1309,6 +1312,7 @@ void Combat::setRuneSpellName(const std::string &value) { } std::vector>> Combat::pickChainTargets(std::shared_ptr caster, const CombatParams ¶ms, uint8_t chainDistance, uint8_t maxTargets, bool backtracking, bool aggressive, std::shared_ptr initialTarget /* = nullptr */) { + metrics::method_latency measure(__METHOD_NAME__); if (!caster) { return {}; } @@ -2016,6 +2020,7 @@ void MagicField::onStepInField(const std::shared_ptr &creature) { } void Combat::applyExtensions(std::shared_ptr caster, std::shared_ptr target, CombatDamage &damage, const CombatParams ¶ms) { + metrics::method_latency measure(__METHOD_NAME__); if (damage.extension || !caster || damage.primary.type == COMBAT_HEALING) { return; } diff --git a/src/creatures/creature.cpp b/src/creatures/creature.cpp index e9b674c54f5..4720b903233 100644 --- a/src/creatures/creature.cpp +++ b/src/creatures/creature.cpp @@ -16,6 +16,7 @@ #include "creatures/monsters/monster.hpp" #include "game/zones/zone.hpp" #include "map/spectators.hpp" +#include "lib/metrics/metrics.hpp" Creature::Creature() { onIdleStatus(); @@ -29,6 +30,7 @@ Creature::~Creature() { } bool Creature::canSee(const Position &myPos, const Position &pos, int32_t viewRangeX, int32_t viewRangeY) { + metrics::method_latency measure(__METHOD_NAME__); if (myPos.z <= MAP_INIT_SURFACE_LAYER) { // we are on ground level or above (7 -> 0) // view is from 7 -> 0 @@ -88,6 +90,7 @@ int32_t Creature::getWalkSize() { } void Creature::onThink(uint32_t interval) { + metrics::method_latency measure(__METHOD_NAME__); if (!isMapLoaded && useCacheMap()) { isMapLoaded = true; updateMapCache(); @@ -158,6 +161,7 @@ void Creature::onIdleStatus() { } void Creature::onCreatureWalk() { + metrics::method_latency measure(__METHOD_NAME__); if (getWalkDelay() <= 0) { Direction dir; uint32_t flags = FLAG_IGNOREFIELDDAMAGE; @@ -268,6 +272,7 @@ void Creature::stopEventWalk() { } void Creature::updateMapCache() { + metrics::method_latency measure(__METHOD_NAME__); std::shared_ptr newTile; const Position &myPos = getPosition(); Position pos(0, 0, myPos.z); @@ -283,6 +288,7 @@ void Creature::updateMapCache() { } void Creature::updateTileCache(std::shared_ptr newTile, int32_t dx, int32_t dy) { + metrics::method_latency measure(__METHOD_NAME__); if (std::abs(dx) <= maxWalkCacheWidth && std::abs(dy) <= maxWalkCacheHeight) { localMapCache[maxWalkCacheHeight + dy][maxWalkCacheWidth + dx] = newTile && newTile->queryAdd(0, getCreature(), 1, FLAG_PATHFINDING | FLAG_IGNOREFIELDDAMAGE) == RETURNVALUE_NOERROR; } @@ -298,6 +304,7 @@ void Creature::updateTileCache(std::shared_ptr upTile, const Position &pos } int32_t Creature::getWalkCache(const Position &pos) { + metrics::method_latency measure(__METHOD_NAME__); if (!useCacheMap()) { return 2; } @@ -354,6 +361,7 @@ void Creature::onRemoveTileItem(std::shared_ptr updateTile, const Position } void Creature::onCreatureAppear(std::shared_ptr creature, bool isLogin) { + metrics::method_latency measure(__METHOD_NAME__); if (creature == getCreature()) { if (useCacheMap()) { isMapLoaded = true; @@ -371,6 +379,7 @@ void Creature::onCreatureAppear(std::shared_ptr creature, bool isLogin } void Creature::onRemoveCreature(std::shared_ptr creature, bool) { + metrics::method_latency measure(__METHOD_NAME__); onCreatureDisappear(creature, true); if (creature != getCreature() && isMapLoaded) { if (creature->getPosition().z == getPosition().z) { @@ -386,6 +395,7 @@ void Creature::onRemoveCreature(std::shared_ptr creature, bool) { } void Creature::onCreatureDisappear(std::shared_ptr creature, bool isLogout) { + metrics::method_latency measure(__METHOD_NAME__); if (getAttackedCreature() == creature) { setAttackedCreature(nullptr); onAttackedCreatureDisappear(isLogout); @@ -398,6 +408,7 @@ void Creature::onCreatureDisappear(std::shared_ptr creature, bool isLo } void Creature::onChangeZone(ZoneType_t zone) { + metrics::method_latency measure(__METHOD_NAME__); auto attackedCreature = getAttackedCreature(); if (attackedCreature && zone == ZONE_PROTECTION) { onCreatureDisappear(attackedCreature, false); @@ -405,6 +416,7 @@ void Creature::onChangeZone(ZoneType_t zone) { } void Creature::onAttackedCreatureChangeZone(ZoneType_t zone) { + metrics::method_latency measure(__METHOD_NAME__); if (zone == ZONE_PROTECTION) { auto attackedCreature = getAttackedCreature(); if (attackedCreature) { @@ -414,6 +426,7 @@ void Creature::onAttackedCreatureChangeZone(ZoneType_t zone) { } void Creature::checkSummonMove(const Position &newPos, bool teleportSummon) { + metrics::method_latency measure(__METHOD_NAME__); if (hasSummons()) { std::vector> despawnMonsterList; for (const auto &summon : getSummons()) { @@ -456,6 +469,7 @@ void Creature::checkSummonMove(const Position &newPos, bool teleportSummon) { } void Creature::onCreatureMove(const std::shared_ptr &creature, const std::shared_ptr &newTile, const Position &newPos, const std::shared_ptr &oldTile, const Position &oldPos, bool teleport) { + metrics::method_latency measure(__METHOD_NAME__); if (creature == getCreature()) { lastStep = OTSYS_TIME(); lastStepCost = 1; @@ -612,6 +626,7 @@ void Creature::onCreatureMove(const std::shared_ptr &creature, const s } void Creature::onDeath() { + metrics::method_latency measure(__METHOD_NAME__); bool lastHitUnjustified = false; bool mostDamageUnjustified = false; std::shared_ptr lastHitCreature = g_game().getCreatureByID(lastHitCreatureId); @@ -687,13 +702,47 @@ void Creature::onDeath() { /** * @deprecated -- This is here to trigger the deprecated onKill events in lua */ + auto mostDamageCreatureMaster = mostDamageCreature ? mostDamageCreature->getMaster() : nullptr; if (mostDamageCreature && (mostDamageCreature != lastHitCreature || getMonster()) && mostDamageCreature != lastHitCreatureMaster) { - auto mostDamageCreatureMaster = mostDamageCreature->getMaster(); if (lastHitCreature != mostDamageCreatureMaster && (lastHitCreatureMaster == nullptr || mostDamageCreatureMaster != lastHitCreatureMaster)) { mostDamageUnjustified = mostDamageCreature->deprecatedOnKilledCreature(getCreature(), false); } } + bool killedByPlayer = mostDamageCreature && mostDamageCreature->getPlayer() || mostDamageCreatureMaster && mostDamageCreatureMaster->getPlayer(); + if (getPlayer()) { + g_metrics().addCounter( + "player_death", + 1, + { + { "name", getNameDescription() }, + { "level", std::to_string(getPlayer()->getLevel()) }, + { "most_damage_creature", mostDamageCreature ? mostDamageCreature->getName() : "(none)" }, + { "last_hit_creature", lastHitCreature ? lastHitCreature->getName() : "(none)" }, + { "most_damage_dealt", std::to_string(mostDamage) }, + { "most_damage_creature_master", mostDamageCreatureMaster ? mostDamageCreatureMaster->getName() : "(none)" }, + { "most_damage_unjustified", std::to_string(mostDamageUnjustified) }, + { "last_hit_unjustified", std::to_string(lastHitUnjustified) }, + { "by_player", std::to_string(killedByPlayer) }, + } + ); + } else { + std::string killerName = mostDamageCreature ? mostDamageCreature->getName() : "(none)"; + if (mostDamageCreatureMaster) { + killerName = mostDamageCreatureMaster->getName(); + } + g_metrics().addCounter( + "monster_death", + 1, + { + { "name", getName() }, + { "killer", killerName }, + { "is_summon", std::to_string(getMaster() ? true : false) }, + { "by_player", std::to_string(killedByPlayer) }, + } + ); + } + bool droppedCorpse = dropCorpse(lastHitCreature, mostDamageCreature, lastHitUnjustified, mostDamageUnjustified); death(lastHitCreature); @@ -707,6 +756,7 @@ void Creature::onDeath() { } bool Creature::dropCorpse(std::shared_ptr lastHitCreature, std::shared_ptr mostDamageCreature, bool lastHitUnjustified, bool mostDamageUnjustified) { + metrics::method_latency measure(__METHOD_NAME__); if (!lootDrop && getMonster()) { if (getMaster()) { // Scripting event onDeath @@ -974,6 +1024,7 @@ void Creature::getPathSearchParams(const std::shared_ptr &, FindPathPa } void Creature::goToFollowCreature_async(std::function &&onComplete) { + metrics::method_latency measure(__METHOD_NAME__); if (pathfinderRunning.load()) { return; } @@ -990,6 +1041,7 @@ void Creature::goToFollowCreature_async(std::function &&onComplete) { } void Creature::goToFollowCreature() { + metrics::method_latency measure(__METHOD_NAME__); const auto &followCreature = getFollowCreature(); if (!followCreature) { return; @@ -1043,6 +1095,7 @@ bool Creature::canFollowMaster() { } bool Creature::setFollowCreature(std::shared_ptr creature) { + metrics::method_latency measure(__METHOD_NAME__); if (creature) { if (getFollowCreature() == creature) { return true; @@ -1187,6 +1240,7 @@ void Creature::onAttackedCreatureDrainHealth(std::shared_ptr target, i } void Creature::onAttackedCreatureKilled(std::shared_ptr target) { + metrics::method_latency measure(__METHOD_NAME__); if (target != getCreature()) { uint64_t gainExp = target->getGainedExperience(static_self_cast()); onGainExperience(gainExp, target); @@ -1194,6 +1248,7 @@ void Creature::onAttackedCreatureKilled(std::shared_ptr target) { } bool Creature::deprecatedOnKilledCreature(std::shared_ptr target, bool lastHit) { + metrics::method_latency measure(__METHOD_NAME__); auto master = getMaster(); if (master) { master->deprecatedOnKilledCreature(target, lastHit); @@ -1208,6 +1263,7 @@ bool Creature::deprecatedOnKilledCreature(std::shared_ptr target, bool } void Creature::onGainExperience(uint64_t gainExp, std::shared_ptr target) { + metrics::method_latency measure(__METHOD_NAME__); auto master = getMaster(); if (gainExp == 0 || !master) { return; @@ -1238,6 +1294,7 @@ void Creature::onGainExperience(uint64_t gainExp, std::shared_ptr targ } bool Creature::setMaster(std::shared_ptr newMaster, bool reloadCreature /* = false*/) { + metrics::method_latency measure(__METHOD_NAME__); // Persists if this creature has ever been a summon this->summoned = true; auto oldMaster = getMaster(); @@ -1270,6 +1327,7 @@ bool Creature::setMaster(std::shared_ptr newMaster, bool reloadCreatur } bool Creature::addCondition(std::shared_ptr condition) { + metrics::method_latency measure(__METHOD_NAME__); if (condition == nullptr) { return false; } @@ -1302,6 +1360,7 @@ bool Creature::addCombatCondition(std::shared_ptr condition) { } void Creature::removeCondition(ConditionType_t type) { + metrics::method_latency measure(__METHOD_NAME__); auto it = conditions.begin(), end = conditions.end(); while (it != end) { std::shared_ptr condition = *it; @@ -1319,6 +1378,7 @@ void Creature::removeCondition(ConditionType_t type) { } void Creature::removeCondition(ConditionType_t conditionType, ConditionId_t conditionId, bool force /* = false*/) { + metrics::method_latency measure(__METHOD_NAME__); auto it = conditions.begin(), end = conditions.end(); while (it != end) { std::shared_ptr condition = *it; @@ -1382,6 +1442,7 @@ std::shared_ptr Creature::getCondition(ConditionType_t type) const { } std::shared_ptr Creature::getCondition(ConditionType_t type, ConditionId_t conditionId, uint32_t subId /* = 0*/) const { + metrics::method_latency measure(__METHOD_NAME__); for (const auto &condition : conditions) { if (condition->getType() == type && condition->getId() == conditionId && condition->getSubId() == subId) { return condition; @@ -1401,6 +1462,7 @@ std::vector> Creature::getConditionsByType(ConditionT } void Creature::executeConditions(uint32_t interval) { + metrics::method_latency measure(__METHOD_NAME__); auto it = conditions.begin(), end = conditions.end(); while (it != end) { std::shared_ptr condition = *it; @@ -1419,6 +1481,7 @@ void Creature::executeConditions(uint32_t interval) { } bool Creature::hasCondition(ConditionType_t type, uint32_t subId /* = 0*/) const { + metrics::method_latency measure(__METHOD_NAME__); if (isSuppress(type)) { return false; } @@ -1652,6 +1715,7 @@ bool Creature::isInvisible() const { } bool Creature::getPathTo(const Position &targetPos, stdext::arraylist &dirList, const FindPathParams &fpp) { + metrics::method_latency measure(__METHOD_NAME__); return g_game().map.getPathMatching(getCreature(), dirList, FrozenPathingConditionCall(targetPos), fpp); } diff --git a/src/creatures/npcs/npc.cpp b/src/creatures/npcs/npc.cpp index 3991d01c1c1..5602f145807 100644 --- a/src/creatures/npcs/npc.cpp +++ b/src/creatures/npcs/npc.cpp @@ -16,6 +16,7 @@ #include "lua/callbacks/creaturecallback.hpp" #include "game/scheduling/dispatcher.hpp" #include "map/spectators.hpp" +#include "lib/metrics/metrics.hpp" int32_t Npc::despawnRange; int32_t Npc::despawnRadius; @@ -279,6 +280,7 @@ void Npc::onPlayerBuyItem(std::shared_ptr player, uint16_t itemId, uint8 if (getCurrency() == ITEM_GOLD_COIN && (player->getMoney() + player->getBankBalance()) < totalCost) { g_logger().error("[Npc::onPlayerBuyItem (getMoney)] - Player {} have a problem for buy item {} on shop for npc {}", player->getName(), itemId, getName()); g_logger().debug("[Information] Player {} tried to buy item {} on shop for npc {}, at position {}", player->getName(), itemId, getName(), player->getPosition().toString()); + g_metrics().addCounter("balance_decrease", totalCost, { { "player", player->getName() }, { "context", "npc_purchase" } }); return; } else if (getCurrency() != ITEM_GOLD_COIN && (player->getItemTypeCount(getCurrency()) < totalCost || ((player->getMoney() + player->getBankBalance()) < bagsCost))) { g_logger().error("[Npc::onPlayerBuyItem (getItemTypeCount)] - Player {} have a problem for buy item {} on shop for npc {}", player->getName(), itemId, getName()); @@ -416,6 +418,7 @@ void Npc::onPlayerSellItem(std::shared_ptr player, uint16_t itemId, uint } else { g_game().addMoney(player, totalCost); } + g_metrics().addCounter("balance_increase", totalCost, { { "player", player->getName() }, { "context", "npc_sale" } }); } else { std::shared_ptr newItem = Item::CreateItem(getCurrency(), totalCost); if (newItem) { diff --git a/src/creatures/npcs/npcs.cpp b/src/creatures/npcs/npcs.cpp index 0af1b090201..50fff3aa75b 100644 --- a/src/creatures/npcs/npcs.cpp +++ b/src/creatures/npcs/npcs.cpp @@ -97,10 +97,8 @@ void NpcType::loadShop(const std::shared_ptr &npcType, ShopBlock shopBl shopBlock.childShop.push_back(child); } } - npcType->info.shopItemVector.push_back(shopBlock); - } else { - npcType->info.shopItemVector.push_back(shopBlock); } + npcType->info.shopItemVector.push_back(shopBlock); info.speechBubble = SPEECHBUBBLE_TRADE; } diff --git a/src/creatures/players/player.cpp b/src/creatures/players/player.cpp index 1fe7a0b1ca2..45073f9d878 100644 --- a/src/creatures/players/player.cpp +++ b/src/creatures/players/player.cpp @@ -31,6 +31,7 @@ #include "items/weapons/weapons.hpp" #include "core.hpp" #include "map/spectators.hpp" +#include "lib/metrics/metrics.hpp" MuteCountMap Player::muteCountMap; @@ -1107,6 +1108,23 @@ void Player::checkLootContainers(std::shared_ptr item) { } void Player::sendLootStats(std::shared_ptr item, uint8_t count) { + uint64_t value = 0; + if (item->getID() == ITEM_GOLD_COIN || item->getID() == ITEM_PLATINUM_COIN || item->getID() == ITEM_CRYSTAL_COIN) { + if (item->getID() == ITEM_PLATINUM_COIN) { + value = count * 100; + } else if (item->getID() == ITEM_CRYSTAL_COIN) { + value = count * 10000; + } else { + value = count; + } + } else if ( + auto npc = g_game().getNpcByName("The Lootmonger") + ) { + const auto &iType = Item::items.getItemType(item->getID()); + value = iType.sellPrice * count; + } + g_metrics().addCounter("player_loot", value, { { "player", getName() } }); + if (client) { client->sendLootStats(item, count); } @@ -1256,6 +1274,10 @@ void Player::sendStats() { } void Player::updateSupplyTracker(std::shared_ptr item) { + const auto &iType = Item::items.getItemType(item->getID()); + auto value = iType.buyPrice; + g_metrics().addCounter("player_supply", value, { { "player", getName() } }); + if (client) { client->sendUpdateSupplyTracker(item); } @@ -1382,6 +1404,8 @@ void Player::onApplyImbuement(Imbuement* imbuement, std::shared_ptr item, return; } + g_metrics().addCounter("balance_decrease", price, { { "player", getName() }, { "context", "apply_imbuement" } }); + for (auto &[key, value] : items) { std::stringstream withdrawItemMessage; @@ -1444,6 +1468,7 @@ void Player::onClearImbuement(std::shared_ptr item, uint8_t slot) { this->openImbuementWindow(item); return; } + g_metrics().addCounter("balance_decrease", baseImbuement->removeCost, { { "player", getName() }, { "context", "clear_imbuement" } }); if (item->getParent() == getPlayer()) { removeItemImbuementStats(imbuementInfo.imbuement); @@ -2236,6 +2261,16 @@ void Player::addExperience(std::shared_ptr target, uint64_t exp, bool return; } + auto rate = exp / rawExp; + std::map attrs({ { "player", getName() }, { "level", std::to_string(getLevel()) }, { "rate", std::to_string(rate) } }); + if (sendText) { + g_metrics().addCounter("player_experience_raw", rawExp, attrs); + g_metrics().addCounter("player_experience_actual", exp, attrs); + } else { + g_metrics().addCounter("player_experience_bonus_raw", rawExp, attrs); + g_metrics().addCounter("player_experience_bonus_actual", exp, attrs); + } + // Hazard system experience std::shared_ptr monster = target && target->getMonster() ? target->getMonster() : nullptr; bool handleHazardExperience = monster && monster->getHazard() && getHazardSystemPoints() > 0; @@ -6961,6 +6996,7 @@ void Player::forgeFuseItems(uint16_t itemId, uint8_t tier, bool success, bool re sendForgeError(RETURNVALUE_CONTACTADMINISTRATOR); return; } + g_metrics().addCounter("balance_decrease", cost, { { "player", getName() }, { "context", "forge_fuse" } }); history.cost = cost; } @@ -7034,6 +7070,7 @@ void Player::forgeFuseItems(uint16_t itemId, uint8_t tier, bool success, bool re sendForgeError(RETURNVALUE_CONTACTADMINISTRATOR); return; } + g_metrics().addCounter("balance_decrease", cost, { { "player", getName() }, { "context", "forge_fuse" } }); history.cost = cost; } @@ -7165,6 +7202,7 @@ void Player::forgeTransferItemTier(uint16_t donorItemId, uint8_t tier, uint16_t return; } history.cost = cost; + g_metrics().addCounter("balance_decrease", cost, { { "player", getName() }, { "context", "forge_transfer" } }); returnValue = g_game().internalAddItem(static_self_cast(), exaltationContainer, INDEX_WHEREEVER); if (returnValue != RETURNVALUE_NOERROR) { diff --git a/src/database/database.cpp b/src/database/database.cpp index a097c9f9b03..916ffd1ee44 100644 --- a/src/database/database.cpp +++ b/src/database/database.cpp @@ -12,6 +12,7 @@ #include "config/configmanager.hpp" #include "database/database.hpp" #include "lib/di/container.hpp" +#include "lib/metrics/metrics.hpp" Database::~Database() { if (handle != nullptr) { @@ -60,7 +61,10 @@ bool Database::beginTransaction() { if (!executeQuery("BEGIN")) { return false; } + metrics::lock_latency measureLock("database"); databaseLock.lock(); + measureLock.stop(); + return true; } @@ -121,11 +125,14 @@ bool Database::executeQuery(const std::string_view &query) { g_logger().trace("Executing Query: {}", query); + metrics::lock_latency measureLock("database"); std::scoped_lock lock { databaseLock }; + measureLock.stop(); + metrics::query_latency measure(query.substr(0, 50)); bool success = retryQuery(query, 10); - mysql_free_result(mysql_store_result(handle)); + return success; } @@ -136,8 +143,11 @@ DBResult_ptr Database::storeQuery(const std::string_view &query) { } g_logger().trace("Storing Query: {}", query); + metrics::lock_latency measureLock("database"); std::scoped_lock lock { databaseLock }; + measureLock.stop(); + metrics::query_latency measure(query.substr(0, 50)); retry: if (mysql_query(handle, query.data()) != 0) { g_logger().error("Query: {}", query); diff --git a/src/game/bank/bank.cpp b/src/game/bank/bank.cpp index f1a700388e0..713ee645733 100644 --- a/src/game/bank/bank.cpp +++ b/src/game/bank/bank.cpp @@ -14,6 +14,7 @@ #include "creatures/players/player.hpp" #include "io/iologindata.hpp" #include "game/scheduling/save_manager.hpp" +#include "lib/metrics/metrics.hpp" Bank::Bank(const std::shared_ptr bankable) : m_bankable(bankable) { @@ -110,7 +111,12 @@ bool Bank::transferTo(const std::shared_ptr destination, uint64_t amount) } } - return debit(amount) && destination->credit(amount); + if (!(debit(amount) && destination->credit(amount))) { + return false; + } + g_metrics().addCounter("balance_increase", amount, { { "player", destination->getBankable()->getPlayer()->getName() }, { "context", "bank_transfer" } }); + g_metrics().addCounter("balance_decrease", amount, { { "player", getBankable()->getPlayer()->getName() }, { "context", "bank_transfer" } }); + return true; } bool Bank::withdraw(std::shared_ptr player, uint64_t amount) { @@ -118,6 +124,7 @@ bool Bank::withdraw(std::shared_ptr player, uint64_t amount) { return false; } g_game().addMoney(player, amount); + g_metrics().addCounter("balance_decrease", amount, { { "player", player->getName() }, { "context", "bank_withdraw" } }); return true; } @@ -144,5 +151,6 @@ bool Bank::deposit(const std::shared_ptr destination, uint64_t amount) { if (!g_game().removeMoney(bankable->getPlayer(), amount)) { return false; } + g_metrics().addCounter("balance_increase", amount, { { "player", bankable->getPlayer()->getName() }, { "context", "bank_deposit" } }); return destination->credit(amount); } diff --git a/src/game/functions/game_reload.cpp b/src/game/functions/game_reload.cpp index 873cd60ecb9..f40e9cf9047 100644 --- a/src/game/functions/game_reload.cpp +++ b/src/game/functions/game_reload.cpp @@ -72,6 +72,7 @@ bool GameReload::reloadAll() const { reloadResults.reserve(magic_enum::enum_count()); for (auto value : magic_enum::enum_values()) { + g_logger().info("Reloading: {}", magic_enum::enum_name(value)); if (value == Reload_t::RELOAD_TYPE_ALL) { continue; } diff --git a/src/game/game.cpp b/src/game/game.cpp index 893a9dcec8d..bc758180bf6 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -691,13 +691,13 @@ std::shared_ptr Game::getNpcByID(uint32_t id) { return it->second; } -std::shared_ptr Game::getPlayerByID(uint32_t id, bool loadTmp /* = false */) { +std::shared_ptr Game::getPlayerByID(uint32_t id, bool allowOffline /* = false */) { auto playerMap = players.find(id); if (playerMap != players.end()) { return playerMap->second; } - if (!loadTmp) { + if (!allowOffline) { return nullptr; } std::shared_ptr tmpPlayer = std::make_shared(nullptr); @@ -748,14 +748,14 @@ std::shared_ptr Game::getNpcByName(const std::string &s) { return nullptr; } -std::shared_ptr Game::getPlayerByName(const std::string &s, bool loadTmp /* = false */) { +std::shared_ptr Game::getPlayerByName(const std::string &s, bool allowOffline /* = false */) { if (s.empty()) { return nullptr; } auto it = mappedPlayerNames.find(asLowerCaseString(s)); if (it == mappedPlayerNames.end() || it->second.expired()) { - if (!loadTmp) { + if (!allowOffline) { return nullptr; } std::shared_ptr tmpPlayer = std::make_shared(nullptr); @@ -769,7 +769,7 @@ std::shared_ptr Game::getPlayerByName(const std::string &s, bool loadTmp return it->second.lock(); } -std::shared_ptr Game::getPlayerByGUID(const uint32_t &guid, bool loadTmp /* = false */) { +std::shared_ptr Game::getPlayerByGUID(const uint32_t &guid, bool allowOffline /* = false */) { if (guid == 0) { return nullptr; } @@ -778,7 +778,7 @@ std::shared_ptr Game::getPlayerByGUID(const uint32_t &guid, bool loadTmp return it.second; } } - if (!loadTmp) { + if (!allowOffline) { return nullptr; } std::shared_ptr tmpPlayer = std::make_shared(nullptr); @@ -869,6 +869,7 @@ bool Game::internalPlaceCreature(std::shared_ptr creature, const Posit } bool Game::placeCreature(std::shared_ptr creature, const Position &pos, bool extendedPos /*=false*/, bool forced /*= false*/) { + metrics::method_latency measure(__METHOD_NAME__); if (!internalPlaceCreature(creature, pos, extendedPos, forced)) { return false; } @@ -895,6 +896,7 @@ bool Game::placeCreature(std::shared_ptr creature, const Position &pos } bool Game::removeCreature(std::shared_ptr creature, bool isLogout /* = true*/) { + metrics::method_latency measure(__METHOD_NAME__); if (!creature || creature->isRemoved()) { return false; } @@ -962,6 +964,7 @@ bool Game::removeCreature(std::shared_ptr creature, bool isLogout /* = } void Game::executeDeath(uint32_t creatureId) { + metrics::method_latency measure(__METHOD_NAME__); std::shared_ptr creature = getCreatureByID(creatureId); if (creature && !creature->isRemoved()) { afterCreatureZoneChange(creature, creature->getZones(), {}); @@ -970,6 +973,7 @@ void Game::executeDeath(uint32_t creatureId) { } void Game::playerTeleport(uint32_t playerId, const Position &newPosition) { + metrics::method_latency measure(__METHOD_NAME__); std::shared_ptr player = getPlayerByID(playerId); if (!player || !player->hasFlag(PlayerFlags_t::CanMapClickTeleport)) { return; @@ -982,6 +986,7 @@ void Game::playerTeleport(uint32_t playerId, const Position &newPosition) { } void Game::playerInspectItem(std::shared_ptr player, const Position &pos) { + metrics::method_latency measure(__METHOD_NAME__); std::shared_ptr thing = internalGetThing(player, pos, 0, 0, STACKPOS_TOPDOWN_ITEM); if (!thing) { player->sendCancelMessage(RETURNVALUE_NOTPOSSIBLE); @@ -998,6 +1003,7 @@ void Game::playerInspectItem(std::shared_ptr player, const Position &pos } void Game::playerInspectItem(std::shared_ptr player, uint16_t itemId, uint8_t itemCount, bool cyclopedia) { + metrics::method_latency measure(__METHOD_NAME__); player->sendItemInspection(itemId, itemCount, nullptr, cyclopedia); } @@ -1051,6 +1057,7 @@ FILELOADER_ERRORS Game::loadAppearanceProtobuf(const std::string &file) { } void Game::playerMoveThing(uint32_t playerId, const Position &fromPos, uint16_t itemId, uint8_t fromStackPos, const Position &toPos, uint8_t count) { + metrics::method_latency measure(__METHOD_NAME__); std::shared_ptr player = getPlayerByID(playerId); if (!player) { return; @@ -1133,6 +1140,7 @@ void Game::playerMoveCreatureByID(uint32_t playerId, uint32_t movingCreatureId, } void Game::playerMoveCreature(std::shared_ptr player, std::shared_ptr movingCreature, const Position &movingCreatureOrigPos, std::shared_ptr toTile) { + metrics::method_latency measure(__METHOD_NAME__); if (!player->canDoAction()) { uint32_t delay = 600; std::shared_ptr task = createPlayerTask(delay, std::bind(&Game::playerMoveCreatureByID, this, player->getID(), movingCreature->getID(), movingCreatureOrigPos, toTile->getPosition()), "Game::playerMoveCreatureByID"); @@ -1272,6 +1280,7 @@ ReturnValue Game::internalMoveCreature(std::shared_ptr creature, Direc } ReturnValue Game::internalMoveCreature(const std::shared_ptr &creature, const std::shared_ptr &toTile, uint32_t flags /*= 0*/) { + metrics::method_latency measure(__METHOD_NAME__); if (creature->hasCondition(CONDITION_ROOTED)) { return RETURNVALUE_NOTPOSSIBLE; } @@ -1668,6 +1677,7 @@ ReturnValue Game::checkMoveItemToCylinder(std::shared_ptr player, std::s } ReturnValue Game::internalMoveItem(std::shared_ptr fromCylinder, std::shared_ptr toCylinder, int32_t index, std::shared_ptr item, uint32_t count, std::shared_ptr* movedItem, uint32_t flags /*= 0*/, std::shared_ptr actor /*=nullptr*/, std::shared_ptr tradeItem /* = nullptr*/, bool checkTile /* = true*/) { + metrics::method_latency measure(__METHOD_NAME__); if (fromCylinder == nullptr) { g_logger().error("[{}] fromCylinder is nullptr", __FUNCTION__); return RETURNVALUE_NOTPOSSIBLE; @@ -1918,6 +1928,7 @@ ReturnValue Game::internalAddItem(std::shared_ptr toCylinder, std::sha } ReturnValue Game::internalAddItem(std::shared_ptr toCylinder, std::shared_ptr item, int32_t index, uint32_t flags, bool test, uint32_t &remainderCount) { + metrics::method_latency measure(__METHOD_NAME__); if (toCylinder == nullptr) { g_logger().error("[{}] fromCylinder is nullptr", __FUNCTION__); return RETURNVALUE_NOTPOSSIBLE; @@ -2004,6 +2015,7 @@ ReturnValue Game::internalAddItem(std::shared_ptr toCylinder, std::sha } ReturnValue Game::internalRemoveItem(std::shared_ptr item, int32_t count /*= -1*/, bool test /*= false*/, uint32_t flags /*= 0*/, bool force /*= false*/) { + metrics::method_latency measure(__METHOD_NAME__); if (item == nullptr) { g_logger().debug("{} - Item is nullptr", __FUNCTION__); return RETURNVALUE_NOTPOSSIBLE; @@ -2063,6 +2075,7 @@ ReturnValue Game::internalRemoveItem(std::shared_ptr item, int32_t count / } std::tuple Game::addItemBatch(const std::shared_ptr &toCylinder, const std::vector> &items, uint32_t flags /* = 0 */, bool dropOnMap /* = true */, uint32_t autoContainerId /* = 0 */) { + metrics::method_latency measure(__METHOD_NAME__); const auto player = toCylinder->getPlayer(); bool dropping = false; ReturnValue ret = RETURNVALUE_NOTPOSSIBLE; @@ -2130,6 +2143,7 @@ std::tuple Game::addItemBatch(const std::shared } std::tuple Game::createItemBatch(const std::shared_ptr &toCylinder, const std::vector> &itemCounts, uint32_t flags /* = 0 */, bool dropOnMap /* = true */, uint32_t autoContainerId /* = 0 */) { + metrics::method_latency measure(__METHOD_NAME__); std::vector> items; for (const auto &[itemId, count, subType] : itemCounts) { const auto &itemType = Item::items[itemId]; @@ -2163,6 +2177,7 @@ std::tuple Game::createItem(const std::shared_p } ReturnValue Game::internalPlayerAddItem(std::shared_ptr player, std::shared_ptr item, bool dropOnMap /*= true*/, Slots_t slot /*= CONST_SLOT_WHEREEVER*/) { + metrics::method_latency measure(__METHOD_NAME__); uint32_t remainderCount = 0; ReturnValue ret = internalAddItem(player, item, static_cast(slot), 0, false, remainderCount); if (remainderCount != 0) { @@ -2185,6 +2200,7 @@ ReturnValue Game::internalPlayerAddItem(std::shared_ptr player, std::sha } std::shared_ptr Game::findItemOfType(std::shared_ptr cylinder, uint16_t itemId, bool depthSearch /*= true*/, int32_t subType /*= -1*/) const { + metrics::method_latency measure(__METHOD_NAME__); if (cylinder == nullptr) { g_logger().error("[{}] Cylinder is nullptr", __FUNCTION__); return nullptr; @@ -2360,6 +2376,7 @@ void Game::addMoney(std::shared_ptr cylinder, uint64_t money, uint32_t } std::shared_ptr Game::transformItem(std::shared_ptr item, uint16_t newId, int32_t newCount /*= -1*/) { + metrics::method_latency measure(__METHOD_NAME__); if (item->getID() == newId && (newCount == -1 || (newCount == item->getSubType() && newCount != 0))) { // chargeless item placed on map = infinite return item; } @@ -2490,7 +2507,8 @@ std::shared_ptr Game::transformItem(std::shared_ptr item, uint16_t n return newItem; } -ReturnValue Game::internalTeleport(std::shared_ptr thing, const Position &newPos, bool pushMove /* = true*/, uint32_t flags /*= 0*/) { +ReturnValue Game::internalTeleport(const std::shared_ptr &thing, const Position &newPos, bool pushMove /* = true*/, uint32_t flags /*= 0*/) { + metrics::method_latency measure(__METHOD_NAME__); if (thing == nullptr) { g_logger().error("[{}] thing is nullptr", __FUNCTION__); return RETURNVALUE_NOTPOSSIBLE; @@ -2781,6 +2799,7 @@ ReturnValue Game::internalCollectLootItems(std::shared_ptr player, std:: return RETURNVALUE_NOTPOSSIBLE; } player->setBankBalance(player->getBankBalance() + money); + g_metrics().addCounter("balance_increase", money, { { "player", player->getName() }, { "context", "loot" } }); return RETURNVALUE_NOERROR; } } @@ -3239,6 +3258,7 @@ void Game::playerStopAutoWalk(uint32_t playerId) { } void Game::playerUseItemEx(uint32_t playerId, const Position &fromPos, uint8_t fromStackPos, uint16_t fromItemId, const Position &toPos, uint8_t toStackPos, uint16_t toItemId) { + metrics::method_latency measure(__METHOD_NAME__); std::shared_ptr player = getPlayerByID(playerId); if (!player) { return; @@ -3368,6 +3388,7 @@ void Game::playerUseItemEx(uint32_t playerId, const Position &fromPos, uint8_t f } void Game::playerUseItem(uint32_t playerId, const Position &pos, uint8_t stackPos, uint8_t index, uint16_t itemId) { + metrics::method_latency measure(__METHOD_NAME__); std::shared_ptr player = getPlayerByID(playerId); if (!player) { return; @@ -3462,6 +3483,7 @@ void Game::playerUseItem(uint32_t playerId, const Position &pos, uint8_t stackPo } void Game::playerUseWithCreature(uint32_t playerId, const Position &fromPos, uint8_t fromStackPos, uint32_t creatureId, uint16_t itemId) { + metrics::method_latency measure(__METHOD_NAME__); std::shared_ptr player = getPlayerByID(playerId); if (!player) { return; @@ -4671,6 +4693,7 @@ void Game::internalCloseTrade(std::shared_ptr player) { } void Game::playerBuyItem(uint32_t playerId, uint16_t itemId, uint8_t count, uint16_t amount, bool ignoreCap /* = false*/, bool inBackpacks /* = false*/) { + metrics::method_latency measure(__METHOD_NAME__); if (amount == 0) { return; } @@ -4709,6 +4732,7 @@ void Game::playerBuyItem(uint32_t playerId, uint16_t itemId, uint8_t count, uint } void Game::playerSellItem(uint32_t playerId, uint16_t itemId, uint8_t count, uint16_t amount, bool ignoreEquipped) { + metrics::method_latency measure(__METHOD_NAME__); if (amount == 0) { return; } @@ -5786,12 +5810,14 @@ void Game::addCreatureCheck(const std::shared_ptr &creature) { } void Game::removeCreatureCheck(const std::shared_ptr &creature) { + metrics::method_latency measure(__METHOD_NAME__); if (creature->inCheckCreaturesVector) { creature->creatureCheck = false; } } void Game::checkCreatures() { + metrics::method_latency measure(__METHOD_NAME__); static size_t index = 0; auto &checkCreatureList = checkCreatureLists[index]; @@ -8467,6 +8493,7 @@ void Game::playerCreateMarketOffer(uint32_t playerId, uint8_t type, uint16_t ite } g_game().removeMoney(player, fee, 0, true); + g_metrics().addCounter("balance_decrease", fee, { { "player", player->getName() }, { "context", "market_fee" } }); } else { uint64_t totalPrice = price * amount; totalPrice += fee; @@ -8476,6 +8503,7 @@ void Game::playerCreateMarketOffer(uint32_t playerId, uint8_t type, uint16_t ite } g_game().removeMoney(player, totalPrice, 0, true); + g_metrics().addCounter("balance_decrease", totalPrice, { { "player", player->getName() }, { "context", "market_offer" } }); } // Send market window again for update item stats and avoid item clone @@ -8537,6 +8565,7 @@ void Game::playerCancelMarketOffer(uint32_t playerId, uint32_t timestamp, uint16 if (offer.type == MARKETACTION_BUY) { player->setBankBalance(player->getBankBalance() + offer.price * offer.amount); + g_metrics().addCounter("balance_decrease", offer.price * offer.amount, { { "player", player->getName() }, { "context", "market_purchase" } }); // Send market window again for update stats player->sendMarketEnter(player->getLastDepotId()); } else { @@ -8697,6 +8726,7 @@ void Game::playerAcceptMarketOffer(uint32_t playerId, uint32_t timestamp, uint16 } player->setBankBalance(player->getBankBalance() + totalPrice); + g_metrics().addCounter("balance_increase", totalPrice, { { "player", player->getName() }, { "context", "market_sale" } }); if (it.id == ITEM_STORE_COIN) { buyerPlayer->getAccount()->addCoins(account::CoinType::TRANSFERABLE, amount, "Purchased on Market"); @@ -8767,6 +8797,7 @@ void Game::playerAcceptMarketOffer(uint32_t playerId, uint32_t timestamp, uint16 player->setBankBalance(0); g_game().removeMoney(player, remainsPrice); } + g_metrics().addCounter("balance_decrease", totalPrice, { { "player", player->getName() }, { "context", "market_purchase" } }); if (it.id == ITEM_STORE_COIN) { player->getAccount()->addCoins(account::CoinType::TRANSFERABLE, amount, "Purchased on Market"); @@ -8821,6 +8852,7 @@ void Game::playerAcceptMarketOffer(uint32_t playerId, uint32_t timestamp, uint16 } sellerPlayer->setBankBalance(sellerPlayer->getBankBalance() + totalPrice); + g_metrics().addCounter("balance_increase", totalPrice, { { "player", sellerPlayer->getName() }, { "context", "market_sale" } }); if (it.id == ITEM_STORE_COIN) { sellerPlayer->getAccount()->registerCoinTransaction(account::CoinTransactionType::REMOVE, account::CoinType::TRANSFERABLE, amount, "Sold on Market"); } @@ -8929,6 +8961,7 @@ void Game::playerAnswerModalWindow(uint32_t playerId, uint32_t modalWindowId, ui } void Game::playerForgeFuseItems(uint32_t playerId, uint16_t itemId, uint8_t tier, bool usedCore, bool reduceTierLoss) { + metrics::method_latency measure(__METHOD_NAME__); std::shared_ptr player = getPlayerByID(playerId); if (!player) { return; @@ -9012,6 +9045,7 @@ void Game::playerBosstiarySlot(uint32_t playerId, uint8_t slotId, uint32_t selec uint8_t removeTimes = player->getRemoveTimes(); uint32_t removePrice = g_ioBosstiary().calculteRemoveBoss(removeTimes); g_game().removeMoney(player, removePrice, 0, true); + g_metrics().addCounter("balance_decrease", removePrice, { { "player", player->getName() }, { "context", "bosstiary_remove" } }); player->addRemoveTime(); } diff --git a/src/game/game.hpp b/src/game/game.hpp index d1676e19823..0ae4065ab06 100644 --- a/src/game/game.hpp +++ b/src/game/game.hpp @@ -236,7 +236,7 @@ class Game { std::shared_ptr transformItem(std::shared_ptr item, uint16_t newId, int32_t newCount = -1); - ReturnValue internalTeleport(std::shared_ptr thing, const Position &newPos, bool pushMove = true, uint32_t flags = 0); + ReturnValue internalTeleport(const std::shared_ptr &thing, const Position &newPos, bool pushMove = true, uint32_t flags = 0); bool internalCreatureTurn(std::shared_ptr creature, Direction dir); diff --git a/src/game/scheduling/task.cpp b/src/game/scheduling/task.cpp index 28418a4a169..1cc4c4cba06 100644 --- a/src/game/scheduling/task.cpp +++ b/src/game/scheduling/task.cpp @@ -10,15 +10,17 @@ #include "pch.hpp" #include "task.hpp" #include "lib/logging/log_with_spd_log.hpp" +#include "lib/metrics/metrics.hpp" std::atomic_uint_fast64_t Task::LAST_EVENT_ID = 0; bool Task::execute() const { + metrics::task_latency measure(context); if (isCanceled()) { return false; } if (hasExpired()) { - g_logger().info("The task '{}' has expired, it has not been executed in {} ms.", getContext(), expiration - utime); + g_logger().info("The task '{}' has expired, it has not been executed in {}.", getContext(), expiration - utime); return false; } diff --git a/src/game/scheduling/task.hpp b/src/game/scheduling/task.hpp index 18dfd5d39de..480072f427b 100644 --- a/src/game/scheduling/task.hpp +++ b/src/game/scheduling/task.hpp @@ -111,7 +111,7 @@ class Task { }; std::function func = nullptr; - std::string_view context; + std::string context; int64_t utime = 0; int64_t expiration = 0; diff --git a/src/game/zones/zone.cpp b/src/game/zones/zone.cpp index fdeccb9bfaa..97ef72cf24f 100644 --- a/src/game/zones/zone.cpp +++ b/src/game/zones/zone.cpp @@ -26,7 +26,7 @@ std::shared_ptr Zone::addZone(const std::string &name, uint32_t zoneID /* return nullZone; } if (zoneID != 0 && zonesByID.contains(zoneID)) { - g_logger().debug("Found with ID {} while adding {}, linking them together...", zoneID, name); + g_logger().trace("[Zone::addZone] Found with ID {} while adding {}, linking them together...", zoneID, name); auto zone = zonesByID[zoneID]; zone->name = name; zones[name] = zone; @@ -244,7 +244,7 @@ void Zone::refresh() { for (const auto &position : getPositions()) { g_game().map.refreshZones(position); } - g_logger().debug("Refreshed zone '{}' in {} milliseconds", name, bm_refresh.duration()); + g_logger().trace("Refreshed zone '{}' in {} milliseconds", name, bm_refresh.duration()); } void Zone::setMonsterVariant(const std::string &variant) { diff --git a/src/io/functions/iologindata_save_player.cpp b/src/io/functions/iologindata_save_player.cpp index 3f2e7a233c3..e6adeb2f4b2 100644 --- a/src/io/functions/iologindata_save_player.cpp +++ b/src/io/functions/iologindata_save_player.cpp @@ -177,6 +177,7 @@ bool IOLoginDataSave::savePlayerFirst(std::shared_ptr player) { // First, an UPDATE query to write the player itself query.str(""); query << "UPDATE `players` SET "; + query << "`name` = " << db.escapeString(player->name) << ","; query << "`level` = " << player->level << ","; query << "`group_id` = " << player->group->id << ","; query << "`vocation` = " << player->getVocationId() << ","; diff --git a/src/io/io_wheel.cpp b/src/io/io_wheel.cpp index 3db059a8023..3a8d69d7dac 100644 --- a/src/io/io_wheel.cpp +++ b/src/io/io_wheel.cpp @@ -49,7 +49,7 @@ namespace InternalPlayerWheel { void registerWheelSpellTable(const T &spellData, const std::string &name, WheelSpellGrade_t gradeType) { if (name == "Any_Focus_Mage_Spell") { for (const std::string &focusSpellName : m_focusSpells) { - g_logger().debug("[{}] registered any spell: {}", __FUNCTION__, focusSpellName); + g_logger().trace("[{}] registered any spell: {}", __FUNCTION__, focusSpellName); registerWheelSpellTable(spellData, focusSpellName, gradeType); } return; @@ -57,7 +57,7 @@ namespace InternalPlayerWheel { auto spell = g_spells().getInstantSpellByName(name); if (spell) { - g_logger().debug("[{}] registering instant spell with name {}", __FUNCTION__, spell->getName()); + g_logger().trace("[{}] registering instant spell with name {}", __FUNCTION__, spell->getName()); // Increase data const auto increaseData = spellData.increase; if (increaseData.damage > 0) { diff --git a/src/io/iobestiary.cpp b/src/io/iobestiary.cpp index 2f66c53ad26..a84d3091a3d 100644 --- a/src/io/iobestiary.cpp +++ b/src/io/iobestiary.cpp @@ -14,6 +14,7 @@ #include "io/iobestiary.hpp" #include "creatures/monsters/monsters.hpp" #include "creatures/players/player.hpp" +#include "lib/metrics/metrics.hpp" SoftSingleton IOBestiary::instanceTracker("IOBestiary"); @@ -336,6 +337,7 @@ void IOBestiary::sendBuyCharmRune(std::shared_ptr player, charmRune_t ru resetCharmRuneCreature(player, charm); player->sendFYIBox("You successfully removed the creature."); player->BestiarysendCharms(); + g_metrics().addCounter("balance_decrease", fee, { { "player", player->getName() }, { "context", "charm_removal" } }); return; } player->sendFYIBox("You don't have enough gold."); diff --git a/src/io/iologindata.cpp b/src/io/iologindata.cpp index 584f36e2085..8531ff0860f 100644 --- a/src/io/iologindata.cpp +++ b/src/io/iologindata.cpp @@ -15,6 +15,7 @@ #include "game/game.hpp" #include "creatures/monsters/monster.hpp" #include "creatures/players/wheel/player_wheel.hpp" +#include "lib/metrics/metrics.hpp" bool IOLoginData::gameWorldAuthentication(const std::string &accountDescriptor, const std::string &password, std::string &characterName, uint32_t &accountId, bool oldProtocol) { account::Account account(accountDescriptor); @@ -74,9 +75,11 @@ void IOLoginData::updateOnlineStatus(uint32_t guid, bool login) { std::ostringstream query; if (login) { + g_metrics().addUpDownCounter("players_online", 1); query << "INSERT INTO `players_online` VALUES (" << guid << ')'; updateOnline[guid] = true; } else { + g_metrics().addUpDownCounter("players_online", -1); query << "DELETE FROM `players_online` WHERE `player_id` = " << guid; updateOnline.erase(guid); } diff --git a/src/io/ioprey.cpp b/src/io/ioprey.cpp index b953d1807f1..2a1c0eebd7a 100644 --- a/src/io/ioprey.cpp +++ b/src/io/ioprey.cpp @@ -14,6 +14,7 @@ #include "config/configmanager.hpp" #include "game/game.hpp" #include "io/ioprey.hpp" +#include "lib/metrics/metrics.hpp" // Prey class PreySlot::PreySlot(PreySlot_t id) : @@ -301,6 +302,8 @@ void IOPrey::parsePreyAction(std::shared_ptr player, PreySlot_t slotId, return; } else if (slot->freeRerollTimeStamp <= OTSYS_TIME()) { slot->freeRerollTimeStamp = OTSYS_TIME() + g_configManager().getNumber(PREY_FREE_REROLL_TIME, __FUNCTION__) * 1000; + } else { + g_metrics().addCounter("balance_decrease", player->getPreyRerollPrice(), { { "player", player->getName() }, { "context", "prey_reroll" } }); } slot->eraseBonus(true); @@ -406,6 +409,8 @@ void IOPrey::parseTaskHuntingAction(std::shared_ptr player, PreySlot_t s return; } else if (slot->freeRerollTimeStamp <= OTSYS_TIME()) { slot->freeRerollTimeStamp = OTSYS_TIME() + g_configManager().getNumber(TASK_HUNTING_FREE_REROLL_TIME, __FUNCTION__) * 1000; + } else { + g_metrics().addCounter("balance_decrease", player->getTaskHuntingRerollPrice(), { { "player", player->getName() }, { "context", "hunting_task_reroll" } }); } slot->eraseTask(); @@ -465,6 +470,7 @@ void IOPrey::parseTaskHuntingAction(std::shared_ptr player, PreySlot_t s return; } + g_metrics().addCounter("balance_decrease", player->getTaskHuntingRerollPrice(), { { "player", player->getName() }, { "context", "hunting_task_cancel" } }); slot->eraseTask(); slot->reloadReward(); slot->state = PreyTaskDataState_Selection; diff --git a/src/lib/CMakeLists.txt b/src/lib/CMakeLists.txt index 00b8329f456..402c6a34a79 100644 --- a/src/lib/CMakeLists.txt +++ b/src/lib/CMakeLists.txt @@ -1,5 +1,6 @@ target_sources(${PROJECT_NAME}_lib PRIVATE di/soft_singleton.cpp logging/log_with_spd_log.cpp + metrics/metrics.cpp thread/thread_pool.cpp ) diff --git a/src/lib/metrics/metrics.cpp b/src/lib/metrics/metrics.cpp new file mode 100644 index 00000000000..77a4bb8b3a8 --- /dev/null +++ b/src/lib/metrics/metrics.cpp @@ -0,0 +1,105 @@ +/** + * Canary - A free and open-source MMORPG server emulator + * Copyright (©) 2019-2022 OpenTibiaBR + * Repository: https://github.com/opentibiabr/canary + * License: https://github.com/opentibiabr/canary/blob/main/LICENSE + * Contributors: https://github.com/opentibiabr/canary/graphs/contributors + * Website: https://docs.opentibiabr.com/ + */ + +#include "metrics.hpp" +#include "lib/di/container.hpp" + +using namespace metrics; + +Metrics &Metrics::getInstance() { + return inject(); +} + +void Metrics::init(Options opts) { + if (!opts.enableOStreamExporter && !opts.enablePrometheusExporter) { + return; + } + + auto provider = metrics_sdk::MeterProviderFactory::Create(); + auto* p = static_cast(provider.get()); + + if (opts.enableOStreamExporter) { + opts.ostreamOptions.export_timeout_millis = std::chrono::milliseconds(1000); + auto ostreamExporter = metrics_exporter::OStreamMetricExporterFactory::Create(); + auto reader = metrics_sdk::PeriodicExportingMetricReaderFactory::Create(std::move(ostreamExporter), opts.ostreamOptions); + p->AddMetricReader(std::move(reader)); + } + + if (opts.enablePrometheusExporter) { + g_logger().info("Starting Prometheus exporter at {}", opts.prometheusOptions.url); + auto prometheusExporter = metrics_exporter::PrometheusExporterFactory::Create(opts.prometheusOptions); + p->AddMetricReader(std::move(prometheusExporter)); + } + + for (auto name : latencyNames) { + auto instrumentSelector = metrics_sdk::InstrumentSelectorFactory::Create(metrics_sdk::InstrumentType::kHistogram, name, "us"); + auto meterSelector = metrics_sdk::MeterSelectorFactory::Create("performance", otelVersion, otelSchema); + + auto aggregationConfig = std::make_unique(); + // TODO: migrate to ExponentialHistogramIndexer when that's available + // clang-format off + aggregationConfig->boundaries_ = { + // Ultra-fine granularity below 10µs + 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, + 12.0, 14.0, 16.0, 18.0, 20.0, 22.0, 24.0, 26.0, 28.0, 30.0, + 35.0, 40.0, 45.0, 50.0, 55.0, 60.0, 65.0, 70.0, 75.0, 80.0, + 85.0, 90.0, 95.0, 100.0, + // Fine granularity between 100µs and 500µs + 120.0, 140.0, 160.0, 180.0, 200.0, 225.0, 250.0, 275.0, 300.0, 325.0, 350.0, 375.0, 400.0, 425.0, 450.0, 475.0, 500.0, + // Moderate granularity from 500µs to 1ms (1000µs) + 550.0, 600.0, 650.0, 700.0, 750.0, 800.0, 850.0, 900.0, 950.0, 1000.0, + // Coarser granularity for higher latencies (in microseconds) + 1100.0, 1200.0, 1300.0, 1400.0, 1500.0, 2000.0, 2500.0, 3000.0, 3500.0, 4000.0, 4500.0, 5000.0, 10000.0, + // Very coarse granularity for latencies in milliseconds + 20000.0, 30000.0, 40000.0, 50000.0, 60000.0,70000.0, 80000.0, 90000.0, 100000.0, + 200000.0, 300000.0, 400000.0, 500000.0, 600000.0,700000.0, 800000.0, 900000.0, 1000000.0, + // Even coarser granularity for latencies in seconds + 2000000.0, 3000000.0, 4000000.0, 5000000.0, 6000000.0,7000000.0, 8000000.0, 9000000.0, 10000000.0, + 20000000.0, 30000000.0, 40000000.0, 50000000.0, 60000000.0,70000000.0, 80000000.0, 90000000.0, 100000000.0, + // And finally a catch-all for anything else + std::numeric_limits::infinity(), + }; + // clang-format on + + auto view = metrics_sdk::ViewFactory::Create(name, "Latency", "us", metrics_sdk::AggregationType::kHistogram, std::move(aggregationConfig)); + p->AddView(std::move(instrumentSelector), std::move(meterSelector), std::move(view)); + + latencyHistograms[name] = getMeter()->CreateDoubleHistogram(name, "Latency", "us"); + } + + metrics_api::Provider::SetMeterProvider(std::move(provider)); +} + +void Metrics::shutdown() { + std::shared_ptr none; + metrics_api::Provider::SetMeterProvider(none); +} + +ScopedLatency::ScopedLatency(std::string_view name, const std::string &histogramName, const std::string &scopeKey) : + ScopedLatency(name, g_metrics().latencyHistograms[histogramName], { { scopeKey, std::string(name) } }, g_metrics().defaultContext) { + if (histogram == nullptr) { + stopped = true; + return; + } +} + +ScopedLatency::~ScopedLatency() { + stop(); +} + +void ScopedLatency::stop() { + if (stopped) { + return; + } + stopped = true; + auto end = std::chrono::steady_clock::now(); + double elapsed = static_cast(std::chrono::duration_cast(end - begin).count()) / 1000; + auto attrskv = opentelemetry::common::KeyValueIterableView { attrs }; + histogram->Record(elapsed, attrskv, context); +} diff --git a/src/lib/metrics/metrics.hpp b/src/lib/metrics/metrics.hpp new file mode 100644 index 00000000000..116676fb3b7 --- /dev/null +++ b/src/lib/metrics/metrics.hpp @@ -0,0 +1,171 @@ +/** + * Canary - A free and open-source MMORPG server emulator + * Copyright (©) 2019-2022 OpenTibiaBR + * Repository: https://github.com/opentibiabr/canary + * License: https://github.com/opentibiabr/canary/blob/main/LICENSE + * Contributors: https://github.com/opentibiabr/canary/graphs/contributors + * Website: https://docs.opentibiabr.com/ + */ + +#pragma once + +#include "game/scheduling/dispatcher.hpp" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace metrics_sdk = opentelemetry::sdk::metrics; +namespace common = opentelemetry::common; +namespace metrics_exporter = opentelemetry::exporter::metrics; +namespace metrics_api = opentelemetry::metrics; + +constexpr std::string_view methodName(const char* s) { + std::string_view prettyFunction(s); + size_t bracket = prettyFunction.rfind("("); + size_t space = prettyFunction.rfind(" ", bracket) + 1; + return prettyFunction.substr(space, bracket - space); +} + +#if defined(__GNUC__) || defined(__clang__) + #define __METHOD_NAME__ methodName(__PRETTY_FUNCTION__) +#elif defined(_MSC_VER) + #define __METHOD_NAME__ methodName(__FUNCSIG__) +#else + #error "Compiler not supported" +#endif + +namespace metrics { + using Meter = opentelemetry::nostd::shared_ptr; + + template + using Histogram = opentelemetry::nostd::unique_ptr>; + + template + using Counter = opentelemetry::nostd::unique_ptr>; + + template + using UpDownCounter = opentelemetry::nostd::unique_ptr>; + + struct Options { + bool enablePrometheusExporter; + bool enableOStreamExporter; + + metrics_sdk::PeriodicExportingMetricReaderOptions ostreamOptions; + metrics_exporter::PrometheusExporterOptions prometheusOptions; + }; + + class ScopedLatency { + public: + explicit ScopedLatency(std::string_view name, const std::string &histogramName, const std::string &scopeKey); + explicit ScopedLatency(std::string_view name, Histogram &histogram, std::map attrs = {}, opentelemetry::context::Context context = opentelemetry::context::Context()) : + begin(std::chrono::steady_clock::now()), histogram(histogram), attrs(attrs), context(context) { + } + + void stop(); + + ~ScopedLatency(); + + private: + opentelemetry::context::Context context; + Histogram &histogram; + std::chrono::steady_clock::time_point begin; + std::map attrs; + bool stopped { false }; + }; + +#define DEFINE_LATENCY_CLASS(class_name, histogram_name, category) \ + class class_name##_latency final : public ScopedLatency { \ + public: \ + class_name##_latency(std::string_view name) : \ + ScopedLatency(name, histogram_name "_latency", category) { } \ + } + + DEFINE_LATENCY_CLASS(method, "method", "method"); + DEFINE_LATENCY_CLASS(lua, "lua", "scope"); + DEFINE_LATENCY_CLASS(query, "query", "truncated_query"); + DEFINE_LATENCY_CLASS(task, "task", "task"); + DEFINE_LATENCY_CLASS(lock, "lock", "scope"); + + const std::vector latencyNames { + "method_latency", + "lua_latency", + "query_latency", + "task_latency", + "lock_latency", + }; + + class Metrics final { + public: + Metrics() { } + ~Metrics() = default; + + void init(Options opts); + void shutdown(); + + static Metrics &getInstance(); + + void addCounter(std::string_view name, double value, std::map attrs = {}) { + std::scoped_lock lock(mutex_); + if (!getMeter()) { + return; + } + if (counters.find(name) == counters.end()) { + std::string nameStr(name); + counters[name] = getMeter()->CreateDoubleCounter(nameStr); + } + auto attrskv = opentelemetry::common::KeyValueIterableView { attrs }; + counters[name]->Add(value, attrskv); + } + + void addUpDownCounter(std::string_view name, int value, std::map attrs = {}) { + std::scoped_lock lock(mutex_); + if (!getMeter()) { + return; + } + if (upDownCounters.find(name) == upDownCounters.end()) { + std::string nameStr(name); + upDownCounters[name] = getMeter()->CreateInt64UpDownCounter(nameStr); + } + auto attrskv = opentelemetry::common::KeyValueIterableView { attrs }; + upDownCounters[name]->Add(value, attrskv); + } + + friend class ScopedLatency; + + protected: + opentelemetry::context::Context defaultContext {}; + phmap::parallel_flat_hash_map> latencyHistograms; + phmap::flat_hash_map> upDownCounters; + phmap::flat_hash_map> counters; + + Meter getMeter() { + auto provider = metrics_api::Provider::GetMeterProvider(); + if (provider == nullptr) { + return {}; + } + return provider->GetMeter(meterName, otelVersion); + } + + private: + std::mutex mutex_; + + std::string meterName { "stats" }; + std::string otelVersion { "1.2.0" }; + std::string otelSchema { "https://opentelemetry.io/schemas/1.2.0" }; + }; +} + +constexpr auto g_metrics + = metrics::Metrics::getInstance; diff --git a/src/lua/functions/core/CMakeLists.txt b/src/lua/functions/core/CMakeLists.txt index 6f4168f0fac..1cf919da3ec 100644 --- a/src/lua/functions/core/CMakeLists.txt +++ b/src/lua/functions/core/CMakeLists.txt @@ -10,6 +10,7 @@ target_sources(${PROJECT_NAME}_lib PRIVATE libs/db_functions.cpp libs/result_functions.cpp libs/logger_functions.cpp + libs/metrics_functions.cpp libs/kv_functions.cpp network/network_message_functions.cpp network/webhook_functions.cpp diff --git a/src/lua/functions/core/game/game_functions.cpp b/src/lua/functions/core/game/game_functions.cpp index cab8c599a21..633f39489de 100644 --- a/src/lua/functions/core/game/game_functions.cpp +++ b/src/lua/functions/core/game/game_functions.cpp @@ -611,13 +611,23 @@ int GameFunctions::luaGameHasDistanceEffect(lua_State* L) { } int GameFunctions::luaGameGetOfflinePlayer(lua_State* L) { - uint32_t playerId = getNumber(L, 1); - - auto offlinePlayer = std::make_shared(nullptr); - if (!IOLoginData::loadPlayerById(offlinePlayer, playerId)) { + // Game.getOfflinePlayer(name or id) + std::shared_ptr player = nullptr; + if (isNumber(L, 1)) { + uint32_t id = getNumber(L, 1); + if (id >= Player::getFirstID() && id <= Player::getLastID()) { + player = g_game().getPlayerByID(id, true); + } else { + player = g_game().getPlayerByGUID(id, true); + } + } else if (isString(L, 1)) { + auto name = getString(L, 1); + player = g_game().getPlayerByName(name, true); + } + if (!player) { lua_pushnil(L); } else { - pushUserdata(L, offlinePlayer); + pushUserdata(L, player); setMetatable(L, -1, "Player"); } diff --git a/src/lua/functions/core/libs/core_libs_functions.hpp b/src/lua/functions/core/libs/core_libs_functions.hpp index 29b8c8896e7..4badabe262f 100644 --- a/src/lua/functions/core/libs/core_libs_functions.hpp +++ b/src/lua/functions/core/libs/core_libs_functions.hpp @@ -14,6 +14,7 @@ #include "lua/functions/core/libs/db_functions.hpp" #include "lua/functions/core/libs/result_functions.hpp" #include "lua/functions/core/libs/logger_functions.hpp" +#include "lua/functions/core/libs/metrics_functions.hpp" #include "lua/functions/core/libs/kv_functions.hpp" class CoreLibsFunctions final : LuaScriptInterface { @@ -23,6 +24,7 @@ class CoreLibsFunctions final : LuaScriptInterface { DBFunctions::init(L); ResultFunctions::init(L); LoggerFunctions::init(L); + MetricsFunctions::init(L); KVFunctions::init(L); } diff --git a/src/lua/functions/core/libs/metrics_functions.cpp b/src/lua/functions/core/libs/metrics_functions.cpp new file mode 100644 index 00000000000..4c0b916c94d --- /dev/null +++ b/src/lua/functions/core/libs/metrics_functions.cpp @@ -0,0 +1,40 @@ +/** + * Canary - A free and open-source MMORPG server emulator + * Copyright (©) 2019-2022 OpenTibiaBR + * Repository: https://github.com/opentibiabr/canary + * License: https://github.com/opentibiabr/canary/blob/main/LICENSE + * Contributors: https://github.com/opentibiabr/canary/graphs/contributors + * Website: https://docs.opentibiabr.com/ + */ + +#include "pch.hpp" + +#include "lua/functions/core/libs/metrics_functions.hpp" +#include "lib/metrics/metrics.hpp" + +void MetricsFunctions::init(lua_State* L) { + registerTable(L, "metrics"); + registerMethod(L, "metrics", "addCounter", MetricsFunctions::luaMetricsAddCounter); +} + +// Metrics +int MetricsFunctions::luaMetricsAddCounter(lua_State* L) { + // metrics.addCounter(name, value, attributes) + auto name = getString(L, 1); + auto value = getNumber(L, 2); + auto attributes = getAttributes(L, 3); + g_metrics().addCounter(name, value, attributes); + return 1; +} + +std::map MetricsFunctions::getAttributes(lua_State* L, int32_t index) { + std::map attributes; + if (isTable(L, index)) { + lua_pushnil(L); + while (lua_next(L, index) != 0) { + attributes[getString(L, -2)] = getString(L, -1); + lua_pop(L, 1); + } + } + return attributes; +} diff --git a/src/lua/functions/core/libs/metrics_functions.hpp b/src/lua/functions/core/libs/metrics_functions.hpp new file mode 100644 index 00000000000..47d492c3d42 --- /dev/null +++ b/src/lua/functions/core/libs/metrics_functions.hpp @@ -0,0 +1,21 @@ +/** + * Canary - A free and open-source MMORPG server emulator + * Copyright (©) 2019-2022 OpenTibiaBR + * Repository: https://github.com/opentibiabr/canary + * License: https://github.com/opentibiabr/canary/blob/main/LICENSE + * Contributors: https://github.com/opentibiabr/canary/graphs/contributors + * Website: https://docs.opentibiabr.com/ + */ + +#pragma once + +#include "lua/scripts/luascript.hpp" + +class MetricsFunctions final : public LuaScriptInterface { +public: + static void init(lua_State* L); + +private: + static int luaMetricsAddCounter(lua_State* L); + static std::map getAttributes(lua_State* L, int32_t index); +}; diff --git a/src/lua/functions/creatures/player/player_functions.cpp b/src/lua/functions/creatures/player/player_functions.cpp index 5b646264d95..df80a42b13c 100644 --- a/src/lua/functions/creatures/player/player_functions.cpp +++ b/src/lua/functions/creatures/player/player_functions.cpp @@ -20,6 +20,7 @@ #include "items/item.hpp" #include "lua/functions/creatures/player/player_functions.hpp" #include "game/scheduling/save_manager.hpp" +#include "game/scheduling/dispatcher.hpp" #include "map/spectators.hpp" int PlayerFunctions::luaPlayerSendInventory(lua_State* L) { diff --git a/src/lua/scripts/luascript.cpp b/src/lua/scripts/luascript.cpp index e4f230a5d69..adefef958ed 100644 --- a/src/lua/scripts/luascript.cpp +++ b/src/lua/scripts/luascript.cpp @@ -11,6 +11,7 @@ #include "lua/scripts/luascript.hpp" #include "lua/scripts/lua_environment.hpp" +#include "lib/metrics/metrics.hpp" ScriptEnvironment::DBResultMap ScriptEnvironment::tempResults; uint32_t ScriptEnvironment::lastResultId = 0; @@ -236,7 +237,35 @@ bool LuaScriptInterface::closeState() { return true; } +std::string LuaScriptInterface::getMetricsScope() { + metrics::method_latency measure(__METHOD_NAME__); + int32_t scriptId; + int32_t callbackId; + bool timerEvent; + LuaScriptInterface* scriptInterface; + getScriptEnv()->getEventInfo(scriptId, scriptInterface, callbackId, timerEvent); + + std::string name; + if (scriptId == EVENT_ID_LOADING) { + name = "loading"; + } else if (scriptId == EVENT_ID_USER) { + name = "user"; + } else { + name = scriptInterface->getFileById(scriptId); + if (name.empty()) { + return "unknown"; + } + auto pos = name.find("data"); + if (pos != std::string::npos) { + name = name.substr(pos); + } + } + + return fmt::format("{}:{}", name, timerEvent ? "timer" : ""); +} + bool LuaScriptInterface::callFunction(int params) { + metrics::lua_latency measure(getMetricsScope()); bool result = false; int size = lua_gettop(luaState); if (protectedCall(luaState, params, 1) != 0) { @@ -255,6 +284,7 @@ bool LuaScriptInterface::callFunction(int params) { } void LuaScriptInterface::callVoidFunction(int params) { + metrics::lua_latency measure(getMetricsScope()); int size = lua_gettop(luaState); if (protectedCall(luaState, params, 0) != 0) { LuaScriptInterface::reportError(nullptr, LuaScriptInterface::popString(luaState)); diff --git a/src/lua/scripts/luascript.hpp b/src/lua/scripts/luascript.hpp index 8f0b3b36c19..b7845c84558 100644 --- a/src/lua/scripts/luascript.hpp +++ b/src/lua/scripts/luascript.hpp @@ -73,6 +73,8 @@ class LuaScriptInterface : public LuaFunctionsLoader { std::map cacheFiles; private: + std::string getMetricsScope(); + std::string lastLuaError; std::string interfaceName; std::string loadingFile; diff --git a/src/map/house/house.cpp b/src/map/house/house.cpp index c4bf34c95b4..fb2430e05a6 100644 --- a/src/map/house/house.cpp +++ b/src/map/house/house.cpp @@ -15,6 +15,7 @@ #include "game/game.hpp" #include "items/bed.hpp" #include "game/scheduling/save_manager.hpp" +#include "lib/metrics/metrics.hpp" House::House(uint32_t houseId) : id(houseId) { } @@ -788,6 +789,7 @@ void Houses::payHouses(RentPeriod_t rentPeriod) const { if (player->getBankBalance() >= rent) { g_game().removeMoney(player, rent, 0, true); + g_metrics().addCounter("balance_decrease", rent, { { "player", player->getName() }, { "context", "house_rent" } }); time_t paidUntil = currentTime; switch (rentPeriod) { diff --git a/src/server/server.hpp b/src/server/server.hpp index 1760fdafa85..ae6f805e4ff 100644 --- a/src/server/server.hpp +++ b/src/server/server.hpp @@ -10,6 +10,7 @@ #pragma once #include "lib/logging/logger.hpp" +#include "lib/metrics/metrics.hpp" #include "server/network/connection/connection.hpp" #include "server/signals.hpp" diff --git a/vcpkg.json b/vcpkg.json index dfe6b261241..7201d4a5556 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -2,25 +2,30 @@ "name": "canary", "version-string": "1.0.0", "dependencies": [ + "abseil", "argon2", "asio", "bext-di", "bext-ut", - "eventpp", - "pugixml", - "spdlog", "curl", + "eventpp", "jsoncpp", - "protobuf", - "parallel-hashmap", + "luajit", "magic-enum", - "zlib", "mio", - "luajit", - "abseil", + { + "name": "opentelemetry-cpp", + "default-features": true, + "features": ["otlp-http", "prometheus"] + }, + "parallel-hashmap", + "protobuf", + "pugixml", + "spdlog", + "zlib", { "name": "libmariadb", - "features": [ "mariadbclient" ] + "features": ["mariadbclient"] }, { "name": "gmp", @@ -31,5 +36,5 @@ "platform": "windows" } ], - "builtin-baseline": "c9fa965c2a1b1334469b4539063f3ce95383653c" + "builtin-baseline": "98a562a04cd03728f399e79e1b37bcccb5a69b37" } diff --git a/vcproj/canary.vcxproj b/vcproj/canary.vcxproj index bdb891be8df..e387dbddbea 100644 --- a/vcproj/canary.vcxproj +++ b/vcproj/canary.vcxproj @@ -108,6 +108,7 @@ + @@ -128,6 +129,7 @@ + @@ -136,6 +138,7 @@ + @@ -303,6 +306,7 @@ + @@ -325,6 +329,7 @@ + @@ -502,6 +507,8 @@ true true true + Default + /Zc:__cplusplus %(AdditionalOptions) Console @@ -534,6 +541,7 @@ true true true + /Zc:__cplusplus %(AdditionalOptions) Console @@ -551,4 +559,4 @@ - + \ No newline at end of file diff --git a/vcproj/settings.props b/vcproj/settings.props index 9f01a78902b..1f7471f48c6 100644 --- a/vcproj/settings.props +++ b/vcproj/settings.props @@ -24,6 +24,15 @@ jsoncpp.lib; abseil_dll.lib; argon2.lib; + opentelemetry_common.lib; + opentelemetry_resources.lib; + opentelemetry_metrics.lib; + opentelemetry_exporter_ostream_metrics.lib; + opentelemetry_exporter_prometheus.lib; + prometheus-cpp-core.lib; + prometheus-cpp-pull.lib; + civetweb.lib; + civetweb-cpp.lib comctl32.lib; @@ -41,6 +50,15 @@ jsoncpp.lib; abseil_dll.lib; argon2.lib; + opentelemetry_common.lib; + opentelemetry_resources.lib; + opentelemetry_metrics.lib; + opentelemetry_exporter_ostream_metrics.lib; + opentelemetry_exporter_prometheus.lib; + prometheus-cpp-core.lib; + prometheus-cpp-pull.lib; + civetweb.lib; + civetweb-cpp.lib From e5bd83a6691db56dde9fe96a5bdde07e00653c03 Mon Sep 17 00:00:00 2001 From: Luan Luciano Date: Sat, 9 Dec 2023 16:27:40 -0300 Subject: [PATCH 02/28] improve: add context parameter to addString() (#1826) Make the debug message: "[NetworkMessage::addString] - Value string is empty" less vague by adding a context parameter to it. - addString(value, function) --- .../scripts/actions/other/outfit_memorial.lua | 4 +- data/libs/functions/player.lua | 2 +- data/libs/functions/quests.lua | 16 +- data/libs/hireling_lib.lua | 2 +- data/modules/scripts/blessings/blessings.lua | 2 +- .../scripts/daily_reward/daily_reward.lua | 12 +- data/modules/scripts/gamestore/init.lua | 50 +-- .../network/network_message_functions.cpp | 5 +- src/server/network/message/networkmessage.cpp | 8 +- src/server/network/message/networkmessage.hpp | 2 +- src/server/network/protocol/protocolgame.cpp | 312 +++++++++--------- src/server/network/protocol/protocollogin.cpp | 12 +- .../network/protocol/protocolstatus.cpp | 28 +- 13 files changed, 229 insertions(+), 226 deletions(-) diff --git a/data-otservbr-global/scripts/actions/other/outfit_memorial.lua b/data-otservbr-global/scripts/actions/other/outfit_memorial.lua index d722bb13274..6061d5f11b9 100644 --- a/data-otservbr-global/scripts/actions/other/outfit_memorial.lua +++ b/data-otservbr-global/scripts/actions/other/outfit_memorial.lua @@ -39,7 +39,7 @@ function outfitMemorial.onUse(player, item, fromPosition, target, toPosition, is for i = 1, 3 do response:addU16(#goldenOutfitCache[i]) for j = 1, #goldenOutfitCache[i] do - response:addString(goldenOutfitCache[i][j]) + response:addString(goldenOutfitCache[i][j], "outfitMemorial.onUse - goldenOutfitCache[i][j]") end end @@ -52,7 +52,7 @@ function outfitMemorial.onUse(player, item, fromPosition, target, toPosition, is for i = 1, 3 do response:addU16(#royalOutfitCache[i]) for j = 1, #royalOutfitCache[i] do - response:addString(royalOutfitCache[i][j]) + response:addString(royalOutfitCache[i][j], "outfitMemorial.onUse - royalOutfitCache[i][j]") end end diff --git a/data/libs/functions/player.lua b/data/libs/functions/player.lua index 90565679a12..7be4b743228 100644 --- a/data/libs/functions/player.lua +++ b/data/libs/functions/player.lua @@ -64,7 +64,7 @@ function Player.sendExtendedOpcode(self, opcode, buffer) local networkMessage = NetworkMessage() networkMessage:addByte(0x32) networkMessage:addByte(opcode) - networkMessage:addString(buffer) + networkMessage:addString(buffer, "Player.sendExtendedOpcode - buffer") networkMessage:sendToPlayer(self) networkMessage:delete() return true diff --git a/data/libs/functions/quests.lua b/data/libs/functions/quests.lua index 66414115eaf..02487c55031 100644 --- a/data/libs/functions/quests.lua +++ b/data/libs/functions/quests.lua @@ -297,7 +297,7 @@ function Player.sendQuestLog(self) for questId = 1, #Quests do if self:questIsStarted(questId) then msg:addU16(questId) - msg:addString(Quests[questId].name .. (self:questIsCompleted(questId) and " (completed)" or "")) + msg:addString(Quests[questId].name .. (self:questIsCompleted(questId) and " (completed)" or ""), "Player.sendQuestLog") msg:addByte(self:questIsCompleted(questId)) end end @@ -319,8 +319,8 @@ function Player.sendQuestLine(self, questId) if self:getClient().version >= 1200 then msg:addU16(self:getMissionId(questId, missionId)) end - msg:addString(self:getMissionName(questId, missionId)) - msg:addString(self:getMissionDescription(questId, missionId)) + msg:addString(self:getMissionName(questId, missionId), "Player.sendQuestLine - self:getMissionName(questId, missionId)") + msg:addString(self:getMissionDescription(questId, missionId), "Player.sendQuestLine - self:getMissionDescription(questId, missionId)") end end end @@ -338,9 +338,9 @@ function Player.sendTrackedQuests(self, remainingQuests, missions) msg:addByte(#missions) for _, mission in ipairs(missions) do msg:addU16(mission.missionId) - msg:addString(mission.questName) - msg:addString(mission.missionName) - msg:addString(mission.missionDesc) + msg:addString(mission.questName, "Player.sendTrackedQuests - mission.questName") + msg:addString(mission.missionName, "Player.sendTrackedQuests - mission.missionName") + msg:addString(mission.missionDesc, "Player.sendTrackedQuests - mission.missionDesc") end msg:sendToPlayer(self) msg:delete() @@ -351,8 +351,8 @@ function Player.sendUpdateTrackedQuest(self, mission) msg:addByte(0xD0) msg:addByte(0x00) msg:addU16(mission.missionId) - msg:addString(mission.missionName) - msg:addString(mission.missionDesc) + msg:addString(mission.missionName, "Player.sendUpdateTrackedQuest - mission.missionName") + msg:addString(mission.missionDesc, "Player.sendUpdateTrackedQuest - mission.missionDesc") msg:sendToPlayer(self) msg:delete() end diff --git a/data/libs/hireling_lib.lua b/data/libs/hireling_lib.lua index 92c5436e15d..ee52150c5ea 100644 --- a/data/libs/hireling_lib.lua +++ b/data/libs/hireling_lib.lua @@ -609,7 +609,7 @@ function Player:sendHirelingOutfitWindow(hireling) msg:addU16(#availableOutfits) for _, outfit in ipairs(availableOutfits) do msg:addU16(outfit.lookType) - msg:addString(outfit.name) + msg:addString(outfit.name, "Player:sendHirelingOutfitWindow - outfit.name") msg:addByte(0x00) -- addons msg:addByte(0x00) -- Store bool end diff --git a/data/modules/scripts/blessings/blessings.lua b/data/modules/scripts/blessings/blessings.lua index 0582c6154ba..2f3aa90fe6b 100644 --- a/data/modules/scripts/blessings/blessings.lua +++ b/data/modules/scripts/blessings/blessings.lua @@ -183,7 +183,7 @@ Blessings.sendBlessDialog = function(player) for i = 1, historyAmount do msg:addU32(os.time()) -- timestamp msg:addByte(0) -- Color message (1 - Red | 0 = White loss) - msg:addString("Blessing Purchased") -- History message + msg:addString("Blessing Purchased", "Blessings.sendBlessDialog - Blessing Purchased") -- History message end msg:sendToPlayer(player) diff --git a/data/modules/scripts/daily_reward/daily_reward.lua b/data/modules/scripts/daily_reward/daily_reward.lua index 640ec0b2203..de4116f7ed3 100644 --- a/data/modules/scripts/daily_reward/daily_reward.lua +++ b/data/modules/scripts/daily_reward/daily_reward.lua @@ -367,7 +367,7 @@ function Player.sendOpenRewardWall(self, shrine) msg:addByte(self:getDayStreak()) -- current reward? day = 0, day 1, ... this should be resetted to 0 every week imo if DailyReward.isRewardTaken(self:getId()) then -- state (player already took reward? but just make sure noone wpe) msg:addByte(1) - msg:addString("Sorry, you have already taken your daily reward or you are unable to collect it.") -- Unknown message + msg:addString("Sorry, you have already taken your daily reward or you are unable to collect it.", "Player.sendOpenRewardWall - Sorry, you have already taken your daily reward or you are unable to collect it.") -- Unknown message if self:getJokerTokens() > 0 then msg:addByte(1) msg:addU16(self:getJokerTokens()) @@ -529,7 +529,7 @@ function Player.sendError(self, error) local msg = NetworkMessage() msg:addByte(ServerPackets.ShowDialog) msg:addByte(0x14) - msg:addString(error) + msg:addString(error, "Player.sendError - error") msg:sendToPlayer(self) end @@ -562,7 +562,7 @@ function Player.sendRewardHistory(self) for k, entry in ipairs(entries) do msg:addU32(entry.timestamp) msg:addByte(0) -- (self:isPremium() and 0 or 0) - msg:addString(entry.description) + msg:addString(entry.description, "Player.sendRewardHistory - entry.description") msg:addU16(entry.daystreak + 1) end msg:sendToPlayer(self) @@ -595,7 +595,7 @@ function Player.readDailyReward(self, msg, currentDay, state) local itemName = itemType:getArticle() .. " " .. itemType:getName() local itemWeight = itemType:getWeight() msg:addU16(itemId) - msg:addString(itemName) + msg:addString(itemName, "Player.readDailyReward - itemName") msg:addU32(itemWeight) end end @@ -605,7 +605,7 @@ function Player.readDailyReward(self, msg, currentDay, state) -- for i = 1, #rewards.things do -- msg:addByte(DAILY_REWARD_SYSTEM_TYPE_OTHER) -- type -- msg:addU16(rewards.things[i].id * 100) - -- msg:addString(rewards.things[i].name) + -- msg:addString(rewards.things[i].name, "Player.readDailyReward - rewards.things[i].name") -- msg:addByte(rewards.things[i].quantity) -- end elseif type == DAILY_REWARD_TYPE_PREY_REROLL then @@ -636,7 +636,7 @@ function Player.sendDailyReward(self) local maxBonus = 7 msg:addByte(maxBonus - 1) for i = 2, maxBonus do - msg:addString(DailyReward.strikeBonuses[i].text) + msg:addString(DailyReward.strikeBonuses[i].text, "Player.sendDailyReward - DailyReward.strikeBonuses[i].text") msg:addByte(i) end msg:addByte(1) -- Unknown diff --git a/data/modules/scripts/gamestore/init.lua b/data/modules/scripts/gamestore/init.lua index 14d15c48b81..981db5cec6b 100644 --- a/data/modules/scripts/gamestore/init.lua +++ b/data/modules/scripts/gamestore/init.lua @@ -572,9 +572,9 @@ function openStore(playerId) GameStoreCategories, GameStoreCount = GameStore.Categories, #GameStore.Categories end local addCategory = function(category) - msg:addString(category.name) + msg:addString(category.name, "openStore - category.name") if oldProtocol then - msg:addString(category.description) + msg:addString(category.description, "openStore - category.description") end msg:addByte(category.state or GameStore.States.STATE_NONE) @@ -582,13 +582,13 @@ function openStore(playerId) msg:addByte(size) for _, icon in ipairs(category.icons) do if size > 0 then - msg:addString(icon) + msg:addString(icon, "openStore - icon") size = size - 1 end end if category.parent then - msg:addString(category.parent) + msg:addString(category.parent, "openStore - category.parent") else msg:addU16(0) end @@ -608,7 +608,7 @@ function sendOfferDescription(player, offerId, description) local msg = NetworkMessage() msg:addByte(0xEA) msg:addU32(offerId) - msg:addString(description) + msg:addString(description, "sendOfferDescription - description") msg:sendToPlayer(player) end @@ -777,7 +777,7 @@ function sendShowStoreOffers(playerId, category, redirectId) local msg = NetworkMessage() local haveSaleOffer = 0 msg:addByte(GameStore.SendingPackets.S_StoreOffers) - msg:addString(category.name) + msg:addString(category.name, "sendShowStoreOffers - category.name") local categoryLimit = 65535 if oldProtocol then @@ -844,7 +844,7 @@ function sendShowStoreOffers(playerId, category, redirectId) msg:addU16(#disableReasons) for _, reason in ipairs(disableReasons) do - msg:addString(reason) + msg:addString(reason, "sendShowStoreOffers - reason") end if count > categoryLimit then @@ -855,7 +855,7 @@ function sendShowStoreOffers(playerId, category, redirectId) for name, offer in pairs(offers) do if count > 0 then count = count - 1 - msg:addString(name) + msg:addString(name, "sendShowStoreOffers - name") msg:addByte(#offer.offers) sendOfferDescription(player, offer.id and offer.id or 0xFFFF, offer.description) for _, off in ipairs(offer.offers) do @@ -900,7 +900,7 @@ function sendShowStoreOffers(playerId, category, redirectId) msg:addByte(type) if type == GameStore.ConverType.SHOW_NONE then - msg:addString(offer.icons[1]) + msg:addString(offer.icons[1], "sendShowStoreOffers - offer.icons[1]") elseif type == GameStore.ConverType.SHOW_MOUNT then local mount = Mount(offer.id) msg:addU16(mount:getClientId()) @@ -966,7 +966,7 @@ function sendShowStoreOffersOnOldProtocol(playerId, category) local msg = NetworkMessage() local haveSaleOffer = 0 msg:addByte(GameStore.SendingPackets.S_StoreOffers) - msg:addString(category.name) + msg:addString(category.name, "sendShowStoreOffersOnOldProtocol - category.name") if not category.offers then msg:addU16(0) @@ -1012,8 +1012,8 @@ function sendShowStoreOffersOnOldProtocol(playerId, category) local disabled, disabledReason = player:canBuyOffer(offer).disabled, player:canBuyOffer(offer).disabledReason local offerPrice = offer.type == GameStore.OfferTypes.OFFER_TYPE_EXPBOOST and GameStore.ExpBoostValues[player:getStorageValue(GameStore.Storages.expBoostCount)] or (newPrice or offer.price or 0xFFFF) msg:addU32(offer.id and offer.id or 0xFFFF) - msg:addString(name) - msg:addString(offer.description or GameStore.getDefaultDescription(offer.type, offer.count)) + msg:addString(name, "sendShowStoreOffersOnOldProtocol - name") + msg:addString(offer.description or GameStore.getDefaultDescription(offer.type, offer.count), "sendShowStoreOffersOnOldProtocol - offer.description or GameStore.getDefaultDescription(offer.type, offer.count)") msg:addU32(offerPrice) if offer.state then if offer.state == GameStore.States.STATE_SALE then @@ -1035,20 +1035,20 @@ function sendShowStoreOffersOnOldProtocol(playerId, category) msg:addByte(disabled) if disabled == 1 then - msg:addString(disabledReason) + msg:addString(disabledReason, "sendShowStoreOffersOnOldProtocol - disabledReason") end if offer.type == GameStore.OfferTypes.OFFER_TYPE_MOUNT then msg:addByte(1) - msg:addString((offer.name):gsub("% ", "_") .. ".png") + msg:addString((offer.name):gsub("% ", "_") .. ".png", "sendShowStoreOffersOnOldProtocol - (offer.name).png") elseif offer.type == GameStore.OfferTypes.OFFER_TYPE_OUTFIT then msg:addByte(2) - msg:addString(offer.icons[1]) - msg:addString(offer.icons[2]) + msg:addString(offer.icons[1], "sendShowStoreOffersOnOldProtocol - offer.icons[1]") + msg:addString(offer.icons[2], "sendShowStoreOffersOnOldProtocol - offer.icons[2]") else msg:addByte(#offer.icons) for k, icon in ipairs(offer.icons) do - msg:addString(icon) + msg:addString(icon, "sendShowStoreOffersOnOldProtocol - icon") end end @@ -1089,7 +1089,7 @@ function sendStoreTransactionHistory(playerId, page, entriesPerPage) if not oldProtocol then msg:addByte(0x0) -- 0 = transferable tibia coin, 1 = normal tibia coin end - msg:addString(entry.description) + msg:addString(entry.description, "sendStoreTransactionHistory - entry.description") if not oldProtocol then msg:addByte(0) -- details end @@ -1107,7 +1107,7 @@ function sendStorePurchaseSuccessful(playerId, message) local msg = NetworkMessage() msg:addByte(GameStore.SendingPackets.S_CompletePurchase) msg:addByte(0x00) - msg:addString(message) + msg:addString(message, "sendStorePurchaseSuccessful - message") if oldProtocol then -- Send all coins can be used for buy store offers local totalCoins = player:getTibiaCoins() + player:getTransferableCoins() @@ -1129,7 +1129,7 @@ function sendStoreError(playerId, errorType, message) msg:addByte(GameStore.SendingPackets.S_StoreError) msg:addByte(errorType) - msg:addString(message) + msg:addString(message, "sendStoreError - message") msg:sendToPlayer(player) end @@ -2080,7 +2080,7 @@ function sendHomePage(playerId) local msg = NetworkMessage() msg:addByte(GameStore.SendingPackets.S_StoreOffers) - msg:addString("Home") + msg:addString("Home", "sendHomePage - Home") msg:addU32(0x0) -- Redirect ID (not used here) msg:addByte(0x0) -- Window Type msg:addByte(0x0) -- Collections Size @@ -2106,13 +2106,13 @@ function sendHomePage(playerId) msg:addU16(#disableReasons) for _, reason in ipairs(disableReasons) do - msg:addString(reason) + msg:addString(reason, "sendHomePage - reason") end msg:addU16(#homeOffers) -- offers for p, offer in pairs(homeOffers) do - msg:addString(offer.name) + msg:addString(offer.name, "sendHomePage - offer.name") msg:addByte(0x1) -- ? msg:addU32(offer.id or 0) -- id msg:addU16(0x1) @@ -2132,7 +2132,7 @@ function sendHomePage(playerId) msg:addByte(type) if type == GameStore.ConverType.SHOW_NONE then - msg:addString(offer.icons[1]) + msg:addString(offer.icons[1], "sendHomePage - offer.icons[1]") elseif type == GameStore.ConverType.SHOW_MOUNT then local mount = Mount(offer.id) if mount then @@ -2163,7 +2163,7 @@ function sendHomePage(playerId) local banner = HomeBanners msg:addByte(#banner.images) for m, image in ipairs(banner.images) do - msg:addString(image) + msg:addString(image, "sendHomePage - image") msg:addByte(0x04) -- Banner Type (offer) msg:addU32(0x00) -- Offer Id msg:addByte(0) diff --git a/src/lua/functions/core/network/network_message_functions.cpp b/src/lua/functions/core/network/network_message_functions.cpp index 61567b1e1f0..fc1c1688613 100644 --- a/src/lua/functions/core/network/network_message_functions.cpp +++ b/src/lua/functions/core/network/network_message_functions.cpp @@ -191,11 +191,12 @@ int NetworkMessageFunctions::luaNetworkMessageAdd64(lua_State* L) { } int NetworkMessageFunctions::luaNetworkMessageAddString(lua_State* L) { - // networkMessage:addString(string) + // networkMessage:addString(string, function) const std::string &string = getString(L, 2); + const std::string &function = getString(L, 3); const auto &message = getUserdataShared(L, 1); if (message) { - message->addString(string); + message->addString(string, function); pushBoolean(L, true); } else { lua_pushnil(L); diff --git a/src/server/network/message/networkmessage.cpp b/src/server/network/message/networkmessage.cpp index 457e3b32be0..9c10b4907df 100644 --- a/src/server/network/message/networkmessage.cpp +++ b/src/server/network/message/networkmessage.cpp @@ -40,17 +40,17 @@ Position NetworkMessage::getPosition() { return pos; } -void NetworkMessage::addString(const std::string &value) { +void NetworkMessage::addString(const std::string &value, const std::string &function) { size_t stringLen = value.length(); if (value.empty()) { - g_logger().debug("[NetworkMessage::addString] - Value string is empty"); + g_logger().debug("[NetworkMessage::addString] - Value string is empty, function '{}'", function); } if (!canAdd(stringLen + 2)) { - g_logger().error("[NetworkMessage::addString] - NetworkMessage size is wrong: {}", stringLen); + g_logger().error("[NetworkMessage::addString] - NetworkMessage size is wrong: {}, function '{}'", stringLen, function); return; } if (stringLen > NETWORKMESSAGE_MAXSIZE) { - g_logger().error("[NetworkMessage::addString] - Exceded NetworkMessage max size: {}, actually size: {}", NETWORKMESSAGE_MAXSIZE, stringLen); + g_logger().error("[NetworkMessage::addString] - Exceded NetworkMessage max size: {}, actually size: {}, function '{}'", NETWORKMESSAGE_MAXSIZE, stringLen, function); return; } diff --git a/src/server/network/message/networkmessage.hpp b/src/server/network/message/networkmessage.hpp index 3635475a8d7..3051e87bb22 100644 --- a/src/server/network/message/networkmessage.hpp +++ b/src/server/network/message/networkmessage.hpp @@ -90,7 +90,7 @@ class NetworkMessage { void addBytes(const char* bytes, size_t size); void addPaddingBytes(size_t n); - void addString(const std::string &value); + void addString(const std::string &value, const std::string &function); void addDouble(double value, uint8_t precision = 2); diff --git a/src/server/network/protocol/protocolgame.cpp b/src/server/network/protocol/protocolgame.cpp index 958d19f2a71..30153af5ac7 100644 --- a/src/server/network/protocol/protocolgame.cpp +++ b/src/server/network/protocol/protocolgame.cpp @@ -228,7 +228,7 @@ namespace { g_logger().debug("Sendding category number '{}', category name '{}'", static_cast(value), magic_enum::enum_name(value).data()); msg.addByte(static_cast(value)); - msg.addString(toStartCaseWithSpace(magic_enum::enum_name(value).data())); + msg.addString(toStartCaseWithSpace(magic_enum::enum_name(value).data()), "void sendContainerCategory - toStartCaseWithSpace(magic_enum::enum_name(value).data())"); } } } // namespace @@ -553,7 +553,7 @@ void ProtocolGame::login(const std::string &name, uint32_t accountId, OperatingS auto output = OutputMessagePool::getOutputMessage(); output->addByte(0x16); - output->addString(ss.str()); + output->addString(ss.str(), "ProtocolGame::login - ss.str()"); output->addByte(retryTime); send(output); disconnect(); @@ -802,7 +802,7 @@ void ProtocolGame::onRecvFirstMessage(NetworkMessage &msg) { auto output = OutputMessagePool::getOutputMessage(); output->addByte(0x14); - output->addString(ss.str()); + output->addString(ss.str(), "ProtocolGame::onRecvFirstMessage - ss.str()"); send(output); g_dispatcher().scheduleEvent(1000, std::bind(&ProtocolGame::disconnect, getThis()), "ProtocolGame::disconnect"); return; @@ -842,7 +842,7 @@ void ProtocolGame::onConnect() { void ProtocolGame::disconnectClient(const std::string &message) const { auto output = OutputMessagePool::getOutputMessage(); output->addByte(0x14); - output->addString(message); + output->addString(message, "ProtocolGame::disconnectClient - message"); send(output); disconnect(); } @@ -1994,10 +1994,10 @@ void ProtocolGame::sendItemInspection(uint16_t itemId, uint8_t itemCount, std::s const ItemType &it = Item::items[itemId]; if (item) { - msg.addString(item->getName()); + msg.addString(item->getName(), "ProtocolGame::sendItemInspection - item->getName()"); AddItem(msg, item); } else { - msg.addString(it.name); + msg.addString(it.name, "ProtocolGame::sendItemInspection - it.name"); AddItem(msg, it.id, itemCount, 0); } msg.addByte(0); @@ -2005,8 +2005,8 @@ void ProtocolGame::sendItemInspection(uint16_t itemId, uint8_t itemCount, std::s auto descriptions = Item::getDescriptions(it, item); msg.addByte(descriptions.size()); for (const auto &description : descriptions) { - msg.addString(description.first); - msg.addString(description.second); + msg.addString(description.first, "ProtocolGame::sendItemInspection - description.first"); + msg.addString(description.second, "ProtocolGame::sendItemInspection - description.second"); } writeToOutputBuffer(msg); } @@ -2088,8 +2088,8 @@ void ProtocolGame::sendHighscores(const std::vector &charact msg.addByte(0x00); // No data available msg.addByte(1); // Worlds - msg.addString(g_configManager().getString(SERVER_NAME, __FUNCTION__)); // First World - msg.addString(g_configManager().getString(SERVER_NAME, __FUNCTION__)); // Selected World + msg.addString(g_configManager().getString(SERVER_NAME, __FUNCTION__), "ProtocolGame::sendHighscores - g_configManager().getString(SERVER_NAME)"); // First World + msg.addString(g_configManager().getString(SERVER_NAME, __FUNCTION__), "ProtocolGame::sendHighscores - g_configManager().getString(SERVER_NAME)"); // Selected World msg.addByte(0); // Game World Category: 0xFF(-1) - Selected World msg.addByte(0); // BattlEye World Type @@ -2099,7 +2099,7 @@ void ProtocolGame::sendHighscores(const std::vector &charact msg.skipBytes(1); // Vocation Count msg.add(0xFFFFFFFF); // All Vocations - hardcoded - msg.addString("(all)"); // All Vocations - hardcoded + msg.addString("(all)", "ProtocolGame::sendHighscores - (all)"); // All Vocations - hardcoded uint32_t selectedVocation = 0xFFFFFFFF; const auto vocationsMap = g_vocations().getVocations(); @@ -2107,7 +2107,7 @@ void ProtocolGame::sendHighscores(const std::vector &charact const Vocation &vocation = it.second; if (vocation.getFromVocation() == static_cast(vocation.getId())) { msg.add(vocation.getFromVocation()); // Vocation Id - msg.addString(vocation.getVocName()); // Vocation Name + msg.addString(vocation.getVocName(), "ProtocolGame::sendHighscores - vocation.getVocName()"); // Vocation Name ++vocations; if (vocation.getFromVocation() == vocationId) { selectedVocation = vocationId; @@ -2132,7 +2132,7 @@ void ProtocolGame::sendHighscores(const std::vector &charact msg.addByte(sizeof(highscoreCategories) / sizeof(HighscoreCategory)); // Category Count for (HighscoreCategory &category : highscoreCategories) { msg.addByte(category.id); // Category Id - msg.addString(category.name); // Category Name + msg.addString(category.name, "ProtocolGame::sendHighscores - category.name"); // Category Name if (category.id == categoryId) { selectedCategory = categoryId; } @@ -2145,10 +2145,10 @@ void ProtocolGame::sendHighscores(const std::vector &charact msg.addByte(characters.size()); // Character Count for (const HighscoreCharacter &character : characters) { msg.add(character.rank); // Rank - msg.addString(character.name); // Character Name - msg.addString(""); // Probably Character Title(not visible in window) + msg.addString(character.name, "ProtocolGame::sendHighscores - character.name"); // Character Name + msg.addString("", "ProtocolGame::sendHighscores - empty"); // Probably Character Title(not visible in window) msg.addByte(character.vocation); // Vocation Id - msg.addString(g_configManager().getString(SERVER_NAME, __FUNCTION__)); // World + msg.addString(g_configManager().getString(SERVER_NAME, __FUNCTION__), "ProtocolGame::sendHighscores - g_configManager().getString(SERVER_NAME)"); // World msg.add(character.level); // Level msg.addByte((player->getGUID() == character.id)); // Player Indicator Boolean msg.add(character.points); // Points @@ -2212,7 +2212,7 @@ void ProtocolGame::parseBestiarysendRaces() { BestClass = mtype->info.bestiaryClass; } } - msg.addString(BestClass); + msg.addString(BestClass, "ProtocolGame::parseBestiarysendRaces - BestClass"); msg.add(count); uint16_t unlockedCount = g_iobestiary().getBestiaryRaceUnlocked(player, static_cast(i)); msg.add(unlockedCount); @@ -2264,7 +2264,7 @@ void ProtocolGame::parseBestiarysendMonsterData(NetworkMessage &msg) { NetworkMessage newmsg; newmsg.addByte(0xd7); newmsg.add(raceId); - newmsg.addString(Class); + newmsg.addString(Class, "ProtocolGame::parseBestiarysendMonsterData - Class"); newmsg.addByte(currentLevel); newmsg.add(killCounter); @@ -2305,7 +2305,7 @@ void ProtocolGame::parseBestiarysendMonsterData(NetworkMessage &msg) { newmsg.addByte(difficult); newmsg.addByte(0); // 1 if special event - 0 if regular loot (?) if (shouldAddItem == true) { - newmsg.addString(loot.name); + newmsg.addString(loot.name, "ProtocolGame::parseBestiarysendMonsterData - loot.name"); newmsg.addByte(loot.countmax > 0 ? 0x1 : 0x0); } } @@ -2338,7 +2338,7 @@ void ProtocolGame::parseBestiarysendMonsterData(NetworkMessage &msg) { } newmsg.add(1); - newmsg.addString(mtype->info.bestiaryLocations); + newmsg.addString(mtype->info.bestiaryLocations, "ProtocolGame::parseBestiarysendMonsterData - mtype->info.bestiaryLocations"); } if (currentLevel > 3) { @@ -2416,7 +2416,7 @@ void ProtocolGame::sendTeamFinderList() { uint8_t status = 0; uint16_t membersSize = 0; msg.add(leader->getGUID()); - msg.addString(leader->getName()); + msg.addString(leader->getName(), "ProtocolGame::sendTeamFinderList - leader->getName()"); msg.add(teamAssemble->minLevel); msg.add(teamAssemble->maxLevel); msg.addByte(teamAssemble->vocationIDs); @@ -2522,7 +2522,7 @@ void ProtocolGame::sendLeaderTeamFinder(bool reset) { } msg.add(leader->getGUID()); - msg.addString(leader->getName()); + msg.addString(leader->getName(), "ProtocolGame::sendLeaderTeamFinder - leader->getName()"); msg.add(leader->getLevel()); msg.addByte(leader->getVocation()->getClientId()); msg.addByte(3); @@ -2533,7 +2533,7 @@ void ProtocolGame::sendLeaderTeamFinder(bool reset) { continue; } msg.add(member->getGUID()); - msg.addString(member->getName()); + msg.addString(member->getName(), "ProtocolGame::sendLeaderTeamFinder - member->getName()"); msg.add(member->getLevel()); msg.addByte(member->getVocation()->getClientId()); msg.addByte(memberPair.second); @@ -2799,8 +2799,8 @@ void ProtocolGame::BestiarysendCharms() { msg.addByte(charmList.size()); for (const auto &c_type : charmList) { msg.addByte(c_type->id); - msg.addString(c_type->name); - msg.addString(c_type->description); + msg.addString(c_type->name, "ProtocolGame::BestiarysendCharms - c_type->name"); + msg.addString(c_type->description, "ProtocolGame::BestiarysendCharms - c_type->description"); msg.addByte(0); // Unknown msg.add(c_type->points); if (g_iobestiary().hasCharmUnlockedRuneBit(c_type, player->getUnlockedRunesBit())) { @@ -2872,7 +2872,7 @@ void ProtocolGame::parseBestiarysendCreatures(NetworkMessage &msg) { } NetworkMessage newmsg; newmsg.addByte(0xd6); - newmsg.addString(text); + newmsg.addString(text, "ProtocolGame::parseBestiarysendCreatures - text"); newmsg.add(race.size()); std::map creaturesKilled = g_iobestiary().getBestiaryKillCountByMonsterIDs(player, race); @@ -3092,7 +3092,7 @@ void ProtocolGame::parseSeekInContainer(NetworkMessage &msg) { void ProtocolGame::sendOpenPrivateChannel(const std::string &receiver) { NetworkMessage msg; msg.addByte(0xAD); - msg.addString(receiver); + msg.addString(receiver, "ProtocolGame::sendOpenPrivateChannel - receiver"); writeToOutputBuffer(msg); } @@ -3112,7 +3112,7 @@ void ProtocolGame::sendChannelEvent(uint16_t channelId, const std::string &playe NetworkMessage msg; msg.addByte(0xF3); msg.add(channelId); - msg.addString(playerName); + msg.addString(playerName, "ProtocolGame::sendChannelEvent - playerName"); msg.addByte(channelEvent); writeToOutputBuffer(msg); } @@ -3306,7 +3306,7 @@ void ProtocolGame::sendAddMarker(const Position &pos, uint8_t markType, const st msg.addPosition(pos); msg.addByte(markType); - msg.addString(desc); + msg.addString(desc, "ProtocolGame::sendAddMarker - desc"); writeToOutputBuffer(msg); } @@ -3331,13 +3331,13 @@ void ProtocolGame::sendCyclopediaCharacterBaseInformation() { msg.addByte(0xDA); msg.addByte(CYCLOPEDIA_CHARACTERINFO_BASEINFORMATION); msg.addByte(0x00); - msg.addString(player->getName()); - msg.addString(player->getVocation()->getVocName()); + msg.addString(player->getName(), "ProtocolGame::sendCyclopediaCharacterBaseInformation - player->getName()"); + msg.addString(player->getVocation()->getVocName(), "ProtocolGame::sendCyclopediaCharacterBaseInformation - player->getVocation()->getVocName()"); msg.add(player->getLevel()); AddOutfit(msg, player->getDefaultOutfit(), false); msg.addByte(0x00); // hide stamina - msg.addString(""); // character title + msg.addString("", "ProtocolGame::sendCyclopediaCharacterBaseInformation - empty"); // character title writeToOutputBuffer(msg); } @@ -3577,7 +3577,7 @@ void ProtocolGame::sendCyclopediaCharacterRecentDeaths(uint16_t page, uint16_t p msg.add(entries.size()); for (const RecentDeathEntry &entry : entries) { msg.add(entry.timestamp); - msg.addString(entry.cause); + msg.addString(entry.cause, "ProtocolGame::sendCyclopediaCharacterRecentDeaths - entry.cause"); } writeToOutputBuffer(msg); } @@ -3596,7 +3596,7 @@ void ProtocolGame::sendCyclopediaCharacterRecentPvPKills(uint16_t page, uint16_t msg.add(entries.size()); for (const RecentPvPKillEntry &entry : entries) { msg.add(entry.timestamp); - msg.addString(entry.description); + msg.addString(entry.description, "ProtocolGame::sendCyclopediaCharacterRecentPvPKills - entry.description"); msg.addByte(entry.status); } writeToOutputBuffer(msg); @@ -3661,7 +3661,7 @@ void ProtocolGame::sendCyclopediaCharacterOutfitsMounts() { ++outfitSize; msg.add(outfit->lookType); - msg.addString(outfit->name); + msg.addString(outfit->name, "ProtocolGame::sendCyclopediaCharacterOutfitsMounts - outfit->name"); msg.addByte(addons); if (from == "store") { msg.addByte(CYCLOPEDIA_CHARACTERINFO_OUTFITTYPE_STORE); @@ -3692,7 +3692,7 @@ void ProtocolGame::sendCyclopediaCharacterOutfitsMounts() { ++mountSize; msg.add(mount->clientId); - msg.addString(mount->name); + msg.addString(mount->name, "ProtocolGame::sendCyclopediaCharacterOutfitsMounts - mount->name"); if (type == "store") { msg.addByte(CYCLOPEDIA_CHARACTERINFO_OUTFITTYPE_STORE); } else if (type == "quest") { @@ -3721,7 +3721,7 @@ void ProtocolGame::sendCyclopediaCharacterOutfitsMounts() { } ++familiarsSize; msg.add(familiar.lookType); - msg.addString(familiar.name); + msg.addString(familiar.name, "ProtocolGame::sendCyclopediaCharacterOutfitsMounts - familiar.name"); if (type == "quest") { msg.addByte(CYCLOPEDIA_CHARACTERINFO_OUTFITTYPE_QUEST); } else { @@ -3782,19 +3782,19 @@ void ProtocolGame::sendCyclopediaCharacterInspection() { ++inventoryItems; msg.addByte(slot); - msg.addString(inventoryItem->getName()); + msg.addString(inventoryItem->getName(), "ProtocolGame::sendCyclopediaCharacterInspection - inventoryItem->getName()"); AddItem(msg, inventoryItem); msg.addByte(0); auto descriptions = Item::getDescriptions(Item::items[inventoryItem->getID()], inventoryItem); msg.addByte(descriptions.size()); for (const auto &description : descriptions) { - msg.addString(description.first); - msg.addString(description.second); + msg.addString(description.first, "ProtocolGame::sendCyclopediaCharacterInspection - description.first"); + msg.addString(description.second, "ProtocolGame::sendCyclopediaCharacterInspection - description.second"); } } } - msg.addString(player->getName()); + msg.addString(player->getName(), "ProtocolGame::sendCyclopediaCharacterInspection - player->getName()"); AddOutfit(msg, player->getDefaultOutfit(), false); // Player overall summary @@ -3804,28 +3804,28 @@ void ProtocolGame::sendCyclopediaCharacterInspection() { // Level description playerDescriptionSize++; - msg.addString("Level"); + msg.addString("Level", "ProtocolGame::sendCyclopediaCharacterInspection - Level"); // Vocation description playerDescriptionSize++; - msg.addString(std::to_string(player->getLevel())); - msg.addString("Vocation"); - msg.addString(player->getVocation()->getVocName()); + msg.addString(std::to_string(player->getLevel()), "ProtocolGame::sendCyclopediaCharacterInspection - std::to_string(player->getLevel())"); + msg.addString("Vocation", "ProtocolGame::sendCyclopediaCharacterInspection - Vocation"); + msg.addString(player->getVocation()->getVocName(), "ProtocolGame::sendCyclopediaCharacterInspection - player->getVocation()->getVocName()"); // Loyalty title if (player->getLoyaltyTitle().length() != 0) { playerDescriptionSize++; - msg.addString("Loyalty Title"); - msg.addString(player->getLoyaltyTitle()); + msg.addString("Loyalty Title", "ProtocolGame::sendCyclopediaCharacterInspection - Loyalty Title"); + msg.addString(player->getLoyaltyTitle(), "ProtocolGame::sendCyclopediaCharacterInspection - player->getLoyaltyTitle()"); } // Outfit description playerDescriptionSize++; - msg.addString("Outfit"); + msg.addString("Outfit", "ProtocolGame::sendCyclopediaCharacterInspection - Outfit"); if (const auto outfit = Outfits::getInstance().getOutfitByLookType(player->getSex(), player->getDefaultOutfit().lookType)) { - msg.addString(outfit->name); + msg.addString(outfit->name, "ProtocolGame::sendCyclopediaCharacterInspection - outfit->name"); } else { - msg.addString("unknown"); + msg.addString("unknown", "ProtocolGame::sendCyclopediaCharacterInspection - unknown"); } msg.setBufferPosition(startInventory); @@ -3855,7 +3855,7 @@ void ProtocolGame::sendCyclopediaCharacterBadges() { // IsPremium (GOD has always 'Premium') msg.addByte(player->isPremium() ? 0x01 : 0x00); // Character loyalty title - msg.addString(player->getLoyaltyTitle()); + msg.addString(player->getLoyaltyTitle(), "ProtocolGame::sendCyclopediaCharacterBadges - player->getLoyaltyTitle()"); // Enable badges msg.addByte(0x00); // Todo badges loop @@ -4101,7 +4101,7 @@ void ProtocolGame::sendTextMessage(const TextMessage &message) { default: break; } - msg.addString(message.text); + msg.addString(message.text, "ProtocolGame::sendTextMessage - message.text"); writeToOutputBuffer(msg); } @@ -4116,9 +4116,9 @@ void ProtocolGame::sendCreatePrivateChannel(uint16_t channelId, const std::strin NetworkMessage msg; msg.addByte(0xB2); msg.add(channelId); - msg.addString(channelName); + msg.addString(channelName, "ProtocolGame::sendCreatePrivateChannel - channelName"); msg.add(0x01); - msg.addString(player->getName()); + msg.addString(player->getName(), "ProtocolGame::sendCreatePrivateChannel - player->getName()"); msg.add(0x00); writeToOutputBuffer(msg); } @@ -4131,7 +4131,7 @@ void ProtocolGame::sendChannelsDialog() { msg.addByte(list.size()); for (const auto &channel : list) { msg.add(channel->getId()); - msg.addString(channel->getName()); + msg.addString(channel->getName(), "ProtocolGame::sendChannelsDialog - channel->getName()"); } writeToOutputBuffer(msg); @@ -4142,12 +4142,12 @@ void ProtocolGame::sendChannel(uint16_t channelId, const std::string &channelNam msg.addByte(0xAC); msg.add(channelId); - msg.addString(channelName); + msg.addString(channelName, "ProtocolGame::sendChannel - channelName"); if (channelUsers) { msg.add(channelUsers->size()); for (const auto &it : *channelUsers) { - msg.addString(it.second->getName()); + msg.addString(it.second->getName(), "ProtocolGame::sendChannel - it.second->getName()"); } } else { msg.add(0x00); @@ -4156,7 +4156,7 @@ void ProtocolGame::sendChannel(uint16_t channelId, const std::string &channelNam if (invitedUsers) { msg.add(invitedUsers->size()); for (const auto &it : *invitedUsers) { - msg.addString(it.second->getName()); + msg.addString(it.second->getName(), "ProtocolGame::sendChannel - it.second->getName()"); } } else { msg.add(0x00); @@ -4168,11 +4168,11 @@ void ProtocolGame::sendChannelMessage(const std::string &author, const std::stri NetworkMessage msg; msg.addByte(0xAA); msg.add(0x00); - msg.addString(author); + msg.addString(author, "ProtocolGame::sendChannelMessage - author"); msg.add(0x00); msg.addByte(type); msg.add(channel); - msg.addString(text); + msg.addString(text, "ProtocolGame::sendChannelMessage - text"); writeToOutputBuffer(msg); } @@ -4213,10 +4213,10 @@ void ProtocolGame::sendContainer(uint8_t cid, std::shared_ptr contain if (container->getID() == ITEM_BROWSEFIELD) { AddItem(msg, ITEM_BAG, 1, container->getTier()); - msg.addString("Browse Field"); + msg.addString("Browse Field", "ProtocolGame::sendContainer - Browse Field"); } else { AddItem(msg, container); - msg.addString(container->getName()); + msg.addString(container->getName(), "ProtocolGame::sendContainer - container->getName()"); } const auto itemsStoreInboxToSend = container->getStoreInboxFilteredItems(); @@ -4343,7 +4343,7 @@ void ProtocolGame::sendLootStats(std::shared_ptr item, uint8_t count) { NetworkMessage msg; msg.addByte(0xCF); AddItem(msg, lootedItem); - msg.addString(lootedItem->getName()); + msg.addString(lootedItem->getName(), "ProtocolGame::sendLootStats - lootedItem->getName()"); item->setIsLootTrackeable(false); writeToOutputBuffer(msg); @@ -4353,11 +4353,11 @@ void ProtocolGame::sendLootStats(std::shared_ptr item, uint8_t count) { void ProtocolGame::sendShop(std::shared_ptr npc) { NetworkMessage msg; msg.addByte(0x7A); - msg.addString(npc->getName()); + msg.addString(npc->getName(), "ProtocolGame::sendShop - npc->getName()"); if (!oldProtocol) { msg.add(npc->getCurrency()); - msg.addString(std::string()); // Currency name + msg.addString(std::string(), "ProtocolGame::sendShop - std::string()"); // Currency name } std::vector shoplist = npc->getShopItemVector(player->getGUID()); @@ -4622,7 +4622,7 @@ void ProtocolGame::sendMarketBrowseItem(uint16_t itemId, const MarketOfferList & } else { msg.add(static_cast(offer.price)); } - msg.addString(offer.playerName); + msg.addString(offer.playerName, "ProtocolGame::sendMarketBrowseItem - offer.playerName"); } msg.add(sellOffers.size()); @@ -4635,7 +4635,7 @@ void ProtocolGame::sendMarketBrowseItem(uint16_t itemId, const MarketOfferList & } else { msg.add(static_cast(offer.price)); } - msg.addString(offer.playerName); + msg.addString(offer.playerName, "ProtocolGame::sendMarketBrowseItem - offer.playerName"); } updateCoinBalance(); @@ -4664,7 +4664,7 @@ void ProtocolGame::sendMarketAcceptOffer(const MarketOfferEx &offer) { } else { msg.add(static_cast(offer.price)); } - msg.addString(offer.playerName); + msg.addString(offer.playerName, "ProtocolGame::sendMarketAcceptOffer - offer.playerName"); msg.add(0x00); } else { msg.add(0x00); @@ -4677,7 +4677,7 @@ void ProtocolGame::sendMarketAcceptOffer(const MarketOfferEx &offer) { } else { msg.add(static_cast(offer.price)); } - msg.addString(offer.playerName); + msg.addString(offer.playerName, "ProtocolGame::sendMarketAcceptOffer - offer.playerName"); } writeToOutputBuffer(msg); @@ -5098,7 +5098,7 @@ void ProtocolGame::sendForgeHistory(uint8_t page) { auto action = magic_enum::enum_integer(history.actionType); msg.add(static_cast(history.createdAt)); msg.addByte(action); - msg.addString(history.description); + msg.addString(history.description, "ProtocolGame::sendForgeHistory - history.description"); msg.addByte((history.bonus >= 1 && history.bonus < 8) ? 0x01 : 0x00); } } @@ -5128,7 +5128,7 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) { } if (it.armor != 0) { - msg.addString(std::to_string(it.armor)); + msg.addString(std::to_string(it.armor), "ProtocolGame::sendMarketDetail - std::to_string(it.armor)"); } else { msg.add(0x00); } @@ -5156,21 +5156,21 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) { } ss << static_cast(it.shootRange) << " fields"; } - msg.addString(ss.str()); + msg.addString(ss.str(), "ProtocolGame::sendMarketDetail - ss.str()"); } else if (!it.isRanged() && it.attack != 0) { if (it.abilities && it.abilities->elementType != COMBAT_NONE && it.abilities->elementDamage != 0) { std::ostringstream ss; ss << it.attack << " physical +" << it.abilities->elementDamage << ' ' << getCombatName(it.abilities->elementType); - msg.addString(ss.str()); + msg.addString(ss.str(), "ProtocolGame::sendMarketDetail - ss.str()"); } else { - msg.addString(std::to_string(it.attack)); + msg.addString(std::to_string(it.attack), "ProtocolGame::sendMarketDetail - std::to_string(it.attack)"); } } else { msg.add(0x00); } if (it.isContainer()) { - msg.addString(std::to_string(it.maxItems)); + msg.addString(std::to_string(it.maxItems), "ProtocolGame::sendMarketDetail - std::to_string(it.maxItems)"); } else { msg.add(0x00); } @@ -5179,9 +5179,9 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) { if (it.extraDefense != 0) { std::ostringstream ss; ss << it.defense << ' ' << std::showpos << it.extraDefense << std::noshowpos; - msg.addString(ss.str()); + msg.addString(ss.str(), "ProtocolGame::sendMarketDetail - ss.str()"); } else { - msg.addString(std::to_string(it.defense)); + msg.addString(std::to_string(it.defense), "ProtocolGame::sendMarketDetail - std::to_string(it.defense)"); } } else { msg.add(0x00); @@ -5190,9 +5190,9 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) { if (!it.description.empty()) { const std::string &descr = it.description; if (descr.back() == '.') { - msg.addString(std::string(descr, 0, descr.length() - 1)); + msg.addString(std::string(descr, 0, descr.length() - 1), "ProtocolGame::sendMarketDetail - std::string(descr, 0, descr.length() - 1)"); } else { - msg.addString(descr); + msg.addString(descr, "ProtocolGame::sendMarketDetail - descr"); } } else { msg.add(0x00); @@ -5201,7 +5201,7 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) { if (it.decayTime != 0) { std::ostringstream ss; ss << it.decayTime << " seconds"; - msg.addString(ss.str()); + msg.addString(ss.str(), "ProtocolGame::sendMarketDetail - ss.str()"); } else { msg.add(0x00); } @@ -5224,25 +5224,25 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) { ss << fmt::format("{} {:+}%", getCombatName(indexToCombatType(i)), it.abilities->absorbPercent[i]); } - msg.addString(ss.str()); + msg.addString(ss.str(), "ProtocolGame::sendMarketDetail - ss.str()"); } else { msg.add(0x00); } if (it.minReqLevel != 0) { - msg.addString(std::to_string(it.minReqLevel)); + msg.addString(std::to_string(it.minReqLevel), "ProtocolGame::sendMarketDetail - std::to_string(it.minReqLevel)"); } else { msg.add(0x00); } if (it.minReqMagicLevel != 0) { - msg.addString(std::to_string(it.minReqMagicLevel)); + msg.addString(std::to_string(it.minReqMagicLevel), "ProtocolGame::sendMarketDetail - std::to_string(it.minReqMagicLevel)"); } else { msg.add(0x00); } - msg.addString(it.vocationString); - msg.addString(it.runeSpellName); + msg.addString(it.vocationString, "ProtocolGame::sendMarketDetail - it.vocationString"); + msg.addString(it.runeSpellName, "ProtocolGame::sendMarketDetail - it.runeSpellName"); if (it.abilities) { std::ostringstream ss; @@ -5319,13 +5319,13 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) { ss << fmt::format("speed {:+}", (it.abilities->speed >> 1)); } - msg.addString(ss.str()); + msg.addString(ss.str(), "ProtocolGame::sendMarketDetail - ss.str()"); } else { msg.add(0x00); } if (it.charges != 0) { - msg.addString(std::to_string(it.charges)); + msg.addString(std::to_string(it.charges), "ProtocolGame::sendMarketDetail - std::to_string(it.charges)"); } else { msg.add(0x00); } @@ -5340,7 +5340,7 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) { } } - msg.addString(weaponName); + msg.addString(weaponName, "ProtocolGame::sendMarketDetail - weaponName"); if (it.weight != 0) { std::ostringstream ss; @@ -5354,7 +5354,7 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) { ss << weightString; } ss << " oz"; - msg.addString(ss.str()); + msg.addString(ss.str(), "ProtocolGame::sendMarketDetail - ss.str()"); } else { msg.add(0x00); } @@ -5364,7 +5364,7 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) { } if (it.imbuementSlot > 0) { - msg.addString(std::to_string(it.imbuementSlot)); + msg.addString(std::to_string(it.imbuementSlot), "ProtocolGame::sendMarketDetail - std::to_string(it.imbuementSlot)"); } else { msg.add(0x00); } @@ -5376,7 +5376,7 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) { if (it.abilities->magicShieldCapacityFlat > 0) { string.clear(); string << std::showpos << it.abilities->magicShieldCapacityFlat << std::noshowpos << " and " << it.abilities->magicShieldCapacityPercent << "%"; - msg.addString(string.str()); + msg.addString(string.str(), "ProtocolGame::sendMarketDetail - string.str()"); } else { msg.add(0x00); } @@ -5384,7 +5384,7 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) { if (it.abilities->cleavePercent > 0) { string.clear(); string << it.abilities->cleavePercent << "%"; - msg.addString(string.str()); + msg.addString(string.str(), "ProtocolGame::sendMarketDetail - string.str()"); } else { msg.add(0x00); } @@ -5392,7 +5392,7 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) { if (it.abilities->reflectFlat[COMBAT_PHYSICALDAMAGE] > 0) { string.clear(); string << it.abilities->reflectFlat[COMBAT_PHYSICALDAMAGE]; - msg.addString(string.str()); + msg.addString(string.str(), "ProtocolGame::sendMarketDetail - string.str()"); } else { msg.add(0x00); } @@ -5400,7 +5400,7 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) { if (it.abilities->perfectShotDamage > 0) { string.clear(); string << std::showpos << it.abilities->perfectShotDamage << std::noshowpos << " at " << it.abilities->perfectShotRange << "%"; - msg.addString(string.str()); + msg.addString(string.str(), "ProtocolGame::sendMarketDetail - string.str()"); } else { msg.add(0x00); } @@ -5418,7 +5418,7 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) { // Upgrade and tier detail modifier if (it.upgradeClassification > 0 && tier > 0) { - msg.addString(std::to_string(it.upgradeClassification)); + msg.addString(std::to_string(it.upgradeClassification), "ProtocolGame::sendMarketDetail - std::to_string(it.upgradeClassification)"); std::ostringstream ss; double chance; @@ -5432,10 +5432,10 @@ void ProtocolGame::sendMarketDetail(uint16_t itemId, uint8_t tier) { chance = (0.0307576 * tier * tier) + (0.440697 * tier) + 0.026; ss << fmt::format("{} ({:.2f}% Ruse)", static_cast(tier), chance); } - msg.addString(ss.str()); + msg.addString(ss.str(), "ProtocolGame::sendMarketDetail - ss.str()"); } else if (it.upgradeClassification > 0 && tier == 0) { - msg.addString(std::to_string(it.upgradeClassification)); - msg.addString(std::to_string(tier)); + msg.addString(std::to_string(it.upgradeClassification), "ProtocolGame::sendMarketDetail - std::to_string(it.upgradeClassification)"); + msg.addString(std::to_string(tier), "ProtocolGame::sendMarketDetail - std::to_string(tier)"); } else { msg.add(0x00); msg.add(0x00); @@ -5488,7 +5488,7 @@ void ProtocolGame::sendTradeItemRequest(const std::string &traderName, std::shar msg.addByte(0x7E); } - msg.addString(traderName); + msg.addString(traderName, "ProtocolGame::sendTradeItemRequest - traderName"); if (std::shared_ptr tradeContainer = item->getContainer()) { std::list> listContainer { tradeContainer }; @@ -5553,7 +5553,7 @@ void ProtocolGame::sendCreatureSay(std::shared_ptr creature, SpeakClas static uint32_t statementId = 0; msg.add(++statementId); - msg.addString(creature->getName()); + msg.addString(creature->getName(), "ProtocolGame::sendCreatureSay - creature->getName()"); if (!oldProtocol) { msg.addByte(0x00); // Show (Traded) @@ -5578,7 +5578,7 @@ void ProtocolGame::sendCreatureSay(std::shared_ptr creature, SpeakClas msg.addPosition(creature->getPosition()); } - msg.addString(text); + msg.addString(text, "ProtocolGame::sendCreatureSay - text"); writeToOutputBuffer(msg); } @@ -5600,7 +5600,7 @@ void ProtocolGame::sendToChannel(std::shared_ptr creature, SpeakClasse } type = TALKTYPE_CHANNEL_R1; } else { - msg.addString(creature->getName()); + msg.addString(creature->getName(), "ProtocolGame::sendToChannel - creature->getName()"); if (!oldProtocol && statementId != 0) { msg.addByte(0x00); // Show (Traded) } @@ -5620,7 +5620,7 @@ void ProtocolGame::sendToChannel(std::shared_ptr creature, SpeakClasse } msg.add(channelId); - msg.addString(text); + msg.addString(text, "ProtocolGame::sendToChannel - text"); writeToOutputBuffer(msg); } @@ -5630,7 +5630,7 @@ void ProtocolGame::sendPrivateMessage(std::shared_ptr speaker, SpeakClas static uint32_t statementId = 0; msg.add(++statementId); if (speaker) { - msg.addString(speaker->getName()); + msg.addString(speaker->getName(), "ProtocolGame::sendPrivateMessage - speaker->getName()"); if (!oldProtocol && statementId != 0) { msg.addByte(0x00); // Show (Traded) } @@ -5648,7 +5648,7 @@ void ProtocolGame::sendPrivateMessage(std::shared_ptr speaker, SpeakClas msg.addByte(type); } - msg.addString(text); + msg.addString(text, "ProtocolGame::sendPrivateMessage - text"); writeToOutputBuffer(msg); } @@ -5730,7 +5730,7 @@ void ProtocolGame::sendRestingStatus(uint8_t protection) { int32_t PlayerdailyStreak = player->getStorageValue(STORAGEVALUE_DAILYREWARD); msg.addByte(PlayerdailyStreak < 2 ? 0 : 1); if (PlayerdailyStreak < 2) { - msg.addString("Resting Area (no active bonus)"); + msg.addString("Resting Area (no active bonus)", "ProtocolGame::sendRestingStatus - Resting Area (no active bonus)"); } else { std::ostringstream ss; ss << "Active Resting Area Bonuses: "; @@ -5753,7 +5753,7 @@ void ProtocolGame::sendRestingStatus(uint8_t protection) { ss << ",\nSoul Points Regeneration"; } ss << "."; - msg.addString(ss.str()); + msg.addString(ss.str(), "ProtocolGame::sendRestingStatus - ss.str()"); } writeToOutputBuffer(msg); } @@ -5945,7 +5945,7 @@ void ProtocolGame::sendPlayerVocation(std::shared_ptr target) { void ProtocolGame::sendFYIBox(const std::string &message) { NetworkMessage msg; msg.addByte(0x15); - msg.addString(message); + msg.addString(message, "ProtocolGame::sendFYIBox - message"); writeToOutputBuffer(msg); } @@ -6108,7 +6108,7 @@ void ProtocolGame::sendAddCreature(std::shared_ptr creature, const Pos msg.addByte(0x00); // can change pvp framing option msg.addByte(0x00); // expert mode button enabled - msg.addString(g_configManager().getString(STORE_IMAGES_URL, __FUNCTION__)); + msg.addString(g_configManager().getString(STORE_IMAGES_URL, __FUNCTION__), "ProtocolGame::sendAddCreature - g_configManager().getString(STORE_IMAGES_URL)"); msg.add(static_cast(g_configManager().getNumber(STORE_COIN_PACKET, __FUNCTION__))); if (!oldProtocol) { @@ -6351,16 +6351,16 @@ void ProtocolGame::sendTextWindow(uint32_t windowTextId, std::shared_ptr i if (canWrite) { msg.add(maxlen); - msg.addString(item->getAttribute(ItemAttribute_t::TEXT)); + msg.addString(item->getAttribute(ItemAttribute_t::TEXT), "ProtocolGame::sendTextWindow - item->getAttribute(ItemAttribute_t::TEXT)"); } else { const std::string &text = item->getAttribute(ItemAttribute_t::TEXT); msg.add(text.size()); - msg.addString(text); + msg.addString(text, "ProtocolGame::sendTextWindow - text"); } const std::string &writer = item->getAttribute(ItemAttribute_t::WRITER); if (!writer.empty()) { - msg.addString(writer); + msg.addString(writer, "ProtocolGame::sendTextWindow - writer"); } else { msg.add(0x00); } @@ -6371,7 +6371,7 @@ void ProtocolGame::sendTextWindow(uint32_t windowTextId, std::shared_ptr i auto writtenDate = item->getAttribute(ItemAttribute_t::DATE); if (writtenDate != 0) { - msg.addString(formatDateShort(writtenDate)); + msg.addString(formatDateShort(writtenDate), "ProtocolGame::sendTextWindow - formatDateShort(writtenDate)"); } else { msg.add(0x00); } @@ -6385,7 +6385,7 @@ void ProtocolGame::sendTextWindow(uint32_t windowTextId, uint32_t itemId, const msg.add(windowTextId); AddItem(msg, itemId, 1, 0); msg.add(text.size()); - msg.addString(text); + msg.addString(text, "ProtocolGame::sendTextWindow - text"); msg.add(0x00); if (!oldProtocol) { @@ -6401,7 +6401,7 @@ void ProtocolGame::sendHouseWindow(uint32_t windowTextId, const std::string &tex msg.addByte(0x97); msg.addByte(0x00); msg.add(windowTextId); - msg.addString(text); + msg.addString(text, "ProtocolGame::sendHouseWindow - text"); writeToOutputBuffer(msg); } @@ -6448,7 +6448,7 @@ void ProtocolGame::sendOutfitWindow() { msg.addByte(protocolOutfits.size()); for (const ProtocolOutfit &outfit : protocolOutfits) { msg.add(outfit.lookType); - msg.addString(outfit.name); + msg.addString(outfit.name, "ProtocolGame::sendOutfitWindow - outfit.name"); msg.addByte(outfit.addons); } @@ -6462,7 +6462,7 @@ void ProtocolGame::sendOutfitWindow() { msg.addByte(mounts.size()); for (const auto mount : mounts) { msg.add(mount->clientId); - msg.addString(mount->name); + msg.addString(mount->name, "ProtocolGame::sendOutfitWindow - mount->name"); } writeToOutputBuffer(msg); @@ -6493,19 +6493,19 @@ void ProtocolGame::sendOutfitWindow() { if (player->isAccessPlayer()) { msg.add(75); - msg.addString("Gamemaster"); + msg.addString("Gamemaster", "ProtocolGame::sendOutfitWindow - Gamemaster"); msg.addByte(0); msg.addByte(0x00); ++outfitSize; msg.add(266); - msg.addString("Customer Support"); + msg.addString("Customer Support", "ProtocolGame::sendOutfitWindow - Customer Support"); msg.addByte(0); msg.addByte(0x00); ++outfitSize; msg.add(302); - msg.addString("Community Manager"); + msg.addString("Community Manager", "ProtocolGame::sendOutfitWindow - Community Manager"); msg.addByte(0); msg.addByte(0x00); ++outfitSize; @@ -6517,25 +6517,25 @@ void ProtocolGame::sendOutfitWindow() { uint8_t addons; if (player->getOutfitAddons(outfit, addons)) { msg.add(outfit->lookType); - msg.addString(outfit->name); + msg.addString(outfit->name, "ProtocolGame::sendOutfitWindow - outfit->name"); msg.addByte(addons); msg.addByte(0x00); ++outfitSize; } else if (outfit->lookType == 1210 || outfit->lookType == 1211) { msg.add(outfit->lookType); - msg.addString(outfit->name); + msg.addString(outfit->name, "ProtocolGame::sendOutfitWindow - outfit->name"); msg.addByte(3); msg.addByte(0x02); ++outfitSize; } else if (outfit->lookType == 1456 || outfit->lookType == 1457) { msg.add(outfit->lookType); - msg.addString(outfit->name); + msg.addString(outfit->name, "ProtocolGame::sendOutfitWindow - outfit->name"); msg.addByte(3); msg.addByte(0x03); ++outfitSize; } else if (outfit->from == "store") { msg.add(outfit->lookType); - msg.addString(outfit->name); + msg.addString(outfit->name, "ProtocolGame::sendOutfitWindow - outfit->name"); msg.addByte(outfit->lookType >= 962 && outfit->lookType <= 975 ? 0 : 3); msg.addByte(0x01); msg.add(0x00); @@ -6561,12 +6561,12 @@ void ProtocolGame::sendOutfitWindow() { for (const auto mount : mounts) { if (player->hasMount(mount)) { msg.add(mount->clientId); - msg.addString(mount->name); + msg.addString(mount->name, "ProtocolGame::sendOutfitWindow - mount->name"); msg.addByte(0x00); ++mountSize; } else if (mount->type == "store") { msg.add(mount->clientId); - msg.addString(mount->name); + msg.addString(mount->name, "ProtocolGame::sendOutfitWindow - mount->name"); msg.addByte(0x01); msg.add(0x00); ++mountSize; @@ -6595,7 +6595,7 @@ void ProtocolGame::sendOutfitWindow() { } msg.add(familiar.lookType); - msg.addString(familiar.name); + msg.addString(familiar.name, "ProtocolGame::sendOutfitWindow - familiar.name"); msg.addByte(0x00); if (++familiarSize == limitFamiliars) { break; @@ -6659,7 +6659,7 @@ void ProtocolGame::sendPodiumWindow(std::shared_ptr podium, const Position } msg.add(outfit->lookType); - msg.addString(outfit->name); + msg.addString(outfit->name, "ProtocolGame::sendPodiumWindow - outfit->name"); msg.addByte(addons); msg.addByte(0x00); if (++outfitSize == limitOutfits) { @@ -6681,7 +6681,7 @@ void ProtocolGame::sendPodiumWindow(std::shared_ptr podium, const Position for (const auto mount : mounts) { if (player->hasMount(mount)) { msg.add(mount->clientId); - msg.addString(mount->name); + msg.addString(mount->name, "ProtocolGame::sendPodiumWindow - mount->name"); msg.addByte(0x00); if (++mountSize == limitMounts) { break; @@ -6731,8 +6731,8 @@ void ProtocolGame::sendVIP(uint32_t guid, const std::string &name, const std::st NetworkMessage msg; msg.addByte(0xD2); msg.add(guid); - msg.addString(name); - msg.addString(description); + msg.addString(name, "ProtocolGame::sendVIP - name"); + msg.addString(description, "ProtocolGame::sendVIP - description"); msg.add(std::min(10, icon)); msg.addByte(notify ? 0x01 : 0x00); msg.addByte(status); @@ -6829,7 +6829,7 @@ void ProtocolGame::sendPreyData(const std::unique_ptr &slot) { // Empty } else if (slot->state == PreyDataState_Active) { if (const auto mtype = g_monsters().getMonsterTypeByRaceId(slot->selectedRaceId)) { - msg.addString(mtype->name); + msg.addString(mtype->name, "ProtocolGame::sendPreyData - mtype->name"); const Outfit_t outfit = mtype->info.outfit; msg.add(outfit.lookType); if (outfit.lookType == 0) { @@ -6855,7 +6855,7 @@ void ProtocolGame::sendPreyData(const std::unique_ptr &slot) { continue; } - msg.addString(mtype->name); + msg.addString(mtype->name, "ProtocolGame::sendPreyData - mtype->name"); const Outfit_t outfit = mtype->info.outfit; msg.add(outfit.lookType); if (outfit.lookType == 0) { @@ -6880,7 +6880,7 @@ void ProtocolGame::sendPreyData(const std::unique_ptr &slot) { continue; } - msg.addString(mtype->name); + msg.addString(mtype->name, "ProtocolGame::sendPreyData - mtype->name"); const Outfit_t outfit = mtype->info.outfit; msg.add(outfit.lookType); if (outfit.lookType == 0) { @@ -6948,18 +6948,18 @@ void ProtocolGame::sendModalWindow(const ModalWindow &modalWindow) { msg.addByte(0xFA); msg.add(modalWindow.id); - msg.addString(modalWindow.title); - msg.addString(modalWindow.message); + msg.addString(modalWindow.title, "ProtocolGame::sendModalWindow - modalWindow.title"); + msg.addString(modalWindow.message, "ProtocolGame::sendModalWindow - modalWindow.message"); msg.addByte(modalWindow.buttons.size()); for (const auto &it : modalWindow.buttons) { - msg.addString(it.first); + msg.addString(it.first, "ProtocolGame::sendModalWindow - it.first"); msg.addByte(it.second); } msg.addByte(modalWindow.choices.size()); for (const auto &it : modalWindow.choices) { - msg.addString(it.first); + msg.addString(it.first, "ProtocolGame::sendModalWindow - it.first"); msg.addByte(it.second); } @@ -6997,9 +6997,9 @@ void ProtocolGame::AddCreature(NetworkMessage &msg, std::shared_ptr cr } if (!oldProtocol && creature->isHealthHidden()) { - msg.addString(""); + msg.addString("", "ProtocolGame::AddCreature - empty"); } else { - msg.addString(creature->getName()); + msg.addString(creature->getName(), "ProtocolGame::AddCreature - creature->getName()"); } } @@ -7218,9 +7218,10 @@ void ProtocolGame::addImbuementInfo(NetworkMessage &msg, uint16_t imbuementId) c const CategoryImbuement* categoryImbuement = g_imbuements().getCategoryByID(imbuement->getCategory()); msg.add(imbuementId); - msg.addString(baseImbuement->name + " " + imbuement->getName()); - msg.addString(imbuement->getDescription()); - msg.addString(categoryImbuement->name + imbuement->getSubGroup()); + msg.addString(baseImbuement->name + " " + imbuement->getName(), "ProtocolGame::addImbuementInfo - baseImbuement->name + " + " + imbuement->getName()"); + msg.addString(imbuement->getDescription(), "ProtocolGame::addImbuementInfo - imbuement->getDescription()"); + msg.addString(categoryImbuement->name + imbuement->getSubGroup(), "ProtocolGame::addImbuementInfo - categoryImbuement->name + imbuement->getSubGroup()"); msg.add(imbuement->getIconID()); msg.add(baseImbuement->duration); @@ -7233,7 +7234,7 @@ void ProtocolGame::addImbuementInfo(NetworkMessage &msg, uint16_t imbuementId) c for (const auto &itm : items) { const ItemType &it = Item::items[itm.first]; msg.add(itm.first); - msg.addString(it.name); + msg.addString(it.name, "ProtocolGame::addImbuementInfo - it.name"); msg.add(itm.second); } @@ -7305,7 +7306,7 @@ void ProtocolGame::sendMessageDialog(const std::string &message) { NetworkMessage msg; msg.addByte(0xED); msg.addByte(0x14); // Unknown type - msg.addString(message); + msg.addString(message, "ProtocolGame::sendMessageDialog - message"); writeToOutputBuffer(msg); } @@ -7313,7 +7314,7 @@ void ProtocolGame::sendImbuementResult(const std::string message) { NetworkMessage msg; msg.addByte(0xED); msg.addByte(0x01); - msg.addString(message); + msg.addString(message, "ProtocolGame::sendImbuementResult - message"); writeToOutputBuffer(msg); } @@ -7374,7 +7375,7 @@ void ProtocolGame::updatePartyTrackerAnalyzer(const std::shared_ptr party msg.addByte(static_cast(party->membersData.size())); for (const std::shared_ptr analyzer : party->membersData) { msg.add(analyzer->id); - msg.addString(analyzer->name); + msg.addString(analyzer->name, "ProtocolGame::updatePartyTrackerAnalyzer - analyzer->name"); } } @@ -7410,7 +7411,7 @@ void ProtocolGame::sendKillTrackerUpdate(std::shared_ptr corpse, cons NetworkMessage msg; msg.addByte(0xD1); - msg.addString(name); + msg.addString(name, "ProtocolGame::sendKillTrackerUpdate - name"); msg.add(creatureOutfit.lookType ? creatureOutfit.lookType : 21); msg.addByte(creatureOutfit.lookType ? creatureOutfit.lookHead : 0x00); msg.addByte(creatureOutfit.lookType ? creatureOutfit.lookBody : 0x00); @@ -7478,7 +7479,7 @@ void ProtocolGame::sendUpdateInputAnalyzer(CombatType_t type, int32_t amount, st msg.addByte(ANALYZER_DAMAGE_RECEIVED); msg.add(amount); msg.addByte(clientElement); - msg.addString(target); + msg.addString(target, "ProtocolGame::sendUpdateInputAnalyzer - target"); writeToOutputBuffer(msg); } @@ -7642,7 +7643,7 @@ void ProtocolGame::AddHiddenShopItem(NetworkMessage &msg) { // Empty bytes from AddShopItem msg.add(0); msg.addByte(0); - msg.addString(std::string()); + msg.addString(std::string(), "ProtocolGame::AddHiddenShopItem - std::string()"); msg.add(0); msg.add(0); msg.add(0); @@ -7677,9 +7678,9 @@ void ProtocolGame::AddShopItem(NetworkMessage &msg, const ShopBlock &shopBlock) // If not send "itemName" variable from the npc shop, will registered the name that is in items.xml if (shopBlock.itemName.empty()) { - msg.addString(it.name); + msg.addString(it.name, "ProtocolGame::AddShopItem - it.name"); } else { - msg.addString(shopBlock.itemName); + msg.addString(shopBlock.itemName, "ProtocolGame::AddShopItem - shopBlock.itemName"); } msg.add(it.weight); msg.add(shopBlock.itemBuyPrice == 4294967295 ? 0 : shopBlock.itemBuyPrice); @@ -7761,7 +7762,8 @@ void ProtocolGame::sendInventoryImbuements(const std::mapgetBaseID()); msg.addByte(0x01); - msg.addString(baseImbuement->name + " " + imbuement->getName()); + msg.addString(baseImbuement->name + " " + imbuement->getName(), "ProtocolGame::sendInventoryImbuements - baseImbuement->name + " + " + imbuement->getName()"); msg.add(imbuement->getIconID()); msg.add(imbuementInfo.duration); @@ -8354,9 +8356,9 @@ void ProtocolGame::sendPodiumDetails(NetworkMessage &msg, const std::vectorname); + msg.addString(mType->name, "ProtocolGame::sendPodiumDetails - mType->name"); } msg.add(monsterOutfit.lookType); if (isLookType) { diff --git a/src/server/network/protocol/protocollogin.cpp b/src/server/network/protocol/protocollogin.cpp index 1b8753b01d3..53dc9f05126 100644 --- a/src/server/network/protocol/protocollogin.cpp +++ b/src/server/network/protocol/protocollogin.cpp @@ -22,7 +22,7 @@ void ProtocolLogin::disconnectClient(const std::string &message) { auto output = OutputMessagePool::getOutputMessage(); output->addByte(0x0B); - output->addString(message); + output->addString(message, "ProtocolLogin::disconnectClient - message"); send(output); disconnect(); @@ -56,12 +56,12 @@ void ProtocolLogin::getCharacterList(const std::string &accountDescriptor, const std::ostringstream ss; ss << g_game().getMotdNum() << "\n" << motd; - output->addString(ss.str()); + output->addString(ss.str(), "ProtocolLogin::getCharacterList - ss.str()"); } // Add session key output->addByte(0x28); - output->addString(accountDescriptor + "\n" + password); + output->addString(accountDescriptor + "\n" + password, "ProtocolLogin::getCharacterList - accountDescriptor + password"); // Add char list auto [players, result] = account.getAccountPlayers(); @@ -74,8 +74,8 @@ void ProtocolLogin::getCharacterList(const std::string &accountDescriptor, const output->addByte(1); // number of worlds output->addByte(0); // world id - output->addString(g_configManager().getString(SERVER_NAME, __FUNCTION__)); - output->addString(g_configManager().getString(IP, __FUNCTION__)); + output->addString(g_configManager().getString(SERVER_NAME, __FUNCTION__), "ProtocolLogin::getCharacterList - _configManager().getString(SERVER_NAME)"); + output->addString(g_configManager().getString(IP, __FUNCTION__), "ProtocolLogin::getCharacterList - g_configManager().getString(IP)"); output->add(g_configManager().getNumber(GAME_PORT, __FUNCTION__)); @@ -85,7 +85,7 @@ void ProtocolLogin::getCharacterList(const std::string &accountDescriptor, const output->addByte(size); for (const auto &[name, deletion] : players) { output->addByte(0); - output->addString(name); + output->addString(name, "ProtocolLogin::getCharacterList - name"); } // Add premium days diff --git a/src/server/network/protocol/protocolstatus.cpp b/src/server/network/protocol/protocolstatus.cpp index 50522fc003d..23b6b0b2498 100644 --- a/src/server/network/protocol/protocolstatus.cpp +++ b/src/server/network/protocol/protocolstatus.cpp @@ -154,22 +154,22 @@ void ProtocolStatus::sendInfo(uint16_t requestedInfo, const std::string &charact if (requestedInfo & REQUEST_BASIC_SERVER_INFO) { output->addByte(0x10); - output->addString(g_configManager().getString(ConfigKey_t::SERVER_NAME, __FUNCTION__)); - output->addString(g_configManager().getString(IP, __FUNCTION__)); - output->addString(std::to_string(g_configManager().getNumber(LOGIN_PORT, __FUNCTION__))); + output->addString(g_configManager().getString(ConfigKey_t::SERVER_NAME, __FUNCTION__), "ProtocolStatus::sendInfo - g_configManager().getString(stringConfig_t::SERVER_NAME)"); + output->addString(g_configManager().getString(IP, __FUNCTION__), "ProtocolStatus::sendInfo - g_configManager().getString(IP)"); + output->addString(std::to_string(g_configManager().getNumber(LOGIN_PORT, __FUNCTION__)), "ProtocolStatus::sendInfo - std::to_string(g_configManager().getNumber(LOGIN_PORT))"); } if (requestedInfo & REQUEST_OWNER_SERVER_INFO) { output->addByte(0x11); - output->addString(g_configManager().getString(OWNER_NAME, __FUNCTION__)); - output->addString(g_configManager().getString(OWNER_EMAIL, __FUNCTION__)); + output->addString(g_configManager().getString(OWNER_NAME, __FUNCTION__), "ProtocolStatus::sendInfo - g_configManager().getString(OWNER_NAME)"); + output->addString(g_configManager().getString(OWNER_EMAIL, __FUNCTION__), "ProtocolStatus::sendInfo - g_configManager().getString(OWNER_EMAIL)"); } if (requestedInfo & REQUEST_MISC_SERVER_INFO) { output->addByte(0x12); - output->addString(g_configManager().getString(SERVER_MOTD, __FUNCTION__)); - output->addString(g_configManager().getString(LOCATION, __FUNCTION__)); - output->addString(g_configManager().getString(URL, __FUNCTION__)); + output->addString(g_configManager().getString(SERVER_MOTD, __FUNCTION__), "ProtocolStatus::sendInfo - g_configManager().getString(SERVER_MOTD)"); + output->addString(g_configManager().getString(LOCATION, __FUNCTION__), "ProtocolStatus::sendInfo - g_configManager().getString(LOCATION)"); + output->addString(g_configManager().getString(URL, __FUNCTION__), "ProtocolStatus::sendInfo - g_configManager().getString(URL)"); output->add((OTSYS_TIME() - ProtocolStatus::start) / 1000); } @@ -182,8 +182,8 @@ void ProtocolStatus::sendInfo(uint16_t requestedInfo, const std::string &charact if (requestedInfo & REQUEST_MAP_INFO) { output->addByte(0x30); - output->addString(g_configManager().getString(MAP_NAME, __FUNCTION__)); - output->addString(g_configManager().getString(MAP_AUTHOR, __FUNCTION__)); + output->addString(g_configManager().getString(MAP_NAME, __FUNCTION__), "ProtocolStatus::sendInfo - g_configManager().getString(MAP_NAME)"); + output->addString(g_configManager().getString(MAP_AUTHOR, __FUNCTION__), "ProtocolStatus::sendInfo - g_configManager().getString(MAP_AUTHOR)"); uint32_t mapWidth, mapHeight; g_game().getMapDimensions(mapWidth, mapHeight); output->add(mapWidth); @@ -196,7 +196,7 @@ void ProtocolStatus::sendInfo(uint16_t requestedInfo, const std::string &charact const auto players = g_game().getPlayers(); output->add(players.size()); for (const auto &it : players) { - output->addString(it.second->getName()); + output->addString(it.second->getName(), "ProtocolStatus::sendInfo - it.second->getName()"); output->add(it.second->getLevel()); } } @@ -212,9 +212,9 @@ void ProtocolStatus::sendInfo(uint16_t requestedInfo, const std::string &charact if (requestedInfo & REQUEST_SERVER_SOFTWARE_INFO) { output->addByte(0x23); // server software info - output->addString(ProtocolStatus::SERVER_NAME); - output->addString(ProtocolStatus::SERVER_VERSION); - output->addString(fmt::format("{}.{}", CLIENT_VERSION_UPPER, CLIENT_VERSION_LOWER)); + output->addString(ProtocolStatus::SERVER_NAME, "ProtocolStatus::sendInfo - ProtocolStatus::SERVER_NAME"); + output->addString(ProtocolStatus::SERVER_VERSION, "ProtocolStatus::sendInfo - ProtocolStatus::SERVER_VERSION)"); + output->addString(fmt::format("{}.{}", CLIENT_VERSION_UPPER, CLIENT_VERSION_LOWER), "ProtocolStatus::sendInfo - fmt::format(CLIENT_VERSION_UPPER, CLIENT_VERSION_LOWER)"); } send(output); disconnect(); From 8c654dc94201c2da34ad3915c85adbf8850483f9 Mon Sep 17 00:00:00 2001 From: Luan Luciano Date: Sat, 9 Dec 2023 16:50:21 -0300 Subject: [PATCH 03/28] improve: change for getTownTemplePosition to getTemplePosition (#1958) --- .../scripts/actions/other/temple_scroll.lua | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/data-otservbr-global/scripts/actions/other/temple_scroll.lua b/data-otservbr-global/scripts/actions/other/temple_scroll.lua index fdfeff177e1..1f170d72be9 100644 --- a/data-otservbr-global/scripts/actions/other/temple_scroll.lua +++ b/data-otservbr-global/scripts/actions/other/temple_scroll.lua @@ -4,12 +4,13 @@ function templeScroll.onUse(player, item, fromPosition, target, toPosition, isHo local inPz = player:getTile():hasFlag(TILESTATE_PROTECTIONZONE) local inFight = player:isPzLocked() or player:getCondition(CONDITION_INFIGHT, CONDITIONID_DEFAULT) if inPz or not inFight then - player:teleportTo(getTownTemplePosition(player:getTown():getId())) + fromPosition:sendMagicEffect(CONST_ME_TELEPORT) + player:teleportTo(player:getTown():getTemplePosition()) + player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) item:remove() - Position(fromPosition):sendMagicEffect(CONST_ME_TELEPORT) else player:sendCancelMessage("You can't use this when you're in a fight.") - Position(fromPosition):sendMagicEffect(CONST_ME_POFF) + fromPosition:sendMagicEffect(CONST_ME_POFF) end return true end From 0e16b1c62a5909901bd334a6e5f5581e85192f7c Mon Sep 17 00:00:00 2001 From: Jonyrewind Date: Sat, 9 Dec 2023 20:52:17 +0100 Subject: [PATCH 04/28] improve: keyword multi-shop on many NPCs (#1964) - added itemsTables to the Magic Shopkeeper NPCs - Rock in a Hard Place like Global Tibia - added missing items to black bert (fixes #1962) --- data-otservbr-global/npc/alaistar.lua | 98 ++-- data-otservbr-global/npc/alexander.lua | 99 ++-- data-otservbr-global/npc/asima.lua | 120 +++-- data-otservbr-global/npc/black_bert.lua | 206 +++++--- data-otservbr-global/npc/chuckles.lua | 135 ++--- data-otservbr-global/npc/fenech.lua | 109 ++-- data-otservbr-global/npc/frans.lua | 115 +++-- data-otservbr-global/npc/frederik.lua | 157 +++--- data-otservbr-global/npc/ghorza.lua | 147 ++++-- data-otservbr-global/npc/gnomegica.lua | 142 ++++-- data-otservbr-global/npc/hamish.lua | 82 ++- data-otservbr-global/npc/khanna.lua | 148 +++--- data-otservbr-global/npc/mordecai.lua | 156 ++++-- data-otservbr-global/npc/nelly.lua | 172 ++++--- data-otservbr-global/npc/nipuna.lua | 151 ++++-- data-otservbr-global/npc/rabaz.lua | 143 +++--- data-otservbr-global/npc/rachel.lua | 120 +++-- .../npc/rock_in_a_hard_place.lua | 468 ++++++++++-------- data-otservbr-global/npc/romir.lua | 161 +++--- data-otservbr-global/npc/shiriel.lua | 144 ++++-- data-otservbr-global/npc/sigurd.lua | 145 ++++-- data-otservbr-global/npc/sundara.lua | 155 ++++-- data-otservbr-global/npc/tandros.lua | 163 +++--- data-otservbr-global/npc/topsy.lua | 127 +++-- data-otservbr-global/npc/xodet.lua | 131 +++-- data/npclib/npc_system/npc_handler.lua | 1 + 26 files changed, 2314 insertions(+), 1481 deletions(-) diff --git a/data-otservbr-global/npc/alaistar.lua b/data-otservbr-global/npc/alaistar.lua index 883f877aaf3..07bf107650e 100644 --- a/data-otservbr-global/npc/alaistar.lua +++ b/data-otservbr-global/npc/alaistar.lua @@ -23,40 +23,50 @@ npcConfig.flags = { floorchange = false, } -npcConfig.shop = { - { itemName = "cowbell", clientId = 21204, sell = 210 }, - { itemName = "empty potion flask", clientId = 283, sell = 5 }, - { itemName = "empty potion flask", clientId = 284, sell = 5 }, - { itemName = "empty potion flask", clientId = 285, sell = 5 }, - { itemName = "execowtioner mask", clientId = 21201, sell = 240 }, - { itemName = "giant pacifier", clientId = 21199, sell = 170 }, - { itemName = "glob of glooth", clientId = 21182, sell = 125 }, - { itemName = "glooth injection tube", clientId = 21103, sell = 350 }, - { itemName = "great health potion", clientId = 239, buy = 225 }, - { itemName = "great mana potion", clientId = 238, buy = 144 }, - { itemName = "great spirit potion", clientId = 7642, buy = 228 }, - { itemName = "health potion", clientId = 266, buy = 50 }, - { itemName = "mana potion", clientId = 268, buy = 56 }, - { itemName = "metal jaw", clientId = 21193, sell = 260 }, - { itemName = "metal toe", clientId = 21198, sell = 430 }, - { itemName = "mooh'tah shell", clientId = 21202, sell = 110 }, - { itemName = "moohtant horn", clientId = 21200, sell = 140 }, - { itemName = "necromantic rust", clientId = 21196, sell = 390 }, - { itemName = "poisoned fang", clientId = 21195, sell = 130 }, - { itemName = "seacrest hair", clientId = 21801, sell = 260 }, - { itemName = "seacrest pearl", clientId = 21747, sell = 400 }, - { itemName = "seacrest scale", clientId = 21800, sell = 150 }, - { itemName = "slime heart", clientId = 21194, sell = 160 }, - { itemName = "slimy leaf tentacle", clientId = 21197, sell = 320 }, - { itemName = "strong health potion", clientId = 236, buy = 115 }, - { itemName = "strong mana potion", clientId = 237, buy = 93 }, - { itemName = "supreme health potion", clientId = 23375, buy = 625 }, - { itemName = "ultimate health potion", clientId = 7643, buy = 438 }, - { itemName = "ultimate mana potion", clientId = 23373, buy = 379 }, - { itemName = "ultimate spirit potion", clientId = 23374, buy = 438 }, - { itemName = "vial", clientId = 2874, sell = 5 }, +local itemsTable = { + ["potions"] = { + { itemName = "empty potion flask", clientId = 283, sell = 5 }, + { itemName = "empty potion flask", clientId = 284, sell = 5 }, + { itemName = "empty potion flask", clientId = 285, sell = 5 }, + { itemName = "great health potion", clientId = 239, buy = 225 }, + { itemName = "great mana potion", clientId = 238, buy = 144 }, + { itemName = "great spirit potion", clientId = 7642, buy = 228 }, + { itemName = "health potion", clientId = 266, buy = 50 }, + { itemName = "mana potion", clientId = 268, buy = 56 }, + { itemName = "strong health potion", clientId = 236, buy = 115 }, + { itemName = "strong mana potion", clientId = 237, buy = 93 }, + { itemName = "supreme health potion", clientId = 23375, buy = 625 }, + { itemName = "ultimate health potion", clientId = 7643, buy = 438 }, + { itemName = "ultimate mana potion", clientId = 23373, buy = 379 }, + { itemName = "ultimate spirit potion", clientId = 23374, buy = 438 }, + { itemName = "vial", clientId = 2874, sell = 5 }, + }, + ["creature products"] = { + { itemName = "cowbell", clientId = 21204, sell = 210 }, + { itemName = "giant pacifier", clientId = 21199, sell = 170 }, + { itemName = "glob of glooth", clientId = 21182, sell = 125 }, + { itemName = "glooth injection tube", clientId = 21103, sell = 350 }, + { itemName = "metal jaw", clientId = 21193, sell = 260 }, + { itemName = "metal toe", clientId = 21198, sell = 430 }, + { itemName = "mooh'tah shell", clientId = 21202, sell = 110 }, + { itemName = "moohtant horn", clientId = 21200, sell = 140 }, + { itemName = "necromantic rust", clientId = 21196, sell = 390 }, + { itemName = "poisoned fang", clientId = 21195, sell = 130 }, + { itemName = "seacrest hair", clientId = 21801, sell = 260 }, + { itemName = "seacrest pearl", clientId = 21747, sell = 400 }, + { itemName = "seacrest scale", clientId = 21800, sell = 150 }, + { itemName = "slime heart", clientId = 21194, sell = 160 }, + { itemName = "slimy leaf tentacle", clientId = 21197, sell = 320 }, + }, } +npcConfig.shop = {} +for _, categoryTable in pairs(itemsTable) do + for _, itemTable in ipairs(categoryTable) do + table.insert(npcConfig.shop, itemTable) + end +end + -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) npc:sellItem(player, itemId, amount, subType, 0, ignore, inBackpacks) @@ -95,6 +105,30 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end +local function creatureSayCallback(npc, creature, type, message) + local player = Player(creature) + local playerId = player:getId() + + if not npcHandler:checkInteraction(npc, creature) then + return false + end + + local formattedCategoryNames = {} + for categoryName, _ in pairs(itemsTable) do + table.insert(formattedCategoryNames, "{" .. categoryName .. "}") + end + + local categoryTable = itemsTable[message:lower()] + + if categoryTable then + npcHandler:say("Of course, just browse through my wares.", npc, player) + npc:openShopWindowTable(player, categoryTable) + end + return true +end + +npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) + npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) npcType:register(npcConfig) diff --git a/data-otservbr-global/npc/alexander.lua b/data-otservbr-global/npc/alexander.lua index be63cecf32e..522a43da1d1 100644 --- a/data-otservbr-global/npc/alexander.lua +++ b/data-otservbr-global/npc/alexander.lua @@ -29,6 +29,49 @@ npcConfig.voices = { { text = "Selling all sorts of magic equipment. Come and have a look" }, } +local itemsTable = { + ["runes"] = { + { itemName = "animate dead rune", clientId = 3203, buy = 375 }, + { itemName = "blank rune", clientId = 3147, buy = 10 }, + { itemName = "desintegrate rune", clientId = 3197, buy = 26 }, + { itemName = "energy bomb rune", clientId = 3149, buy = 203 }, + { itemName = "fireball rune", clientId = 3189, buy = 30 }, + { itemName = "holy missile rune", clientId = 3182, buy = 16 }, + { itemName = "icicle rune", clientId = 3158, buy = 30 }, + { itemName = "magic wall rune", clientId = 3180, buy = 116 }, + { itemName = "paralyze rune", clientId = 3165, buy = 700 }, + { itemName = "poison bomb rune", clientId = 3173, buy = 85 }, + { itemName = "soulfire rune", clientId = 3195, buy = 46 }, + { itemName = "stone shower rune", clientId = 3175, buy = 37 }, + { itemName = "thunderstorm rune", clientId = 3202, buy = 47 }, + { itemName = "wild growth rune", clientId = 3156, buy = 160 }, + }, + ["wands"] = { + { itemName = "hailstorm rod", clientId = 3067, buy = 15000 }, + { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, + { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, + { itemName = "northwind rod", clientId = 8083, buy = 7500 }, + { itemName = "springsprout rod", clientId = 8084, buy = 18000 }, + { itemName = "terra rod", clientId = 3065, buy = 10000 }, + { itemName = "underworld rod", clientId = 8082, buy = 22000 }, + { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, + { itemName = "wand of decay", clientId = 3072, buy = 5000 }, + { itemName = "wand of draconia", clientId = 8093, buy = 7500 }, + { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, + { itemName = "wand of inferno", clientId = 3071, buy = 15000 }, + { itemName = "wand of starstorm", clientId = 8092, buy = 18000 }, + { itemName = "wand of voodoo", clientId = 8094, buy = 22000 }, + { itemName = "wand of vortex", clientId = 3074, buy = 500 }, + }, +} + +npcConfig.shop = {} +for _, categoryTable in pairs(itemsTable) do + for _, itemTable in ipairs(categoryTable) do + table.insert(npcConfig.shop, itemTable) + end +end + local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) @@ -69,6 +112,12 @@ local function creatureSayCallback(npc, creature, type, message) return false end + local formattedCategoryNames = {} + for categoryName, _ in pairs(itemsTable) do + table.insert(formattedCategoryNames, "{" .. categoryName .. "}") + end + + local categoryTable = itemsTable[message:lower()] local itemId = items[player:getVocation():getBaseId()] if MsgContains(message, "first rod") or MsgContains(message, "first wand") then if player:isMage() then @@ -91,6 +140,9 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "no") and npcHandler:getTopic(playerId) == 1 then npcHandler:say("Ok then.", npc, creature) npcHandler:setTopic(playerId, 0) + elseif categoryTable then + npcHandler:say("Of course, just browse through my wares.", npc, player) + npc:openShopWindowTable(player, categoryTable) end return true end @@ -104,53 +156,6 @@ npcHandler:setMessage(MESSAGE_WALKAWAY, "See you, |PLAYERNAME|.") npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at {runes} or {wands}?") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -npcConfig.shop = { - { itemName = "animate dead rune", clientId = 3203, buy = 375 }, - { itemName = "blank rune", clientId = 3147, buy = 10 }, - { itemName = "crystal ball", clientId = 3076, buy = 530, sell = 190 }, - { itemName = "desintegrate rune", clientId = 3197, buy = 26 }, - { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 }, - { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 }, - { itemName = "energy bomb rune", clientId = 3149, buy = 203 }, - { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 }, - { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 }, - { itemName = "fireball rune", clientId = 3189, buy = 30 }, - { itemName = "hailstorm rod", clientId = 3067, buy = 15000 }, - { itemName = "holy missile rune", clientId = 3182, buy = 16 }, - { itemName = "icicle rune", clientId = 3158, buy = 30 }, - { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 }, - { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 }, - { itemName = "life crystal", clientId = 3061, sell = 85 }, - { itemName = "life ring", clientId = 3052, buy = 900 }, - { itemName = "magic wall rune", clientId = 3180, buy = 116 }, - { itemName = "mind stone", clientId = 3062, sell = 170 }, - { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, - { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, - { itemName = "northwind rod", clientId = 8083, buy = 7500 }, - { itemName = "paralyze rune", clientId = 3165, buy = 700 }, - { itemName = "poison bomb rune", clientId = 3173, buy = 85 }, - { itemName = "snakebite rod", clientId = 3066, buy = 500 }, - { itemName = "soulfire rune", clientId = 3195, buy = 46 }, - { itemName = "spellbook of enlightenment", clientId = 8072, sell = 4000 }, - { itemName = "spellbook of lost souls", clientId = 8075, sell = 19000 }, - { itemName = "spellbook of mind control", clientId = 8074, sell = 13000 }, - { itemName = "spellbook of warding", clientId = 8073, sell = 8000 }, - { itemName = "spellwand", clientId = 651, sell = 299 }, - { itemName = "springsprout rod", clientId = 8084, buy = 18000 }, - { itemName = "stone shower rune", clientId = 3175, buy = 37 }, - { itemName = "terra rod", clientId = 3065, buy = 10000 }, - { itemName = "thunderstorm rune", clientId = 3202, buy = 47 }, - { itemName = "underworld rod", clientId = 8082, buy = 22000 }, - { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, - { itemName = "wand of decay", clientId = 3072, buy = 5000 }, - { itemName = "wand of draconia", clientId = 8093, buy = 7500 }, - { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, - { itemName = "wand of inferno", clientId = 3071, buy = 15000 }, - { itemName = "wand of starstorm", clientId = 8092, buy = 18000 }, - { itemName = "wand of voodoo", clientId = 8094, buy = 22000 }, - { itemName = "wand of vortex", clientId = 3074, buy = 500 }, - { itemName = "wild growth rune", clientId = 3156, buy = 160 }, -} -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) npc:sellItem(player, itemId, amount, subType, 0, ignore, inBackpacks) diff --git a/data-otservbr-global/npc/asima.lua b/data-otservbr-global/npc/asima.lua index 5e4e1713ad8..329683e1e34 100644 --- a/data-otservbr-global/npc/asima.lua +++ b/data-otservbr-global/npc/asima.lua @@ -23,6 +23,55 @@ npcConfig.flags = { floorchange = false, } +local itemsTable = { + ["potions"] = { + { itemName = "empty potion flask", clientId = 283, sell = 5 }, + { itemName = "empty potion flask", clientId = 284, sell = 5 }, + { itemName = "empty potion flask", clientId = 285, sell = 5 }, + { itemName = "great health potion", clientId = 239, buy = 225 }, + { itemName = "great mana potion", clientId = 238, buy = 144 }, + { itemName = "great spirit potion", clientId = 7642, buy = 228 }, + { itemName = "health potion", clientId = 266, buy = 50 }, + { itemName = "mana potion", clientId = 268, buy = 56 }, + { itemName = "strong health potion", clientId = 236, buy = 115 }, + { itemName = "strong mana potion", clientId = 237, buy = 93 }, + { itemName = "supreme health potion", clientId = 23375, buy = 625 }, + { itemName = "ultimate health potion", clientId = 7643, buy = 379 }, + { itemName = "ultimate mana potion", clientId = 23373, buy = 438 }, + { itemName = "ultimate spirit potion", clientId = 23374, buy = 438 }, + { itemName = "vial", clientId = 2874, sell = 5 }, + }, + ["runes"] = { + { itemName = "avalanche rune", clientId = 3161, buy = 57 }, + { itemName = "blank rune", clientId = 3147, buy = 10 }, + { itemName = "chameleon rune", clientId = 3178, buy = 210 }, + { itemName = "convince creature rune", clientId = 3177, buy = 80 }, + { itemName = "cure poison rune", clientId = 3153, buy = 65 }, + { itemName = "destroy field rune", clientId = 3148, buy = 15 }, + { itemName = "energy field rune", clientId = 3164, buy = 38 }, + { itemName = "energy wall rune", clientId = 3166, buy = 85 }, + { itemName = "explosion rune", clientId = 3200, buy = 31 }, + { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, + { itemName = "fire field rune", clientId = 3188, buy = 28 }, + { itemName = "fire wall rune", clientId = 3190, buy = 61 }, + { itemName = "great fireball rune", clientId = 3191, buy = 57 }, + { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, + { itemName = "intense healing rune", clientId = 3152, buy = 95 }, + { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, + { itemName = "poison field rune", clientId = 3172, buy = 21 }, + { itemName = "poison wall rune", clientId = 3176, buy = 52 }, + { itemName = "sudden death rune", clientId = 3155, buy = 135 }, + { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, + }, +} + +npcConfig.shop = {} +for _, categoryTable in pairs(itemsTable) do + for _, itemTable in ipairs(categoryTable) do + table.insert(npcConfig.shop, itemTable) + end +end + local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) @@ -63,6 +112,12 @@ local function creatureSayCallback(npc, creature, type, message) return false end + local formattedCategoryNames = {} + for categoryName, _ in pairs(itemsTable) do + table.insert(formattedCategoryNames, "{" .. categoryName .. "}") + end + + local categoryTable = itemsTable[message:lower()] local itemId = items[player:getVocation():getBaseId()] if MsgContains(message, "first rod") or MsgContains(message, "first wand") then if player:isMage() then @@ -85,6 +140,9 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "no") and npcHandler:getTopic(playerId) == 1 then npcHandler:say("Ok then.", npc, creature) npcHandler:setTopic(playerId, 0) + elseif categoryTable then + npcHandler:say("Of course, just browse through my wares.", npc, player) + npc:openShopWindowTable(player, categoryTable) end return true end @@ -92,68 +150,6 @@ end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -npcConfig.shop = { - { itemName = "avalanche rune", clientId = 3161, buy = 57 }, - { itemName = "blank rune", clientId = 3147, buy = 10 }, - { itemName = "chameleon rune", clientId = 3178, buy = 210 }, - { itemName = "convince creature rune", clientId = 3177, buy = 80 }, - { itemName = "cure poison rune", clientId = 3153, buy = 65 }, - { itemName = "destroy field rune", clientId = 3148, buy = 15 }, - { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 }, - { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 }, - { itemName = "empty potion flask", clientId = 283, sell = 5 }, - { itemName = "empty potion flask", clientId = 284, sell = 5 }, - { itemName = "empty potion flask", clientId = 285, sell = 5 }, - { itemName = "energy field rune", clientId = 3164, buy = 38 }, - { itemName = "energy wall rune", clientId = 3166, buy = 85 }, - { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 }, - { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 }, - { itemName = "explosion rune", clientId = 3200, buy = 31 }, - { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, - { itemName = "fire field rune", clientId = 3188, buy = 28 }, - { itemName = "fire wall rune", clientId = 3190, buy = 61 }, - { itemName = "great fireball rune", clientId = 3191, buy = 57 }, - { itemName = "great health potion", clientId = 239, buy = 225 }, - { itemName = "great mana potion", clientId = 238, buy = 144 }, - { itemName = "great spirit potion", clientId = 7642, buy = 228 }, - { itemName = "hailstorm rod", clientId = 3067, buy = 15000 }, - { itemName = "health potion", clientId = 266, buy = 50 }, - { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, - { itemName = "intense healing rune", clientId = 3152, buy = 95 }, - { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 }, - { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 }, - { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, - { itemName = "mana potion", clientId = 268, buy = 56 }, - { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, - { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, - { itemName = "northwind rod", clientId = 8083, buy = 7500 }, - { itemName = "poison field rune", clientId = 3172, buy = 21 }, - { itemName = "poison wall rune", clientId = 3176, buy = 52 }, - { itemName = "snakebite rod", clientId = 3066, buy = 500 }, - { itemName = "spellbook", clientId = 3059, buy = 150 }, - { itemName = "spellwand", clientId = 651, sell = 299 }, - { itemName = "springsprout rod", clientId = 8084, buy = 18000 }, - { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, - { itemName = "strong health potion", clientId = 236, buy = 115 }, - { itemName = "strong mana potion", clientId = 237, buy = 93 }, - { itemName = "sudden death rune", clientId = 3155, buy = 135 }, - { itemName = "supreme health potion", clientId = 23375, buy = 625 }, - { itemName = "terra rod", clientId = 3065, buy = 10000 }, - { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, - { itemName = "ultimate health potion", clientId = 7643, buy = 379 }, - { itemName = "ultimate mana potion", clientId = 23373, buy = 438 }, - { itemName = "ultimate spirit potion", clientId = 23374, buy = 438 }, - { itemName = "underworld rod", clientId = 8082, buy = 22000 }, - { itemName = "vial", clientId = 2874, sell = 5 }, - { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, - { itemName = "wand of decay", clientId = 3072, buy = 5000 }, - { itemName = "wand of draconia", clientId = 8093, buy = 7500 }, - { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, - { itemName = "wand of inferno", clientId = 3071, buy = 15000 }, - { itemName = "wand of starstorm", clientId = 8092, buy = 18000 }, - { itemName = "wand of voodoo", clientId = 8094, buy = 22000 }, - { itemName = "wand of vortex", clientId = 3074, buy = 500 }, -} -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) npc:sellItem(player, itemId, amount, subType, 0, ignore, inBackpacks) diff --git a/data-otservbr-global/npc/black_bert.lua b/data-otservbr-global/npc/black_bert.lua index 08006ac1230..c68c5f43bc5 100644 --- a/data-otservbr-global/npc/black_bert.lua +++ b/data-otservbr-global/npc/black_bert.lua @@ -22,83 +22,137 @@ npcConfig.outfit = { npcConfig.flags = { floorchange = false, } + npcConfig.shop = { - { clientId = 123, buy = 16000, sell = 16000, count = 1 }, - { clientId = 130, buy = 100, count = 1 }, - { clientId = 135, buy = 5000, count = 1 }, - { clientId = 138, buy = 600, count = 1 }, - { clientId = 141, buy = 2000, count = 1 }, - { clientId = 142, buy = 6000, count = 1 }, - { clientId = 349, buy = 15000, count = 1 }, - { clientId = 396, buy = 5000, count = 1 }, - { clientId = 406, buy = 15000, count = 1 }, - { clientId = 3216, buy = 8000, count = 1 }, - { clientId = 3217, buy = 8000, count = 1 }, - { clientId = 3232, buy = 3000, count = 1 }, - { clientId = 3233, buy = 16000, count = 1 }, - { clientId = 3234, buy = 150, count = 1 }, - { clientId = 4827, buy = 18000, count = 1 }, - { clientId = 4832, buy = 24000, count = 1 }, - { clientId = 4834, buy = 1000, count = 1 }, - { clientId = 4835, buy = 8000, count = 1 }, - { clientId = 4836, buy = 15000, count = 1 }, - { clientId = 4841, buy = 3000, count = 1 }, - { clientId = 4843, buy = 500, count = 1 }, - { clientId = 4846, buy = 4000, count = 1 }, - { clientId = 4847, buy = 6000, count = 1 }, - { clientId = 5940, buy = 10000, count = 1 }, - { clientId = 6124, buy = 40000, count = 1 }, - { clientId = 7281, buy = 500, count = 1 }, - { clientId = 7924, buy = 10000, count = 1 }, - { clientId = 7936, buy = 7000, count = 1 }, - { clientId = 8453, buy = 50000, count = 1 }, - { clientId = 8746, buy = 50000, count = 1 }, - { clientId = 8818, buy = 8000, count = 1 }, - { clientId = 8822, buy = 20000, count = 1 }, - { clientId = 9107, buy = 600, count = 1 }, - { clientId = 9188, buy = 5000, count = 1 }, - { clientId = 9191, buy = 5000, count = 1 }, - { clientId = 9236, buy = 10000, count = 1 }, - { clientId = 9237, buy = 12500, count = 1 }, - { clientId = 9238, buy = 17000, count = 1 }, - { clientId = 9239, buy = 12500, count = 1 }, - { clientId = 9240, buy = 13000, count = 1 }, - { clientId = 9241, buy = 10000, count = 1 }, - { clientId = 9247, buy = 13500, count = 1 }, - { clientId = 9248, buy = 12500, count = 1 }, - { clientId = 9249, buy = 13000, count = 1 }, - { clientId = 9251, buy = 8000, count = 1 }, - { clientId = 9252, buy = 13000, count = 1 }, - { clientId = 9255, buy = 25000, count = 1 }, - { clientId = 9308, buy = 5250, count = 1 }, - { clientId = 9390, buy = 8500, count = 1 }, - { clientId = 9391, buy = 10000, count = 1 }, - { clientId = 9537, buy = 350, count = 1 }, - { clientId = 9696, buy = 1000, count = 1 }, - { clientId = 9698, buy = 1000, count = 1 }, - { clientId = 9699, buy = 1000, count = 1 }, - { clientId = 10009, buy = 700, count = 1 }, - { clientId = 10011, buy = 650, count = 1 }, - { clientId = 10025, buy = 600, count = 1 }, - { clientId = 10028, buy = 666, count = 1 }, - { clientId = 10183, buy = 1000, count = 1 }, - { clientId = 10187, buy = 1000, count = 1 }, - { clientId = 10189, buy = 1000, count = 1 }, - { clientId = 11329, buy = 1000, count = 1 }, - { clientId = 11339, buy = 550, count = 1 }, - { clientId = 11341, buy = 1000, count = 1 }, - { clientId = 11544, buy = 600, count = 1 }, - { clientId = 11545, buy = 4000, count = 1 }, - { clientId = 11546, buy = 4000, count = 1 }, - { clientId = 11547, buy = 4000, count = 1 }, - { clientId = 11548, buy = 4000, count = 1 }, - { clientId = 11549, buy = 4000, count = 1 }, - { clientId = 11550, buy = 4000, count = 1 }, - { clientId = 11551, buy = 4000, count = 1 }, - { clientId = 11552, buy = 4000, count = 1 }, - { clientId = 13974, buy = 5000, count = 1 }, - { clientId = 31414, buy = 50000, count = 1 }, - { clientId = 31447, buy = 5000, count = 1 }, + { itemname = "almanac of magic", clientid = 10025, buy = 600 }, + { itemname = "animal fetish", clientid = 9236, buy = 10000 }, + { itemname = "baby rotworm", clientid = 10026, buy = 600 }, + { itemname = "bag with naga eggs", clientid = 39577, buy = 10000 }, + { itemname = "bale of white cloth", clientid = 142, buy = 6000 }, + { itemname = "beer bottle", clientid = 136, buy = 600 }, + { itemname = "bill", clientid = 3216, buy = 8000 }, + { itemname = "blood crystal", clientid = 8453, buy = 50000 }, + { itemname = "bloodkiss flower", clientid = 9241, buy = 10000 }, + { itemname = "book with old legends", clientid = 25239, buy = 2000 }, + { itemname = "bundle of rags", clientid = 9191, buy = 5000 }, + { itemname = "butterfly conservation kit", clientid = 39340, buy = 40000 }, + { itemname = "carrying device", clientid = 9698, buy = 1000 }, + { itemname = "case of rust bugs", clientid = 350, buy = 7000 }, + { itemname = "cask of brown ale", clientid = 8774, buy = 7000 }, + { itemname = "celestial chart", clientid = 39136, buy = 10000 }, + { itemname = "cigar", clientid = 141, buy = 2000 }, + { itemname = "conch shell", clientid = 43861, buy = 10000 }, + { itemname = "cookbook", clientid = 3234, buy = 1000 }, + { itemname = "copied research notes", clientid = 40515, buy = 5000 }, + { itemname = "crate", clientid = 117, buy = 1000 }, + { itemname = "crimson nightshade blossoms", clientid = 27465, buy = 7000 }, + { itemname = "damaged logbook", clientid = 6124, buy = 40000 }, + { itemname = "dark essence", clientid = 9238, buy = 17000 }, + { itemname = "dark moon mirror", clientid = 25729, buy = 5000 }, + { itemname = "dark sun catcher", clientid = 25733, buy = 5000 }, + { itemname = "deep crystal", clientid = 9240, buy = 13000 }, + { itemname = "dragha's spellbook", clientid = 6120, buy = 16000 }, + { itemname = "elemental crystal", clientid = 9251, buy = 8000 }, + { itemname = "empty starlight vial", clientid = 25731, buy = 5000 }, + { itemname = "exploding cookie", clientid = 130, buy = 100 }, + { itemname = "exquisite silk", clientid = 11545, buy = 4000 }, + { itemname = "exquisite wood", clientid = 11547, buy = 4000 }, + { itemname = "faded last will", clientid = 11544, buy = 600 }, + { itemname = "fae talisman", clientid = 25295, buy = 5000 }, + { itemname = "family brooch", clientid = 4834, buy = 1000 }, + { itemname = "family signet ring", clientid = 406, buy = 15000 }, + { itemname = "fan club membership card", clientid = 9391, buy = 10000 }, + { itemname = "filled carrying device", clientid = 9699, buy = 1000 }, + { itemname = "fishnapped goldfish", clientid = 7936, buy = 7000 }, + { itemname = "flask of crown polisher", clientid = 10009, buy = 700 }, + { itemname = "flask of extra greasy oil", clientid = 10189, buy = 1000 }, + { itemname = "flask of poison", clientid = 10183, buy = 1000 }, + { itemname = "flexible dragon scale", clientid = 11550, buy = 4000 }, + { itemname = "formula for a memory potion", clientid = 9188, buy = 5000 }, + { itemname = "funeral urn", clientid = 4847, buy = 6000 }, + { itemname = "fur of a wolf whelp", clientid = 25238, buy = 5000 }, + { itemname = "ghost charm", clientid = 8822, buy = 20000 }, + { itemname = "ghost's tear", clientid = 8746, buy = 50000 }, + { itemname = "ghostsilver lantern", clientid = 23734, buy = 20000 }, + { itemname = "giant ape's hair", clientid = 4832, buy = 24000 }, + { itemname = "golden symbol of suon", clientid = 27499, buy = 10000 }, + { itemname = "gold nuggets", clientid = 27444, buy = 10000 }, + { itemname = "golem blueprint", clientid = 9247, buy = 13500 }, + { itemname = "golem head", clientid = 9255, buy = 25000 }, + { itemname = "hastily scribbled note", clientid = 27370, buy = 3000 }, + { itemname = "headache pill", clientid = 9537, buy = 350 }, + { itemname = "heliodor's scrolls", clientid = 43969, buy = 50000 }, + { itemname = "icicle chisel", clientid = 39578, buy = 12000 }, + { itemname = "incantation fragment", clientid = 18933, buy = 4000 }, + { itemname = "ivory lyre", clientid = 31447, buy = 50000 }, + { itemname = "julius' map", clientid = 8200, buy = 25000 }, + { itemname = "letterbag", clientid = 3217, buy = 8000 }, + { itemname = "letter to markwin", clientid = 3220, buy = 8000 }, + { itemname = "lump of clay", clientid = 1000, buy = 1000 }, + { itemname = "machine crate", clientid = 9390, buy = 8500 }, + { itemname = "magic crystal", clientid = 11552, buy = 4000 }, + { itemname = "mago mechanic core", clientid = 9249, buy = 13000 }, + { itemname = "map to the unknown", clientid = 10011, buy = 650 }, + { itemname = "memory crystal", clientid = 7281, buy = 500 }, + { itemname = "memory stone", clientid = 4841, buy = 3000 }, + { itemname = "monk's diary", clientid = 3212, buy = 3000 }, + { itemname = "morik's helmet", clientid = 8820, buy = 8000 }, + { itemname = "mystic root", clientid = 11551, buy = 4000 }, + { itemname = "nautical map", clientid = 9308, buy = 5250 }, + { itemname = "nightshade distillate", clientid = 27461, buy = 15000 }, + { itemname = "old iron", clientid = 11549, buy = 4000 }, + { itemname = "old map", clientid = 24947, buy = 2000 }, + { itemname = "old power core", clientid = 9252, buy = 13000 }, + { itemname = "part of an old map", clientid = 24943, buy = 2000 }, + { itemname = "part of an old map", clientid = 24944, buy = 2000 }, + { itemname = "part of an old map", clientid = 24945, buy = 2000 }, + { itemname = "piece of parchment", clientid = 27372, buy = 1500 }, + { itemname = "piece of parchment", clientid = 27443, buy = 1500 }, + { itemname = "piece of parchment", clientid = 27371, buy = 1500 }, + { itemname = "plans for a strange device", clientid = 9696, buy = 1000 }, + { itemname = "poison salt crystal", clientid = 22694, buy = 20000 }, + { itemname = "present", clientid = 3218, buy = 16000 }, + { itemname = "rare crystal", clientid = 9697, buy = 1000 }, + { itemname = "research notes", clientid = 8764, buy = 3000 }, + { itemname = "sacred earth", clientid = 11341, buy = 1000 }, + { itemname = "sceptre of sun and sea", clientid = 31414, buy = 50000 }, + { itemname = "secret letter", clientid = 402, buy = 1000 }, + { itemname = "shadow orb", clientid = 9237, buy = 12500 }, + { itemname = "sheet of tracing paper", clientid = 4843, buy = 500 }, + { itemname = "sheet of tracing paper", clientid = 4842, buy = 500 }, + { itemname = "silver nuggets", clientid = 27445, buy = 7000 }, + { itemname = "snake destroyer", clientid = 4835, buy = 8000 }, + { itemname = "soul contract", clientid = 10028, buy = 666 }, + { itemname = "special flask", clientid = 100, buy = 5000 }, + { itemname = "spectral cloth", clientid = 11546, buy = 4000 }, + { itemname = "spectral dress", clientid = 4836, buy = 15000 }, + { itemname = "stabilizer", clientid = 9248, buy = 12500 }, + { itemname = "stone tablet with ley lines", clientid = 27464, buy = 8000 }, + { itemname = "strange powder", clientid = 4838, buy = 5000 }, + { itemname = "striker's favourite pillow", clientid = 6105, buy = 16000 }, + { itemname = "strong sinew", clientid = 11548, buy = 4000 }, + { itemname = "suspicious documents", clientid = 400, buy = 2000 }, + { itemname = "suspicious signet ring", clientid = 349, buy = 15000 }, + { itemname = "tattered swan feather", clientid = 25244, buy = 2000 }, + { itemname = "tear of daraman", clientid = 3233, buy = 16000 }, + { itemname = "technomancer beard", clientid = 396, buy = 5000 }, + { itemname = "the alchemists' formulas", clientid = 8818, buy = 8000 }, + { itemname = "the dust of arthei", clientid = 8720, buy = 4000 }, + { itemname = "the dust of boreth", clientid = 8717, buy = 20000 }, + { itemname = "the dust of lersatio", clientid = 8718, buy = 25000 }, + { itemname = "the dust of marziel", clientid = 8719, buy = 30000 }, + { itemname = "the ring of the count", clientid = 7924, buy = 10000 }, + { itemname = "the witches' grimoire", clientid = 7874, buy = 25000 }, + { itemname = "toy mouse", clientid = 123, buy = 16000 }, + { itemname = "universal tool", clientid = 10027, buy = 550 }, + { itemname = "unworked sacred wood", clientid = 11339, buy = 1000 }, + { itemname = "waldo's post horn", clientid = 3219, buy = 2000 }, + { itemname = "whisper moss", clientid = 4827, buy = 18000 }, + { itemname = "whoopee cushion", clientid = 121, buy = 2000 }, + { itemname = "wolf tooth chain", clientid = 5940, buy = 10000 }, + { itemname = "worm queen tooth", clientid = 9239, buy = 12500 }, + { itemname = "wrinkled parchment", clientid = 4846, buy = 4000 }, + { itemname = "xodet's first wand", clientid = 9187, buy = 5000 }, } -- On buy npc shop message diff --git a/data-otservbr-global/npc/chuckles.lua b/data-otservbr-global/npc/chuckles.lua index 494e207d90d..cc53b0c9340 100644 --- a/data-otservbr-global/npc/chuckles.lua +++ b/data-otservbr-global/npc/chuckles.lua @@ -18,6 +18,56 @@ npcConfig.flags = { floorchange = false, } +local itemsTable = { + ["potions"] = { + { itemName = "empty potion flask", clientId = 283, sell = 5 }, + { itemName = "empty potion flask", clientId = 284, sell = 5 }, + { itemName = "empty potion flask", clientId = 285, sell = 5 }, + { itemName = "great health potion", clientId = 239, buy = 225 }, + { itemName = "great mana potion", clientId = 238, buy = 144 }, + { itemName = "great spirit potion", clientId = 7642, buy = 228 }, + { itemName = "health potion", clientId = 266, buy = 50 }, + { itemName = "mana potion", clientId = 268, buy = 56 }, + { itemName = "strong health potion", clientId = 236, buy = 115 }, + { itemName = "strong mana potion", clientId = 237, buy = 93 }, + { itemName = "supreme health potion", clientId = 23375, buy = 625 }, + { itemName = "ultimate health potion", clientId = 7643, buy = 379 }, + { itemName = "ultimate mana potion", clientId = 23373, buy = 438 }, + { itemName = "ultimate spirit potion", clientId = 23374, buy = 438 }, + { itemName = "vial", clientId = 2874, sell = 5 }, + }, + ["runes"] = { + { itemName = "avalanche rune", clientId = 3161, buy = 57 }, + { itemName = "blank rune", clientId = 3147, buy = 10 }, + { itemName = "chameleon rune", clientId = 3178, buy = 210 }, + { itemName = "convince creature rune", clientId = 3177, buy = 80 }, + { itemName = "cure poison rune", clientId = 3153, buy = 65 }, + { itemName = "destroy field rune", clientId = 3148, buy = 15 }, + { itemName = "energy field rune", clientId = 3164, buy = 38 }, + { itemName = "energy wall rune", clientId = 3166, buy = 85 }, + { itemName = "explosion rune", clientId = 3200, buy = 31 }, + { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, + { itemName = "fire field rune", clientId = 3188, buy = 28 }, + { itemName = "fire wall rune", clientId = 3190, buy = 61 }, + { itemName = "great fireball rune", clientId = 3191, buy = 57 }, + { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, + { itemName = "intense healing rune", clientId = 3152, buy = 95 }, + { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, + { itemName = "poison field rune", clientId = 3172, buy = 21 }, + { itemName = "poison wall rune", clientId = 3176, buy = 52 }, + { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, + { itemName = "sudden death rune", clientId = 3155, buy = 135 }, + { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, + }, +} + +npcConfig.shop = {} +for _, categoryTable in pairs(itemsTable) do + for _, itemTable in ipairs(categoryTable) do + table.insert(npcConfig.shop, itemTable) + end +end + local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) @@ -45,70 +95,31 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end +local function creatureSayCallback(npc, creature, type, message) + local player = Player(creature) + local playerId = player:getId() + + if not npcHandler:checkInteraction(npc, creature) then + return false + end + + local formattedCategoryNames = {} + for categoryName, _ in pairs(itemsTable) do + table.insert(formattedCategoryNames, "{" .. categoryName .. "}") + end + + local categoryTable = itemsTable[message:lower()] + + if categoryTable then + npcHandler:say("Of course, just browse through my wares.", npc, player) + npc:openShopWindowTable(player, categoryTable) + end + return true +end + +npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -npcConfig.shop = { - { itemName = "avalanche rune", clientId = 3161, buy = 57 }, - { itemName = "blank rune", clientId = 3147, buy = 10 }, - { itemName = "chameleon rune", clientId = 3178, buy = 210 }, - { itemName = "convince creature rune", clientId = 3177, buy = 80 }, - { itemName = "cure poison rune", clientId = 3153, buy = 65 }, - { itemName = "destroy field rune", clientId = 3148, buy = 15 }, - { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 }, - { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 }, - { itemName = "empty potion flask", clientId = 283, sell = 5 }, - { itemName = "empty potion flask", clientId = 284, sell = 5 }, - { itemName = "empty potion flask", clientId = 285, sell = 5 }, - { itemName = "energy field rune", clientId = 3164, buy = 38 }, - { itemName = "energy wall rune", clientId = 3166, buy = 85 }, - { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 }, - { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 }, - { itemName = "explosion rune", clientId = 3200, buy = 31 }, - { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, - { itemName = "fire field rune", clientId = 3188, buy = 28 }, - { itemName = "fire wall rune", clientId = 3190, buy = 61 }, - { itemName = "great fireball rune", clientId = 3191, buy = 57 }, - { itemName = "great health potion", clientId = 239, buy = 225 }, - { itemName = "great mana potion", clientId = 238, buy = 144 }, - { itemName = "great spirit potion", clientId = 7642, buy = 228 }, - { itemName = "hailstorm rod", clientId = 3067, buy = 15000 }, - { itemName = "health potion", clientId = 266, buy = 50 }, - { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, - { itemName = "intense healing rune", clientId = 3152, buy = 95 }, - { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 }, - { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 }, - { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, - { itemName = "mana potion", clientId = 268, buy = 56 }, - { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, - { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, - { itemName = "northwind rod", clientId = 8083, buy = 7500 }, - { itemName = "poison field rune", clientId = 3172, buy = 21 }, - { itemName = "poison wall rune", clientId = 3176, buy = 52 }, - { itemName = "snakebite rod", clientId = 3066, buy = 500 }, - { itemName = "spellbook", clientId = 3059, buy = 150 }, - { itemName = "spellwand", clientId = 651, sell = 299 }, - { itemName = "springsprout rod", clientId = 8084, buy = 18000 }, - { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, - { itemName = "strong health potion", clientId = 236, buy = 115 }, - { itemName = "strong mana potion", clientId = 237, buy = 93 }, - { itemName = "sudden death rune", clientId = 3155, buy = 135 }, - { itemName = "supreme health potion", clientId = 23375, buy = 625 }, - { itemName = "terra rod", clientId = 3065, buy = 10000 }, - { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, - { itemName = "ultimate health potion", clientId = 7643, buy = 379 }, - { itemName = "ultimate mana potion", clientId = 23373, buy = 438 }, - { itemName = "ultimate spirit potion", clientId = 23374, buy = 438 }, - { itemName = "underworld rod", clientId = 8082, buy = 22000 }, - { itemName = "vial", clientId = 2874, sell = 5 }, - { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, - { itemName = "wand of decay", clientId = 3072, buy = 5000 }, - { itemName = "wand of draconia", clientId = 8093, buy = 5000 }, - { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, - { itemName = "wand of inferno", clientId = 3071, buy = 15000 }, - { itemName = "wand of starstorm", clientId = 8092, buy = 18000 }, - { itemName = "wand of voodoo", clientId = 8094, buy = 22000 }, - { itemName = "wand of vortex", clientId = 3074, buy = 500 }, -} -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) npc:sellItem(player, itemId, amount, subType, 0, ignore, inBackpacks) diff --git a/data-otservbr-global/npc/fenech.lua b/data-otservbr-global/npc/fenech.lua index 9427983b9ba..792f6a26614 100644 --- a/data-otservbr-global/npc/fenech.lua +++ b/data-otservbr-global/npc/fenech.lua @@ -29,6 +29,57 @@ npcConfig.voices = { { text = "Offering all sorts of magic equipment." }, } +local itemsTable = { + ["wands"] = { + { itemName = "hailstorm rod", clientId = 3067, buy = 15000 }, + { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, + { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, + { itemName = "northwind rod", clientId = 8083, buy = 7500 }, + { itemName = "snakebite rod", clientId = 3066, buy = 500 }, + { itemName = "springsprout rod", clientId = 8084, buy = 18000 }, + { itemName = "terra rod", clientId = 3065, buy = 10000 }, + { itemName = "underworld rod", clientId = 8082, buy = 22000 }, + { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, + { itemName = "wand of decay", clientId = 3072, buy = 5000 }, + { itemName = "wand of draconia", clientId = 8093, buy = 7500 }, + { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, + { itemName = "wand of inferno", clientId = 3071, buy = 15000 }, + { itemName = "wand of starstorm", clientId = 8092, buy = 18000 }, + { itemName = "wand of voodoo", clientId = 8094, buy = 22000 }, + { itemName = "wand of vortex", clientId = 3074, buy = 500 }, + }, + ["runes"] = { + { itemName = "avalanche rune", clientId = 3161, buy = 57 }, + { itemName = "blank rune", clientId = 3147, buy = 10 }, + { itemName = "chameleon rune", clientId = 3178, buy = 210 }, + { itemName = "convince creature rune", clientId = 3177, buy = 80 }, + { itemName = "cure poison rune", clientId = 3153, buy = 65 }, + { itemName = "destroy field rune", clientId = 3148, buy = 15 }, + { itemName = "energy field rune", clientId = 3164, buy = 38 }, + { itemName = "energy wall rune", clientId = 3166, buy = 85 }, + { itemName = "explosion rune", clientId = 3200, buy = 31 }, + { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, + { itemName = "fire field rune", clientId = 3188, buy = 28 }, + { itemName = "fire wall rune", clientId = 3190, buy = 61 }, + { itemName = "great fireball rune", clientId = 3191, buy = 57 }, + { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, + { itemName = "intense healing rune", clientId = 3152, buy = 95 }, + { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, + { itemName = "poison field rune", clientId = 3172, buy = 21 }, + { itemName = "poison wall rune", clientId = 3176, buy = 52 }, + { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, + { itemName = "sudden death rune", clientId = 3155, buy = 135 }, + { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, + }, +} + +npcConfig.shop = {} +for _, categoryTable in pairs(itemsTable) do + for _, itemTable in ipairs(categoryTable) do + table.insert(npcConfig.shop, itemTable) + end +end + local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) @@ -69,6 +120,12 @@ local function creatureSayCallback(npc, creature, type, message) return false end + local formattedCategoryNames = {} + for categoryName, _ in pairs(itemsTable) do + table.insert(formattedCategoryNames, "{" .. categoryName .. "}") + end + + local categoryTable = itemsTable[message:lower()] local itemId = items[player:getVocation():getBaseId()] if MsgContains(message, "first rod") or MsgContains(message, "first wand") then if player:isMage() then @@ -91,6 +148,9 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "no") and npcHandler:getTopic(playerId) == 1 then npcHandler:say("Ok then.", npc, creature) npcHandler:setTopic(playerId, 0) + elseif categoryTable then + npcHandler:say("Of course, just browse through my wares.", npc, player) + npc:openShopWindowTable(player, categoryTable) end return true end @@ -99,56 +159,9 @@ npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:setMessage(MESSAGE_GREET, "Be mourned pilgrim in flesh and welcome to the magic store.") npcHandler:setMessage(MESSAGE_FAREWELL, "May enlightenment be your path.") npcHandler:setMessage(MESSAGE_WALKAWAY, "May enlightenment be your path.") -npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at wands or runes?") +npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at {wands} or {runes}?") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -npcConfig.shop = { - { itemName = "avalanche rune", clientId = 3161, buy = 57 }, - { itemName = "blank rune", clientId = 3147, buy = 10 }, - { itemName = "chameleon rune", clientId = 3178, buy = 210 }, - { itemName = "convince creature rune", clientId = 3177, buy = 80 }, - { itemName = "cure poison rune", clientId = 3153, buy = 65 }, - { itemName = "destroy field rune", clientId = 3148, buy = 15 }, - { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 }, - { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 }, - { itemName = "energy field rune", clientId = 3164, buy = 38 }, - { itemName = "energy wall rune", clientId = 3166, buy = 85 }, - { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 }, - { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 }, - { itemName = "explosion rune", clientId = 3200, buy = 31 }, - { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, - { itemName = "fire field rune", clientId = 3188, buy = 28 }, - { itemName = "fire wall rune", clientId = 3190, buy = 61 }, - { itemName = "great fireball rune", clientId = 3191, buy = 57 }, - { itemName = "hailstorm rod", clientId = 3067, buy = 15000 }, - { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, - { itemName = "intense healing rune", clientId = 3152, buy = 95 }, - { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 }, - { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 }, - { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, - { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, - { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, - { itemName = "northwind rod", clientId = 8083, buy = 7500 }, - { itemName = "poison field rune", clientId = 3172, buy = 21 }, - { itemName = "poison wall rune", clientId = 3176, buy = 52 }, - { itemName = "snakebite rod", clientId = 3066, buy = 500 }, - { itemName = "spellbook", clientId = 3059, buy = 150 }, - { itemName = "spellwand", clientId = 651, sell = 299 }, - { itemName = "springsprout rod", clientId = 8084, buy = 18000 }, - { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, - { itemName = "sudden death rune", clientId = 3155, buy = 135 }, - { itemName = "terra rod", clientId = 3065, buy = 10000 }, - { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, - { itemName = "underworld rod", clientId = 8082, buy = 22000 }, - { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, - { itemName = "wand of decay", clientId = 3072, buy = 5000 }, - { itemName = "wand of draconia", clientId = 8093, buy = 7500 }, - { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, - { itemName = "wand of inferno", clientId = 3071, buy = 15000 }, - { itemName = "wand of starstorm", clientId = 8092, buy = 18000 }, - { itemName = "wand of voodoo", clientId = 8094, buy = 22000 }, - { itemName = "wand of vortex", clientId = 3074, buy = 500 }, -} -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) npc:sellItem(player, itemId, amount, subType, 0, ignore, inBackpacks) diff --git a/data-otservbr-global/npc/frans.lua b/data-otservbr-global/npc/frans.lua index a765815e597..a606f3137ba 100644 --- a/data-otservbr-global/npc/frans.lua +++ b/data-otservbr-global/npc/frans.lua @@ -18,6 +18,55 @@ npcConfig.flags = { floorchange = false, } +npcConfig.voices = { + interval = 15000, + chance = 50, + { text = "Aaaaah... ruuunes... waaaaaands... rooooods... spellboooooks..." }, +} + +local itemsTable = { + ["wands"] = { + { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, + { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, + { itemName = "snakebite rod", clientId = 3066, buy = 500 }, + { itemName = "terra rod", clientId = 3065, buy = 10000 }, + { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, + { itemName = "wand of decay", clientId = 3072, buy = 5000 }, + { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, + { itemName = "wand of vortex", clientId = 3074, buy = 500 }, + }, + ["runes"] = { + { itemName = "avalanche rune", clientId = 3161, buy = 57 }, + { itemName = "blank rune", clientId = 3147, buy = 10 }, + { itemName = "chameleon rune", clientId = 3178, buy = 210 }, + { itemName = "convince creature rune", clientId = 3177, buy = 80 }, + { itemName = "cure poison rune", clientId = 3153, buy = 65 }, + { itemName = "destroy field rune", clientId = 3148, buy = 15 }, + { itemName = "energy field rune", clientId = 3164, buy = 38 }, + { itemName = "energy wall rune", clientId = 3166, buy = 85 }, + { itemName = "explosion rune", clientId = 3200, buy = 31 }, + { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, + { itemName = "fire field rune", clientId = 3188, buy = 28 }, + { itemName = "fire wall rune", clientId = 3190, buy = 61 }, + { itemName = "great fireball rune", clientId = 3191, buy = 57 }, + { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, + { itemName = "intense healing rune", clientId = 3152, buy = 95 }, + { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, + { itemName = "poison field rune", clientId = 3172, buy = 21 }, + { itemName = "poison wall rune", clientId = 3176, buy = 52 }, + { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, + { itemName = "sudden death rune", clientId = 3155, buy = 135 }, + { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, + }, +} + +npcConfig.shop = {} +for _, categoryTable in pairs(itemsTable) do + for _, itemTable in ipairs(categoryTable) do + table.insert(npcConfig.shop, itemTable) + end +end + local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) @@ -45,47 +94,35 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end +local function creatureSayCallback(npc, creature, type, message) + local player = Player(creature) + local playerId = player:getId() + + if not npcHandler:checkInteraction(npc, creature) then + return false + end + + local formattedCategoryNames = {} + for categoryName, _ in pairs(itemsTable) do + table.insert(formattedCategoryNames, "{" .. categoryName .. "}") + end + + local categoryTable = itemsTable[message:lower()] + + if categoryTable then + npcHandler:say("Of course, just browse through my wares.", npc, player) + npc:openShopWindowTable(player, categoryTable) + end + return true +end + +npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) +npcHandler:setMessage(MESSAGE_GREET, "Beeee greeeeted, Simula! What is your neeeed?") +npcHandler:setMessage(MESSAGE_FAREWELL, "Bye.") +npcHandler:setMessage(MESSAGE_WALKAWAY, "Bye.") +npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at {wands} or {runes}?") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -npcConfig.shop = { - { itemName = "avalanche rune", clientId = 3161, buy = 57 }, - { itemName = "blank rune", clientId = 3147, buy = 10 }, - { itemName = "chameleon rune", clientId = 3178, buy = 210 }, - { itemName = "convince creature rune", clientId = 3177, buy = 80 }, - { itemName = "cure poison rune", clientId = 3153, buy = 65 }, - { itemName = "destroy field rune", clientId = 3148, buy = 15 }, - { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 }, - { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 }, - { itemName = "energy field rune", clientId = 3164, buy = 38 }, - { itemName = "energy wall rune", clientId = 3166, buy = 85 }, - { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 }, - { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 }, - { itemName = "explosion rune", clientId = 3200, buy = 31 }, - { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, - { itemName = "fire field rune", clientId = 3188, buy = 28 }, - { itemName = "fire wall rune", clientId = 3190, buy = 61 }, - { itemName = "great fireball rune", clientId = 3191, buy = 57 }, - { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, - { itemName = "intense healing rune", clientId = 3152, buy = 95 }, - { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 }, - { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 }, - { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, - { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, - { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, - { itemName = "poison field rune", clientId = 3172, buy = 21 }, - { itemName = "poison wall rune", clientId = 3176, buy = 52 }, - { itemName = "snakebite rod", clientId = 3066, buy = 500 }, - { itemName = "spellbook", clientId = 3059, buy = 150 }, - { itemName = "spellwand", clientId = 651, sell = 299 }, - { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, - { itemName = "sudden death rune", clientId = 3155, buy = 135 }, - { itemName = "terra rod", clientId = 3065, buy = 10000 }, - { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, - { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, - { itemName = "wand of decay", clientId = 3072, buy = 5000 }, - { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, - { itemName = "wand of vortex", clientId = 3074, buy = 500 }, -} -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) npc:sellItem(player, itemId, amount, subType, 0, ignore, inBackpacks) diff --git a/data-otservbr-global/npc/frederik.lua b/data-otservbr-global/npc/frederik.lua index e19513213ab..c95baed2a4a 100644 --- a/data-otservbr-global/npc/frederik.lua +++ b/data-otservbr-global/npc/frederik.lua @@ -23,6 +23,74 @@ npcConfig.flags = { floorchange = false, } +local itemsTable = { + ["wands"] = { + { itemName = "hailstorm rod", clientId = 3067, buy = 15000 }, + { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, + { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, + { itemName = "northwind rod", clientId = 8083, buy = 7500 }, + { itemName = "snakebite rod", clientId = 3066, buy = 500 }, + { itemName = "springsprout rod", clientId = 8084, buy = 18000 }, + { itemName = "terra rod", clientId = 3065, buy = 10000 }, + { itemName = "underworld rod", clientId = 8082, buy = 22000 }, + { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, + { itemName = "wand of decay", clientId = 3072, buy = 5000 }, + { itemName = "wand of draconia", clientId = 8093, buy = 7500 }, + { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, + { itemName = "wand of inferno", clientId = 3071, buy = 15000 }, + { itemName = "wand of starstorm", clientId = 8092, buy = 18000 }, + { itemName = "wand of voodoo", clientId = 8094, buy = 22000 }, + { itemName = "wand of vortex", clientId = 3074, buy = 500 }, + }, + ["runes"] = { + { itemName = "avalanche rune", clientId = 3161, buy = 57 }, + { itemName = "blank rune", clientId = 3147, buy = 10 }, + { itemName = "chameleon rune", clientId = 3178, buy = 210 }, + { itemName = "convince creature rune", clientId = 3177, buy = 80 }, + { itemName = "cure poison rune", clientId = 3153, buy = 65 }, + { itemName = "destroy field rune", clientId = 3148, buy = 15 }, + { itemName = "energy field rune", clientId = 3164, buy = 38 }, + { itemName = "energy wall rune", clientId = 3166, buy = 85 }, + { itemName = "explosion rune", clientId = 3200, buy = 31 }, + { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, + { itemName = "fire field rune", clientId = 3188, buy = 28 }, + { itemName = "fire wall rune", clientId = 3190, buy = 61 }, + { itemName = "great fireball rune", clientId = 3191, buy = 57 }, + { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, + { itemName = "intense healing rune", clientId = 3152, buy = 95 }, + { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, + { itemName = "poison field rune", clientId = 3172, buy = 21 }, + { itemName = "poison wall rune", clientId = 3176, buy = 52 }, + { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, + { itemName = "sudden death rune", clientId = 3155, buy = 135 }, + { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, + }, + ["potions"] = { + { itemName = "empty potion flask", clientId = 283, sell = 5 }, + { itemName = "empty potion flask", clientId = 284, sell = 5 }, + { itemName = "empty potion flask", clientId = 285, sell = 5 }, + { itemName = "great health potion", clientId = 239, buy = 225 }, + { itemName = "great mana potion", clientId = 238, buy = 144 }, + { itemName = "great spirit potion", clientId = 7642, buy = 228 }, + { itemName = "health potion", clientId = 266, buy = 50 }, + { itemName = "mana potion", clientId = 268, buy = 56 }, + { itemName = "strong health potion", clientId = 236, buy = 115 }, + { itemName = "strong mana potion", clientId = 237, buy = 93 }, + { itemName = "supreme health potion", clientId = 23375, buy = 625 }, + { itemName = "ultimate health potion", clientId = 7643, buy = 379 }, + { itemName = "ultimate mana potion", clientId = 23373, buy = 438 }, + { itemName = "ultimate spirit potion", clientId = 23374, buy = 438 }, + { itemName = "vial", clientId = 2874, sell = 5 }, + }, +} + +npcConfig.shop = {} +for _, categoryTable in pairs(itemsTable) do + for _, itemTable in ipairs(categoryTable) do + table.insert(npcConfig.shop, itemTable) + end +end + local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) @@ -50,70 +118,35 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end +local function creatureSayCallback(npc, creature, type, message) + local player = Player(creature) + local playerId = player:getId() + + if not npcHandler:checkInteraction(npc, creature) then + return false + end + + local formattedCategoryNames = {} + for categoryName, _ in pairs(itemsTable) do + table.insert(formattedCategoryNames, "{" .. categoryName .. "}") + end + + local categoryTable = itemsTable[message:lower()] + + if categoryTable then + npcHandler:say("Of course, just browse through my wares.", npc, player) + npc:openShopWindowTable(player, categoryTable) + end + return true +end + +npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) +npcHandler:setMessage(MESSAGE_GREET, "Hi there and welcome to my little magic shop.") +npcHandler:setMessage(MESSAGE_FAREWELL, "Yeah, bye.") +npcHandler:setMessage(MESSAGE_WALKAWAY, "Yeah, bye.") +npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at {potions}, {wands} or {runes}?") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -npcConfig.shop = { - { itemName = "avalanche rune", clientId = 3161, buy = 57 }, - { itemName = "blank rune", clientId = 3147, buy = 10 }, - { itemName = "chameleon rune", clientId = 3178, buy = 210 }, - { itemName = "convince creature rune", clientId = 3177, buy = 80 }, - { itemName = "cure poison rune", clientId = 3153, buy = 65 }, - { itemName = "destroy field rune", clientId = 3148, buy = 15 }, - { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 }, - { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 }, - { itemName = "empty potion flask", clientId = 283, sell = 5 }, - { itemName = "empty potion flask", clientId = 284, sell = 5 }, - { itemName = "empty potion flask", clientId = 285, sell = 5 }, - { itemName = "energy field rune", clientId = 3164, buy = 38 }, - { itemName = "energy wall rune", clientId = 3166, buy = 85 }, - { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 }, - { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 }, - { itemName = "explosion rune", clientId = 3200, buy = 31 }, - { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, - { itemName = "fire field rune", clientId = 3188, buy = 28 }, - { itemName = "fire wall rune", clientId = 3190, buy = 61 }, - { itemName = "great fireball rune", clientId = 3191, buy = 57 }, - { itemName = "great health potion", clientId = 239, buy = 225 }, - { itemName = "great mana potion", clientId = 238, buy = 144 }, - { itemName = "great spirit potion", clientId = 7642, buy = 228 }, - { itemName = "hailstorm rod", clientId = 3067, buy = 15000 }, - { itemName = "health potion", clientId = 266, buy = 50 }, - { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, - { itemName = "intense healing rune", clientId = 3152, buy = 95 }, - { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 }, - { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 }, - { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, - { itemName = "mana potion", clientId = 268, buy = 56 }, - { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, - { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, - { itemName = "northwind rod", clientId = 8083, buy = 7500 }, - { itemName = "poison field rune", clientId = 3172, buy = 21 }, - { itemName = "poison wall rune", clientId = 3176, buy = 52 }, - { itemName = "snakebite rod", clientId = 3066, buy = 500 }, - { itemName = "spellbook", clientId = 3059, buy = 150 }, - { itemName = "spellwand", clientId = 651, sell = 299 }, - { itemName = "springsprout rod", clientId = 8084, buy = 18000 }, - { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, - { itemName = "strong health potion", clientId = 236, buy = 115 }, - { itemName = "strong mana potion", clientId = 237, buy = 93 }, - { itemName = "sudden death rune", clientId = 3155, buy = 135 }, - { itemName = "supreme health potion", clientId = 23375, buy = 625 }, - { itemName = "terra rod", clientId = 3065, buy = 10000 }, - { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, - { itemName = "ultimate health potion", clientId = 7643, buy = 379 }, - { itemName = "ultimate mana potion", clientId = 23373, buy = 438 }, - { itemName = "ultimate spirit potion", clientId = 23374, buy = 438 }, - { itemName = "underworld rod", clientId = 8082, buy = 22000 }, - { itemName = "vial", clientId = 2874, sell = 5 }, - { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, - { itemName = "wand of decay", clientId = 3072, buy = 5000 }, - { itemName = "wand of draconia", clientId = 8093, buy = 7500 }, - { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, - { itemName = "wand of inferno", clientId = 3071, buy = 15000 }, - { itemName = "wand of starstorm", clientId = 8092, buy = 18000 }, - { itemName = "wand of voodoo", clientId = 8094, buy = 22000 }, - { itemName = "wand of vortex", clientId = 3074, buy = 500 }, -} -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) npc:sellItem(player, itemId, amount, subType, 0, ignore, inBackpacks) diff --git a/data-otservbr-global/npc/ghorza.lua b/data-otservbr-global/npc/ghorza.lua index fcd7f2949af..d085363c4e6 100644 --- a/data-otservbr-global/npc/ghorza.lua +++ b/data-otservbr-global/npc/ghorza.lua @@ -23,6 +23,75 @@ npcConfig.flags = { floorchange = false, } +npcConfig.voices = { + interval = 15000, + chance = 50, + { text = "Great Hunger is upset." }, + { text = "Spirits are restless." }, + { text = "All water drying up and Vuzrog does nothing!" }, +} + +local itemsTable = { + ["potions"] = { + { itemName = "empty potion flask", clientId = 283, sell = 5 }, + { itemName = "empty potion flask", clientId = 284, sell = 5 }, + { itemName = "empty potion flask", clientId = 285, sell = 5 }, + { itemName = "great health potion", clientId = 239, buy = 225 }, + { itemName = "great mana potion", clientId = 238, buy = 144 }, + { itemName = "great spirit potion", clientId = 7642, buy = 228 }, + { itemName = "health potion", clientId = 266, buy = 50 }, + { itemName = "mana potion", clientId = 268, buy = 56 }, + { itemName = "strong health potion", clientId = 236, buy = 115 }, + { itemName = "strong mana potion", clientId = 237, buy = 93 }, + { itemName = "supreme health potion", clientId = 23375, buy = 625 }, + { itemName = "ultimate health potion", clientId = 7643, buy = 379 }, + { itemName = "ultimate mana potion", clientId = 23373, buy = 438 }, + { itemName = "ultimate spirit potion", clientId = 23374, buy = 438 }, + { itemName = "vial", clientId = 2874, sell = 5 }, + }, + ["runes"] = { + { itemName = "animate dead rune", clientId = 3203, buy = 375 }, + { itemName = "avalanche rune", clientId = 3161, buy = 57 }, + { itemName = "blank rune", clientId = 3147, buy = 10 }, + { itemName = "chameleon rune", clientId = 3178, buy = 210 }, + { itemName = "convince creature rune", clientId = 3177, buy = 80 }, + { itemName = "cure poison rune", clientId = 3153, buy = 65 }, + { itemName = "destroy field rune", clientId = 3148, buy = 15 }, + { itemName = "disintegrate rune", clientId = 3197, buy = 26 }, + { itemName = "energy bomb rune", clientId = 3149, buy = 203 }, + { itemName = "energy field rune", clientId = 3164, buy = 38 }, + { itemName = "energy wall rune", clientId = 3166, buy = 85 }, + { itemName = "explosion rune", clientId = 3200, buy = 31 }, + { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, + { itemName = "fire field rune", clientId = 3188, buy = 28 }, + { itemName = "fire wall rune", clientId = 3190, buy = 61 }, + { itemName = "fireball rune", clientId = 3189, buy = 30 }, + { itemName = "great fireball rune", clientId = 3191, buy = 57 }, + { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, + { itemName = "icicle rune", clientId = 3158, buy = 30 }, + { itemName = "holy missile rune", clientId = 3182, buy = 16 }, + { itemName = "intense healing rune", clientId = 3152, buy = 95 }, + { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, + { itemName = "magic wall rune", clientId = 3180, buy = 116 }, + { itemName = "paralyze rune", clientId = 3165, buy = 700 }, + { itemName = "poison bomb rune", clientId = 3173, buy = 85 }, + { itemName = "soulfire rune", clientId = 3195, buy = 46 }, + { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, + { itemName = "stone shower rune", clientId = 3175, buy = 37 }, + { itemName = "sudden death rune", clientId = 3155, buy = 135 }, + { itemName = "thunderstorm rune", clientId = 3202, buy = 47 }, + { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, + { itemName = "wild growth rune", clientId = 3156, buy = 160 }, + }, +} + +npcConfig.shop = {} +for _, categoryTable in pairs(itemsTable) do + for _, itemTable in ipairs(categoryTable) do + table.insert(npcConfig.shop, itemTable) + end +end + local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) @@ -46,59 +115,35 @@ npcType.onThink = function(npc, interval) npcHandler:onThink(npc, interval) end +local function creatureSayCallback(npc, creature, type, message) + local player = Player(creature) + local playerId = player:getId() + + if not npcHandler:checkInteraction(npc, creature) then + return false + end + + local formattedCategoryNames = {} + for categoryName, _ in pairs(itemsTable) do + table.insert(formattedCategoryNames, "{" .. categoryName .. "}") + end + + local categoryTable = itemsTable[message:lower()] + + if categoryTable then + npcHandler:say("Of course, just browse through my wares.", npc, player) + npc:openShopWindowTable(player, categoryTable) + end + return true +end + +npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) +npcHandler:setMessage(MESSAGE_GREET, "Hello, scraggy human.") +npcHandler:setMessage(MESSAGE_FAREWELL, "Take care of evil spirits.") +npcHandler:setMessage(MESSAGE_WALKAWAY, "Take care of evil spirits.") +npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at {potions} or {runes}?") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -npcConfig.shop = { - { itemName = "animate dead rune", clientId = 3203, buy = 375 }, - { itemName = "avalanche rune", clientId = 3161, buy = 57 }, - { itemName = "blank rune", clientId = 3147, buy = 10 }, - { itemName = "chameleon rune", clientId = 3178, buy = 210 }, - { itemName = "convince creature rune", clientId = 3177, buy = 80 }, - { itemName = "cure poison rune", clientId = 3153, buy = 65 }, - { itemName = "destroy field rune", clientId = 3148, buy = 15 }, - { itemName = "disintegrate rune", clientId = 3197, buy = 26 }, - { itemName = "empty potion flask", clientId = 283, sell = 5 }, - { itemName = "empty potion flask", clientId = 284, sell = 5 }, - { itemName = "empty potion flask", clientId = 285, sell = 5 }, - { itemName = "energy bomb rune", clientId = 3149, buy = 203 }, - { itemName = "energy field rune", clientId = 3164, buy = 38 }, - { itemName = "energy wall rune", clientId = 3166, buy = 85 }, - { itemName = "explosion rune", clientId = 3200, buy = 31 }, - { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, - { itemName = "fire field rune", clientId = 3188, buy = 28 }, - { itemName = "fire wall rune", clientId = 3190, buy = 61 }, - { itemName = "fireball rune", clientId = 3189, buy = 30 }, - { itemName = "great fireball rune", clientId = 3191, buy = 57 }, - { itemName = "great health potion", clientId = 239, buy = 225 }, - { itemName = "great mana potion", clientId = 238, buy = 144 }, - { itemName = "great spirit potion", clientId = 7642, buy = 228 }, - { itemName = "health potion", clientId = 266, buy = 50 }, - { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, - { itemName = "holy missile rune", clientId = 3182, buy = 16 }, - { itemName = "icicle rune", clientId = 3158, buy = 30 }, - { itemName = "intense healing rune", clientId = 3152, buy = 95 }, - { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, - { itemName = "magic wall rune", clientId = 3180, buy = 116 }, - { itemName = "mana potion", clientId = 268, buy = 56 }, - { itemName = "paralyze rune", clientId = 3165, buy = 700 }, - { itemName = "poison bomb rune", clientId = 3173, buy = 85 }, - { itemName = "poison field rune", clientId = 3172, buy = 21 }, - { itemName = "poison wall rune", clientId = 3176, buy = 52 }, - { itemName = "soulfire rune", clientId = 3195, buy = 46 }, - { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, - { itemName = "stone shower rune", clientId = 3175, buy = 37 }, - { itemName = "strong health potion", clientId = 236, buy = 115 }, - { itemName = "strong mana potion", clientId = 237, buy = 93 }, - { itemName = "sudden death rune", clientId = 3155, buy = 135 }, - { itemName = "supreme health potion", clientId = 23375, buy = 625 }, - { itemName = "thunderstorm rune", clientId = 3202, buy = 47 }, - { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, - { itemName = "ultimate health potion", clientId = 7643, buy = 379 }, - { itemName = "ultimate mana potion", clientId = 23373, buy = 438 }, - { itemName = "ultimate spirit potion", clientId = 23374, buy = 438 }, - { itemName = "vial", clientId = 2874, sell = 5 }, - { itemName = "wild growth rune", clientId = 3156, buy = 160 }, -} -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) npc:sellItem(player, itemId, amount, subType, 0, ignore, inBackpacks) diff --git a/data-otservbr-global/npc/gnomegica.lua b/data-otservbr-global/npc/gnomegica.lua index 2f264240b3d..9e61340a24f 100644 --- a/data-otservbr-global/npc/gnomegica.lua +++ b/data-otservbr-global/npc/gnomegica.lua @@ -23,6 +23,70 @@ npcConfig.flags = { floorchange = false, } +npcConfig.voices = { + interval = 15000, + chance = 50, + { text = "Oh my, such a mess! I really should clean up things more often." }, + { text = "Laaa Laaa LaLa Laa Laaa!" }, +} + +local itemsTable = { + ["potions"] = { + { itemName = "empty potion flask", clientId = 283, sell = 5 }, + { itemName = "empty potion flask", clientId = 284, sell = 5 }, + { itemName = "empty potion flask", clientId = 285, sell = 5 }, + { itemName = "great health potion", clientId = 239, buy = 225 }, + { itemName = "great mana potion", clientId = 238, buy = 144 }, + { itemName = "great spirit potion", clientId = 7642, buy = 228 }, + { itemName = "health potion", clientId = 266, buy = 50 }, + { itemName = "mana potion", clientId = 268, buy = 56 }, + { itemName = "strong health potion", clientId = 236, buy = 115 }, + { itemName = "strong mana potion", clientId = 237, buy = 93 }, + { itemName = "ultimate health potion", clientId = 7643, buy = 379 }, + { itemName = "vial", clientId = 2874, sell = 5 }, + }, + ["runes"] = { + { itemName = "avalanche rune", clientId = 3161, buy = 57 }, + { itemName = "blank rune", clientId = 3147, buy = 10 }, + { itemName = "chameleon rune", clientId = 3178, buy = 210 }, + { itemName = "convince creature rune", clientId = 3177, buy = 80 }, + { itemName = "cure poison rune", clientId = 3153, buy = 65 }, + { itemName = "destroy field rune", clientId = 3148, buy = 15 }, + { itemName = "energy field rune", clientId = 3164, buy = 38 }, + { itemName = "energy wall rune", clientId = 3166, buy = 85 }, + { itemName = "explosion rune", clientId = 3200, buy = 31 }, + { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, + { itemName = "fire field rune", clientId = 3188, buy = 28 }, + { itemName = "fire wall rune", clientId = 3190, buy = 61 }, + { itemName = "great fireball rune", clientId = 3191, buy = 57 }, + { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, + { itemName = "intense healing rune", clientId = 3152, buy = 95 }, + { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, + { itemName = "poison field rune", clientId = 3172, buy = 21 }, + { itemName = "poison wall rune", clientId = 3176, buy = 52 }, + { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, + { itemName = "sudden death rune", clientId = 3155, buy = 135 }, + { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, + }, + ["wands"] = { + { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, + { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, + { itemName = "snakebite rod", clientId = 3066, buy = 500 }, + { itemName = "terra rod", clientId = 3065, buy = 10000 }, + { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, + { itemName = "wand of decay", clientId = 3072, buy = 5000 }, + { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, + { itemName = "wand of vortex", clientId = 3074, buy = 500 }, + }, +} + +npcConfig.shop = {} +for _, categoryTable in pairs(itemsTable) do + for _, itemTable in ipairs(categoryTable) do + table.insert(npcConfig.shop, itemTable) + end +end + local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) @@ -50,59 +114,35 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end +local function creatureSayCallback(npc, creature, type, message) + local player = Player(creature) + local playerId = player:getId() + + if not npcHandler:checkInteraction(npc, creature) then + return false + end + + local formattedCategoryNames = {} + for categoryName, _ in pairs(itemsTable) do + table.insert(formattedCategoryNames, "{" .. categoryName .. "}") + end + + local categoryTable = itemsTable[message:lower()] + + if categoryTable then + npcHandler:say("Of course, just browse through my wares.", npc, player) + npc:openShopWindowTable(player, categoryTable) + end + return true +end + +npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) +npcHandler:setMessage(MESSAGE_GREET, "Greetings! You came to the right gnome to buy {potions}, {runes} or {wands}. So let's talk about a {trade}.") +npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye and come again.") +npcHandler:setMessage(MESSAGE_WALKAWAY, "Good bye and come again.") +npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at {potions}, {wands} or {runes}?") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -npcConfig.shop = { - { itemName = "avalanche rune", clientId = 3161, buy = 57 }, - { itemName = "blank rune", clientId = 3147, buy = 10 }, - { itemName = "chameleon rune", clientId = 3178, buy = 210 }, - { itemName = "convince creature rune", clientId = 3177, buy = 80 }, - { itemName = "cure poison rune", clientId = 3153, buy = 65 }, - { itemName = "destroy field rune", clientId = 3148, buy = 15 }, - { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 }, - { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 }, - { itemName = "empty potion flask", clientId = 283, sell = 5 }, - { itemName = "empty potion flask", clientId = 284, sell = 5 }, - { itemName = "empty potion flask", clientId = 285, sell = 5 }, - { itemName = "energy field rune", clientId = 3164, buy = 38 }, - { itemName = "energy wall rune", clientId = 3166, buy = 85 }, - { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 }, - { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 }, - { itemName = "explosion rune", clientId = 3200, buy = 31 }, - { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, - { itemName = "fire field rune", clientId = 3188, buy = 28 }, - { itemName = "fire wall rune", clientId = 3190, buy = 61 }, - { itemName = "great fireball rune", clientId = 3191, buy = 57 }, - { itemName = "great health potion", clientId = 239, buy = 225 }, - { itemName = "great mana potion", clientId = 238, buy = 144 }, - { itemName = "great spirit potion", clientId = 7642, buy = 228 }, - { itemName = "health potion", clientId = 266, buy = 50 }, - { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, - { itemName = "intense healing rune", clientId = 3152, buy = 95 }, - { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 }, - { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 }, - { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, - { itemName = "mana potion", clientId = 268, buy = 56 }, - { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, - { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, - { itemName = "poison field rune", clientId = 3172, buy = 21 }, - { itemName = "poison wall rune", clientId = 3176, buy = 52 }, - { itemName = "snakebite rod", clientId = 3066, buy = 500 }, - { itemName = "spellbook", clientId = 3101, buy = 150 }, - { itemName = "spellwand", clientId = 651, sell = 299 }, - { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, - { itemName = "strong health potion", clientId = 236, buy = 115 }, - { itemName = "strong mana potion", clientId = 237, buy = 93 }, - { itemName = "sudden death rune", clientId = 3155, buy = 135 }, - { itemName = "terra rod", clientId = 3065, buy = 10000 }, - { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, - { itemName = "ultimate health potion", clientId = 7643, buy = 379 }, - { itemName = "vial", clientId = 2874, sell = 5 }, - { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, - { itemName = "wand of decay", clientId = 3072, buy = 5000 }, - { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, - { itemName = "wand of vortex", clientId = 3074, buy = 500 }, -} -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) npc:sellItem(player, itemId, amount, subType, 0, ignore, inBackpacks) diff --git a/data-otservbr-global/npc/hamish.lua b/data-otservbr-global/npc/hamish.lua index 45b5ced3027..9d9029b556f 100644 --- a/data-otservbr-global/npc/hamish.lua +++ b/data-otservbr-global/npc/hamish.lua @@ -26,13 +26,52 @@ npcConfig.flags = { npcConfig.voices = { interval = 15000, chance = 50, - { text = "Health potions to refill your health in combat!" }, - { text = "Potions! Wand! Runes! Get them here!" }, + { text = "That's the spirit!" }, + { text = "Potions! Wands! Runes! Get them here!" }, + { text = "You levelled up but your wand is old? Come and buy a new one here!" }, + { text = "Ran out of mana or a little kablooie? Come to me to resupply!" }, + { text = "Low on magic and need a little extra? Get yourself a rune!" }, { text = "Pack of monsters give you trouble? Throw an area rune at them!" }, + { text = "Health potions to refill your health in combat!" }, + { text = "Taking back empty potion flasks! Get your deposit back here!" }, { text = "Careful with that! That's a highly reactive potion you have there!" }, - { text = "Run out of mana or a little kablooie? Come to me to resupply!" }, + { text = "Mana potions to refill your magic power!" }, +} + +local itemsTable = { + ["potions"] = { + { itemName = "health potion", clientId = 266, buy = 50 }, + { itemName = "mana potion", clientId = 268, buy = 56 }, + { itemName = "small health potion", clientId = 7876, buy = 20 }, + }, + ["runes"] = { + { itemName = "blank rune", clientId = 3147, buy = 10 }, + { itemName = "cure poison rune", clientId = 3153, buy = 65 }, + { itemName = "destroy field rune", clientId = 3148, buy = 15 }, + { itemName = "energy field rune", clientId = 3164, buy = 38 }, + { itemName = "fire field rune", clientId = 3188, buy = 28 }, + { itemName = "intense healing rune", clientId = 3152, buy = 95 }, + { itemName = "light stone shower rune", clientId = 21351, buy = 25 }, + { itemName = "lightest missile rune", clientId = 21352, buy = 20 }, + { itemName = "poison field rune", clientId = 3172, buy = 21 }, + }, + ["wands"] = { + { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, + { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, + { itemName = "snakebite rod", clientId = 3066, buy = 500 }, + { itemName = "wand of decay", clientId = 3072, buy = 5000 }, + { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, + { itemName = "wand of vortex", clientId = 3074, buy = 500 }, + }, } +npcConfig.shop = {} +for _, categoryTable in pairs(itemsTable) do + for _, itemTable in ipairs(categoryTable) do + table.insert(npcConfig.shop, itemTable) + end +end + local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) @@ -123,6 +162,12 @@ local function creatureSayCallback(npc, creature, type, message) return false end + local formattedCategoryNames = {} + for categoryName, _ in pairs(itemsTable) do + table.insert(formattedCategoryNames, "{" .. categoryName .. "}") + end + + local categoryTable = itemsTable[message:lower()] if MsgContains(message, "dawnport") then npcHandler:say({ "Small and deceptively friendly-looking island. Well, I used to study the plants and herbs here for my potions.", @@ -145,41 +190,24 @@ local function creatureSayCallback(npc, creature, type, message) "Anyway, whatever he was before he joined, Tybald now fits the bill of the legendary hero. \z He even has a crush on lady Oressa. Cute. ", }, npc, creature, 200) + elseif categoryTable then + npcHandler:say("Take your pick!", npc, player) + npc:openShopWindowTable(player, categoryTable) end return true end +npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:setMessage( MESSAGE_GREET, "Hi there, fellow adventurer. \z - What's your need? Say {trade} and we'll soon get you fixed up. Or ask me about potions, wands, or runes." + What's your need? Say {trade} and we'll soon get you fixed up. Or ask me about {potions}, {wands}, or {runes}." ) npcHandler:setMessage(MESSAGE_FAREWELL, "Use your runes wisely!") - -npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) - +npcHandler:setMessage(MESSAGE_WALKAWAY, "Use your runes wisely!") +npcHandler:setMessage(MESSAGE_SENDTRADE, "Take your pick! Or maybe you want to look only at {potions}, {wands} or {runes}?") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -npcConfig.shop = { - { itemName = "blank rune", clientId = 3147, buy = 10 }, - { itemName = "cure poison rune", clientId = 3153, buy = 65 }, - { itemName = "destroy field rune", clientId = 3148, buy = 15 }, - { itemName = "energy field rune", clientId = 3164, buy = 38 }, - { itemName = "fire field rune", clientId = 3188, buy = 28 }, - { itemName = "health potion", clientId = 266, buy = 50 }, - { itemName = "intense healing rune", clientId = 3152, buy = 95 }, - { itemName = "light stone shower rune", clientId = 21351, buy = 25 }, - { itemName = "lightest missile rune", clientId = 21352, buy = 20 }, - { itemName = "mana potion", clientId = 268, buy = 56 }, - { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, - { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, - { itemName = "poison field rune", clientId = 3172, buy = 21 }, - { itemName = "small health potion", clientId = 7876, buy = 20 }, - { itemName = "snakebite rod", clientId = 3066, buy = 500 }, - { itemName = "wand of decay", clientId = 3072, buy = 5000 }, - { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, - { itemName = "wand of vortex", clientId = 3074, buy = 500 }, -} -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) npc:sellItem(player, itemId, amount, subType, 0, ignore, inBackpacks) diff --git a/data-otservbr-global/npc/khanna.lua b/data-otservbr-global/npc/khanna.lua index 0adc4b8e4fb..f3537057b10 100644 --- a/data-otservbr-global/npc/khanna.lua +++ b/data-otservbr-global/npc/khanna.lua @@ -23,6 +23,76 @@ npcConfig.flags = { floorchange = false, } +npcConfig.voices = { + interval = 15000, + chance = 50, + { text = "If you need runes, this is the market stall for you!" }, + { text = "I'm selling magic equipment. Come and have a look." }, +} + +local itemsTable = { + ["runes"] = { + { itemName = "animate dead rune", clientId = 3203, buy = 375 }, + { itemName = "avalanche rune", clientId = 3161, buy = 57 }, + { itemName = "blank rune", clientId = 3147, buy = 10 }, + { itemName = "chameleon rune", clientId = 3178, buy = 210 }, + { itemName = "convince creature rune", clientId = 3177, buy = 80 }, + { itemName = "cure poison rune", clientId = 3153, buy = 65 }, + { itemName = "destroy field rune", clientId = 3148, buy = 15 }, + { itemName = "desintegrate rune", clientId = 3197, buy = 26 }, + { itemName = "energy field rune", clientId = 3164, buy = 38 }, + { itemName = "energy wall rune", clientId = 3166, buy = 85 }, + { itemName = "energy bomb rune", clientId = 3149, buy = 203 }, + { itemName = "explosion rune", clientId = 3200, buy = 31 }, + { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, + { itemName = "fire field rune", clientId = 3188, buy = 28 }, + { itemName = "fire wall rune", clientId = 3190, buy = 61 }, + { itemName = "fireball rune", clientId = 3189, buy = 30 }, + { itemName = "great fireball rune", clientId = 3191, buy = 57 }, + { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, + { itemName = "holy missile rune", clientId = 3182, buy = 16 }, + { itemName = "icicle rune", clientId = 3158, buy = 30 }, + { itemName = "intense healing rune", clientId = 3152, buy = 95 }, + { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, + { itemName = "magic wall rune", clientId = 3180, buy = 116 }, + { itemName = "paralyze rune", clientId = 3165, buy = 700 }, + { itemName = "poison bomb rune", clientId = 3173, buy = 85 }, + { itemName = "poison field rune", clientId = 3172, buy = 21 }, + { itemName = "poison wall rune", clientId = 3176, buy = 52 }, + { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, + { itemName = "stone shower rune", clientId = 3175, buy = 37 }, + { itemName = "sudden death rune", clientId = 3155, buy = 135 }, + { itemName = "thunderstorm rune", clientId = 3202, buy = 47 }, + { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, + { itemName = "wild growth rune", clientId = 3156, buy = 160 }, + }, + ["wands"] = { + { itemName = "hailstorm rod", clientId = 3067, buy = 15000 }, + { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, + { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, + { itemName = "northwind rod", clientId = 8083, buy = 7500 }, + { itemName = "snakebite rod", clientId = 3066, buy = 500 }, + { itemName = "springsprout rod", clientId = 8084, buy = 18000 }, + { itemName = "terra rod", clientId = 3065, buy = 10000 }, + { itemName = "underworld rod", clientId = 8082, buy = 22000 }, + { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, + { itemName = "wand of decay", clientId = 3072, buy = 5000 }, + { itemName = "wand of draconia", clientId = 8093, buy = 7500 }, + { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, + { itemName = "wand of inferno", clientId = 3071, buy = 15000 }, + { itemName = "wand of starstorm", clientId = 8092, buy = 18000 }, + { itemName = "wand of voodoo", clientId = 8094, buy = 22000 }, + { itemName = "wand of vortex", clientId = 3074, buy = 500 }, + }, +} + +npcConfig.shop = {} +for _, categoryTable in pairs(itemsTable) do + for _, itemTable in ipairs(categoryTable) do + table.insert(npcConfig.shop, itemTable) + end +end + local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) @@ -63,6 +133,12 @@ local function creatureSayCallback(npc, creature, type, message) return false end + local formattedCategoryNames = {} + for categoryName, _ in pairs(itemsTable) do + table.insert(formattedCategoryNames, "{" .. categoryName .. "}") + end + + local categoryTable = itemsTable[message:lower()] local itemId = items[player:getVocation():getBaseId()] if MsgContains(message, "first rod") or MsgContains(message, "first wand") then if player:isMage() then @@ -85,81 +161,17 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "no") and npcHandler:getTopic(playerId) == 1 then npcHandler:say("Ok then.", npc, creature) npcHandler:setTopic(playerId, 0) + elseif categoryTable then + npcHandler:say("Take your pick!", npc, player) + npc:openShopWindowTable(player, categoryTable) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) - +npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at {wands} or {runes}?") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -npcConfig.shop = { - { itemName = "animate dead rune", clientId = 3203, buy = 375 }, - { itemName = "avalanche rune", clientId = 3161, buy = 57 }, - { itemName = "blank rune", clientId = 3147, buy = 20 }, - { itemName = "chameleon rune", clientId = 3178, buy = 210 }, - { itemName = "convince creature rune", clientId = 3177, buy = 80 }, - { itemName = "crystal ball", clientId = 3076, buy = 650 }, - { itemName = "cure poison rune", clientId = 3153, buy = 65 }, - { itemName = "desintegrate rune", clientId = 3197, buy = 26 }, - { itemName = "destroy field rune", clientId = 3148, buy = 15 }, - { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 }, - { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 }, - { itemName = "energy bomb rune", clientId = 3149, buy = 203 }, - { itemName = "energy field rune", clientId = 3164, buy = 38 }, - { itemName = "energy wall rune", clientId = 3166, buy = 85 }, - { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 }, - { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 }, - { itemName = "explosion rune", clientId = 3200, buy = 31 }, - { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, - { itemName = "fire field rune", clientId = 3188, buy = 28 }, - { itemName = "fire wall rune", clientId = 3190, buy = 61 }, - { itemName = "fireball rune", clientId = 3189, buy = 30 }, - { itemName = "great fireball rune", clientId = 3191, buy = 57 }, - { itemName = "hailstorm rod", clientId = 3067, buy = 15000 }, - { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, - { itemName = "holy missile rune", clientId = 3182, buy = 16 }, - { itemName = "icicle rune", clientId = 3158, buy = 30 }, - { itemName = "intense healing rune", clientId = 3152, buy = 95 }, - { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 }, - { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 }, - { itemName = "life crystal", clientId = 3061, sell = 75 }, - { itemName = "life ring", clientId = 3052, buy = 1000 }, - { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, - { itemName = "magic wall rune", clientId = 3180, buy = 116 }, - { itemName = "mind stone", clientId = 3062, sell = 150 }, - { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, - { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, - { itemName = "northwind rod", clientId = 8083, buy = 7500 }, - { itemName = "paralyze rune", clientId = 3165, buy = 700 }, - { itemName = "poison bomb rune", clientId = 3173, buy = 85 }, - { itemName = "poison field rune", clientId = 3172, buy = 21 }, - { itemName = "poison wall rune", clientId = 3176, buy = 52 }, - { itemName = "snakebite rod", clientId = 3066, buy = 500 }, - { itemName = "soulfire rune", clientId = 3195, buy = 46 }, - { itemName = "spellbook of enlightenment", clientId = 8072, sell = 3500 }, - { itemName = "spellbook of lost souls", clientId = 8075, sell = 17500 }, - { itemName = "spellbook of mind control", clientId = 8074, sell = 12000 }, - { itemName = "spellbook of warding", clientId = 8073, sell = 7500 }, - { itemName = "spellwand", clientId = 651, sell = 299 }, - { itemName = "springsprout rod", clientId = 8084, buy = 18000 }, - { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, - { itemName = "stone shower rune", clientId = 3175, buy = 37 }, - { itemName = "sudden death rune", clientId = 3155, buy = 135 }, - { itemName = "terra rod", clientId = 3065, buy = 10000 }, - { itemName = "thunderstorm rune", clientId = 3202, buy = 47 }, - { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, - { itemName = "underworld rod", clientId = 8082, buy = 22000 }, - { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, - { itemName = "wand of decay", clientId = 3072, buy = 5000 }, - { itemName = "wand of draconia", clientId = 8093, buy = 7500 }, - { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, - { itemName = "wand of inferno", clientId = 3071, buy = 15000 }, - { itemName = "wand of starstorm", clientId = 8092, buy = 18000 }, - { itemName = "wand of voodoo", clientId = 8094, buy = 22000 }, - { itemName = "wand of vortex", clientId = 3074, buy = 500 }, - { itemName = "wild growth rune", clientId = 3156, buy = 160 }, -} -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) npc:sellItem(player, itemId, amount, subType, 0, ignore, inBackpacks) diff --git a/data-otservbr-global/npc/mordecai.lua b/data-otservbr-global/npc/mordecai.lua index 624b800dca7..00e744a9ebd 100644 --- a/data-otservbr-global/npc/mordecai.lua +++ b/data-otservbr-global/npc/mordecai.lua @@ -23,6 +23,80 @@ npcConfig.flags = { floorchange = false, } +npcConfig.voices = { + interval = 15000, + chance = 50, + { text = "Come in, young mages! Purchase the latest in runes and wands!" }, + { text = "Perhaps I need to bake them hotter? Or was it longer?" }, + { text = "Offering all sorts of magic equipment!" }, + { text = "Now where did Alaistar put the wood for the new wands?" }, + { text = "Hmmm.. Maybe those crushed gems caused the strange side effect?" }, + { text = "Wands and rods, the true magician's weapons of choice!" }, +} + +local itemsTable = { + ["runes"] = { + { itemName = "animate dead rune", clientId = 3203, buy = 375 }, + { itemName = "avalanche rune", clientId = 3161, buy = 57 }, + { itemName = "blank rune", clientId = 3147, buy = 10 }, + { itemName = "chameleon rune", clientId = 3178, buy = 210 }, + { itemName = "convince creature rune", clientId = 3177, buy = 80 }, + { itemName = "cure poison rune", clientId = 3153, buy = 65 }, + { itemName = "destroy field rune", clientId = 3148, buy = 15 }, + { itemName = "desintegrate rune", clientId = 3197, buy = 26 }, + { itemName = "energy field rune", clientId = 3164, buy = 38 }, + { itemName = "energy wall rune", clientId = 3166, buy = 85 }, + { itemName = "energy bomb rune", clientId = 3149, buy = 203 }, + { itemName = "explosion rune", clientId = 3200, buy = 31 }, + { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, + { itemName = "fire field rune", clientId = 3188, buy = 28 }, + { itemName = "fire wall rune", clientId = 3190, buy = 61 }, + { itemName = "fireball rune", clientId = 3189, buy = 30 }, + { itemName = "great fireball rune", clientId = 3191, buy = 57 }, + { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, + { itemName = "holy missile rune", clientId = 3182, buy = 16 }, + { itemName = "icicle rune", clientId = 3158, buy = 30 }, + { itemName = "intense healing rune", clientId = 3152, buy = 95 }, + { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, + { itemName = "magic wall rune", clientId = 3180, buy = 116 }, + { itemName = "paralyze rune", clientId = 3165, buy = 700 }, + { itemName = "poison bomb rune", clientId = 3173, buy = 85 }, + { itemName = "poison field rune", clientId = 3172, buy = 21 }, + { itemName = "poison wall rune", clientId = 3176, buy = 52 }, + { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, + { itemName = "stone shower rune", clientId = 3175, buy = 37 }, + { itemName = "sudden death rune", clientId = 3155, buy = 135 }, + { itemName = "thunderstorm rune", clientId = 3202, buy = 47 }, + { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, + { itemName = "wild growth rune", clientId = 3156, buy = 160 }, + }, + ["wands"] = { + { itemName = "hailstorm rod", clientId = 3067, buy = 15000 }, + { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, + { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, + { itemName = "northwind rod", clientId = 8083, buy = 7500 }, + { itemName = "snakebite rod", clientId = 3066, buy = 500 }, + { itemName = "springsprout rod", clientId = 8084, buy = 18000 }, + { itemName = "terra rod", clientId = 3065, buy = 10000 }, + { itemName = "underworld rod", clientId = 8082, buy = 22000 }, + { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, + { itemName = "wand of decay", clientId = 3072, buy = 5000 }, + { itemName = "wand of draconia", clientId = 8093, buy = 7500 }, + { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, + { itemName = "wand of inferno", clientId = 3071, buy = 15000 }, + { itemName = "wand of starstorm", clientId = 8092, buy = 18000 }, + { itemName = "wand of voodoo", clientId = 8094, buy = 22000 }, + { itemName = "wand of vortex", clientId = 3074, buy = 500 }, + }, +} + +npcConfig.shop = {} +for _, categoryTable in pairs(itemsTable) do + for _, itemTable in ipairs(categoryTable) do + table.insert(npcConfig.shop, itemTable) + end +end + local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) @@ -50,63 +124,35 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end +local function creatureSayCallback(npc, creature, type, message) + local player = Player(creature) + local playerId = player:getId() + + if not npcHandler:checkInteraction(npc, creature) then + return false + end + + local formattedCategoryNames = {} + for categoryName, _ in pairs(itemsTable) do + table.insert(formattedCategoryNames, "{" .. categoryName .. "}") + end + + local categoryTable = itemsTable[message:lower()] + + if categoryTable then + npcHandler:say("Choose wisely!", npc, player) + npc:openShopWindowTable(player, categoryTable) + end + return true +end + +npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) +npcHandler:setMessage(MESSAGE_GREET, "Welcome to the magic emporium, child. Ask me for a trade if you need {runes}, {wands}, or spellbooks.") +npcHandler:setMessage(MESSAGE_FAREWELL, "Take care, child.") +npcHandler:setMessage(MESSAGE_WALKAWAY, "Ah, the impetuosity of youth.") +npcHandler:setMessage(MESSAGE_SENDTRADE, "Choose wisely! Or maybe you want to look only at {wands} or {runes}?") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -npcConfig.shop = { - { itemName = "animate dead rune", clientId = 3203, buy = 375 }, - { itemName = "avalanche rune", clientId = 3161, buy = 57 }, - { itemName = "chameleon rune", clientId = 3178, buy = 210 }, - { itemName = "convince creature rune", clientId = 3177, buy = 80 }, - { itemName = "cure poison rune", clientId = 3153, buy = 65 }, - { itemName = "desintegrate rune", clientId = 3197, buy = 26 }, - { itemName = "destroy field rune", clientId = 3148, buy = 15 }, - { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 }, - { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 }, - { itemName = "energy bomb rune", clientId = 3149, buy = 203 }, - { itemName = "energy field rune", clientId = 3164, buy = 38 }, - { itemName = "energy wall rune", clientId = 3166, buy = 85 }, - { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 }, - { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 }, - { itemName = "explosion rune", clientId = 3200, buy = 31 }, - { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, - { itemName = "fire field rune", clientId = 3188, buy = 28 }, - { itemName = "fire wall rune", clientId = 3190, buy = 61 }, - { itemName = "great fireball rune", clientId = 3191, buy = 57 }, - { itemName = "hailstorm rod", clientId = 3067, buy = 15000 }, - { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, - { itemName = "holy missile rune", clientId = 3182, buy = 16 }, - { itemName = "icicle rune", clientId = 3158, buy = 30 }, - { itemName = "intense healing rune", clientId = 3152, buy = 95 }, - { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 }, - { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 }, - { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, - { itemName = "magic wall rune", clientId = 3180, buy = 116 }, - { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, - { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, - { itemName = "northwind rod", clientId = 8083, buy = 7500 }, - { itemName = "paralyze rune", clientId = 3165, buy = 700 }, - { itemName = "poison field rune", clientId = 3172, buy = 21 }, - { itemName = "poison wall rune", clientId = 3176, buy = 52 }, - { itemName = "snakebite rod", clientId = 3066, buy = 500 }, - { itemName = "soulfire rune", clientId = 3195, buy = 46 }, - { itemName = "spellwand", clientId = 651, sell = 299 }, - { itemName = "springsprout rod", clientId = 8084, buy = 18000 }, - { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, - { itemName = "sudden death rune", clientId = 3155, buy = 135 }, - { itemName = "terra rod", clientId = 3065, buy = 10000 }, - { itemName = "thunderstorm rune", clientId = 3202, buy = 47 }, - { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, - { itemName = "underworld rod", clientId = 8082, buy = 22000 }, - { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, - { itemName = "wand of decay", clientId = 3072, buy = 5000 }, - { itemName = "wand of draconia", clientId = 8093, buy = 7500 }, - { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, - { itemName = "wand of inferno", clientId = 3071, buy = 15000 }, - { itemName = "wand of starstorm", clientId = 8092, buy = 18000 }, - { itemName = "wand of voodoo", clientId = 8094, buy = 22000 }, - { itemName = "wand of vortex", clientId = 3074, buy = 500 }, - { itemName = "wild growth rune", clientId = 3156, buy = 160 }, -} -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) npc:sellItem(player, itemId, amount, subType, 0, ignore, inBackpacks) diff --git a/data-otservbr-global/npc/nelly.lua b/data-otservbr-global/npc/nelly.lua index b54709dd21d..88dff5dfbc6 100644 --- a/data-otservbr-global/npc/nelly.lua +++ b/data-otservbr-global/npc/nelly.lua @@ -23,6 +23,86 @@ npcConfig.flags = { floorchange = false, } +npcConfig.voices = { + interval = 15000, + chance = 50, + { text = "Welcome to the post office!" }, + { text = "Also selling runes, potions and magical equipment!" }, +} + +local itemsTable = { + ["potions"] = { + { itemName = "empty potion flask", clientId = 283, sell = 5 }, + { itemName = "empty potion flask", clientId = 284, sell = 5 }, + { itemName = "empty potion flask", clientId = 285, sell = 5 }, + { itemName = "great health potion", clientId = 239, buy = 225 }, + { itemName = "great mana potion", clientId = 238, buy = 144 }, + { itemName = "great spirit potion", clientId = 7642, buy = 228 }, + { itemName = "health potion", clientId = 266, buy = 50 }, + { itemName = "mana potion", clientId = 268, buy = 56 }, + { itemName = "strong health potion", clientId = 236, buy = 115 }, + { itemName = "strong mana potion", clientId = 237, buy = 93 }, + { itemName = "supreme health potion", clientId = 23375, buy = 625 }, + { itemName = "ultimate health potion", clientId = 7643, buy = 379 }, + { itemName = "ultimate mana potion", clientId = 23373, buy = 438 }, + { itemName = "ultimate spirit potion", clientId = 23374, buy = 438 }, + { itemName = "vial", clientId = 2874, sell = 5 }, + }, + ["runes"] = { + { itemName = "avalanche rune", clientId = 3161, buy = 57 }, + { itemName = "blank rune", clientId = 3147, buy = 10 }, + { itemName = "chameleon rune", clientId = 3178, buy = 210 }, + { itemName = "convince creature rune", clientId = 3177, buy = 80 }, + { itemName = "cure poison rune", clientId = 3153, buy = 65 }, + { itemName = "destroy field rune", clientId = 3148, buy = 15 }, + { itemName = "energy field rune", clientId = 3164, buy = 38 }, + { itemName = "energy wall rune", clientId = 3166, buy = 85 }, + { itemName = "explosion rune", clientId = 3200, buy = 31 }, + { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, + { itemName = "fire field rune", clientId = 3188, buy = 28 }, + { itemName = "fire wall rune", clientId = 3190, buy = 61 }, + { itemName = "great fireball rune", clientId = 3191, buy = 57 }, + { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, + { itemName = "intense healing rune", clientId = 3152, buy = 95 }, + { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, + { itemName = "poison field rune", clientId = 3172, buy = 21 }, + { itemName = "poison wall rune", clientId = 3176, buy = 52 }, + { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, + { itemName = "sudden death rune", clientId = 3155, buy = 135 }, + { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, + }, + ["wands"] = { + { itemName = "hailstorm rod", clientId = 3067, buy = 15000 }, + { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, + { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, + { itemName = "northwind rod", clientId = 8083, buy = 7500 }, + { itemName = "snakebite rod", clientId = 3066, buy = 500 }, + { itemName = "springsprout rod", clientId = 8084, buy = 18000 }, + { itemName = "terra rod", clientId = 3065, buy = 10000 }, + { itemName = "underworld rod", clientId = 8082, buy = 22000 }, + { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, + { itemName = "wand of decay", clientId = 3072, buy = 5000 }, + { itemName = "wand of draconia", clientId = 8093, buy = 7500 }, + { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, + { itemName = "wand of inferno", clientId = 3071, buy = 15000 }, + { itemName = "wand of starstorm", clientId = 8092, buy = 18000 }, + { itemName = "wand of voodoo", clientId = 8094, buy = 22000 }, + { itemName = "wand of vortex", clientId = 3074, buy = 500 }, + }, + ["post stuff"] = { + { itemName = "label", clientId = 3507, buy = 1 }, + { itemName = "letter", clientId = 3505, buy = 8 }, + { itemName = "parcel", clientId = 3503, buy = 15 }, + }, +} + +npcConfig.shop = {} +for _, categoryTable in pairs(itemsTable) do + for _, itemTable in ipairs(categoryTable) do + table.insert(npcConfig.shop, itemTable) + end +end + local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) @@ -50,73 +130,35 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end +local function creatureSayCallback(npc, creature, type, message) + local player = Player(creature) + local playerId = player:getId() + + if not npcHandler:checkInteraction(npc, creature) then + return false + end + + local formattedCategoryNames = {} + for categoryName, _ in pairs(itemsTable) do + table.insert(formattedCategoryNames, "{" .. categoryName .. "}") + end + + local categoryTable = itemsTable[message:lower()] + + if categoryTable then + npcHandler:say("Of course, just browse through my wares.", npc, player) + npc:openShopWindowTable(player, categoryTable) + end + return true +end + +npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) +npcHandler:setMessage(MESSAGE_GREET, "Hello |PLAYERNAME|, What can I do for you? I'm working for the post office, but I also trade with important {potions}, {runes} and other magical equipment.") +npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye, |PLAYERNAME|.") +npcHandler:setMessage(MESSAGE_WALKAWAY, "Ah, the impetuosity of youth.") +npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at {post stuff}, {potions}, {wands} or {runes}?") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -npcConfig.shop = { - { itemName = "avalanche rune", clientId = 3161, buy = 57 }, - { itemName = "blank rune", clientId = 3147, buy = 10 }, - { itemName = "chameleon rune", clientId = 3178, buy = 210 }, - { itemName = "convince creature rune", clientId = 3177, buy = 80 }, - { itemName = "cure poison rune", clientId = 3153, buy = 65 }, - { itemName = "destroy field rune", clientId = 3148, buy = 15 }, - { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 }, - { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 }, - { itemName = "empty potion flask", clientId = 283, sell = 5 }, - { itemName = "empty potion flask", clientId = 284, sell = 5 }, - { itemName = "empty potion flask", clientId = 285, sell = 5 }, - { itemName = "energy field rune", clientId = 3164, buy = 38 }, - { itemName = "energy wall rune", clientId = 3166, buy = 85 }, - { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 }, - { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 }, - { itemName = "explosion rune", clientId = 3200, buy = 31 }, - { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, - { itemName = "fire field rune", clientId = 3188, buy = 28 }, - { itemName = "fire wall rune", clientId = 3190, buy = 61 }, - { itemName = "great fireball rune", clientId = 3191, buy = 57 }, - { itemName = "great health potion", clientId = 239, buy = 225 }, - { itemName = "great mana potion", clientId = 238, buy = 144 }, - { itemName = "great spirit potion", clientId = 7642, buy = 228 }, - { itemName = "hailstorm rod", clientId = 3067, buy = 15000 }, - { itemName = "health potion", clientId = 266, buy = 50 }, - { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, - { itemName = "intense healing rune", clientId = 3152, buy = 95 }, - { itemName = "label", clientId = 3507, buy = 1 }, - { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 }, - { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 }, - { itemName = "letter", clientId = 3505, buy = 8 }, - { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, - { itemName = "mana potion", clientId = 268, buy = 56 }, - { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, - { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, - { itemName = "northwind rod", clientId = 8083, buy = 7500 }, - { itemName = "parcel", clientId = 3503, buy = 15 }, - { itemName = "poison field rune", clientId = 3172, buy = 21 }, - { itemName = "poison wall rune", clientId = 3176, buy = 52 }, - { itemName = "snakebite rod", clientId = 3066, buy = 500 }, - { itemName = "spellbook", clientId = 3059, buy = 150 }, - { itemName = "spellwand", clientId = 651, sell = 299 }, - { itemName = "springsprout rod", clientId = 8084, buy = 18000 }, - { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, - { itemName = "strong health potion", clientId = 236, buy = 115 }, - { itemName = "strong mana potion", clientId = 237, buy = 93 }, - { itemName = "sudden death rune", clientId = 3155, buy = 135 }, - { itemName = "supreme health potion", clientId = 23375, buy = 625 }, - { itemName = "terra rod", clientId = 3065, buy = 10000 }, - { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, - { itemName = "ultimate health potion", clientId = 7643, buy = 379 }, - { itemName = "ultimate mana potion", clientId = 23373, buy = 438 }, - { itemName = "ultimate spirit potion", clientId = 23374, buy = 438 }, - { itemName = "underworld rod", clientId = 8082, buy = 22000 }, - { itemName = "vial", clientId = 2874, sell = 5 }, - { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, - { itemName = "wand of decay", clientId = 3072, buy = 5000 }, - { itemName = "wand of draconia", clientId = 8093, buy = 7500 }, - { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, - { itemName = "wand of inferno", clientId = 3071, buy = 15000 }, - { itemName = "wand of starstorm", clientId = 8092, buy = 18000 }, - { itemName = "wand of voodoo", clientId = 8094, buy = 22000 }, - { itemName = "wand of vortex", clientId = 3074, buy = 500 }, -} -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) npc:sellItem(player, itemId, amount, subType, 0, ignore, inBackpacks) diff --git a/data-otservbr-global/npc/nipuna.lua b/data-otservbr-global/npc/nipuna.lua index b24c55bee06..32623777ff7 100644 --- a/data-otservbr-global/npc/nipuna.lua +++ b/data-otservbr-global/npc/nipuna.lua @@ -23,6 +23,93 @@ npcConfig.flags = { floorchange = false, } +npcConfig.voices = { + interval = 15000, + chance = 50, + { text = "I'm selling magic equipment. Come and have a look." }, + { text = "If you need runes, this is the market stall for you!" }, +} + +local itemsTable = { + ["potions"] = { + { itemName = "empty potion flask", clientId = 283, sell = 5 }, + { itemName = "empty potion flask", clientId = 284, sell = 5 }, + { itemName = "empty potion flask", clientId = 285, sell = 5 }, + { itemName = "great health potion", clientId = 239, buy = 225 }, + { itemName = "great mana potion", clientId = 238, buy = 144 }, + { itemName = "great spirit potion", clientId = 7642, buy = 228 }, + { itemName = "health potion", clientId = 266, buy = 50 }, + { itemName = "mana potion", clientId = 268, buy = 56 }, + { itemName = "strong health potion", clientId = 236, buy = 115 }, + { itemName = "strong mana potion", clientId = 237, buy = 93 }, + { itemName = "supreme health potion", clientId = 23375, buy = 625 }, + { itemName = "ultimate health potion", clientId = 7643, buy = 379 }, + { itemName = "ultimate mana potion", clientId = 23373, buy = 438 }, + { itemName = "ultimate spirit potion", clientId = 23374, buy = 438 }, + { itemName = "vial", clientId = 2874, sell = 5 }, + }, + ["runes"] = { + { itemName = "animate dead rune", clientId = 3203, buy = 375 }, + { itemName = "avalanche rune", clientId = 3161, buy = 57 }, + { itemName = "blank rune", clientId = 3147, buy = 10 }, + { itemName = "chameleon rune", clientId = 3178, buy = 210 }, + { itemName = "convince creature rune", clientId = 3177, buy = 80 }, + { itemName = "cure poison rune", clientId = 3153, buy = 65 }, + { itemName = "destroy field rune", clientId = 3148, buy = 15 }, + { itemName = "desintegrate rune", clientId = 3197, buy = 26 }, + { itemName = "energy field rune", clientId = 3164, buy = 38 }, + { itemName = "energy wall rune", clientId = 3166, buy = 85 }, + { itemName = "energy bomb rune", clientId = 3149, buy = 203 }, + { itemName = "explosion rune", clientId = 3200, buy = 31 }, + { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, + { itemName = "fire field rune", clientId = 3188, buy = 28 }, + { itemName = "fire wall rune", clientId = 3190, buy = 61 }, + { itemName = "fireball rune", clientId = 3189, buy = 30 }, + { itemName = "great fireball rune", clientId = 3191, buy = 57 }, + { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, + { itemName = "holy missile rune", clientId = 3182, buy = 16 }, + { itemName = "icicle rune", clientId = 3158, buy = 30 }, + { itemName = "intense healing rune", clientId = 3152, buy = 95 }, + { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, + { itemName = "magic wall rune", clientId = 3180, buy = 116 }, + { itemName = "paralyze rune", clientId = 3165, buy = 700 }, + { itemName = "poison bomb rune", clientId = 3173, buy = 85 }, + { itemName = "poison field rune", clientId = 3172, buy = 21 }, + { itemName = "poison wall rune", clientId = 3176, buy = 52 }, + { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, + { itemName = "stone shower rune", clientId = 3175, buy = 37 }, + { itemName = "sudden death rune", clientId = 3155, buy = 135 }, + { itemName = "thunderstorm rune", clientId = 3202, buy = 47 }, + { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, + { itemName = "wild growth rune", clientId = 3156, buy = 160 }, + }, + ["wands"] = { + { itemName = "hailstorm rod", clientId = 3067, buy = 15000 }, + { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, + { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, + { itemName = "northwind rod", clientId = 8083, buy = 7500 }, + { itemName = "snakebite rod", clientId = 3066, buy = 500 }, + { itemName = "springsprout rod", clientId = 8084, buy = 18000 }, + { itemName = "terra rod", clientId = 3065, buy = 10000 }, + { itemName = "underworld rod", clientId = 8082, buy = 22000 }, + { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, + { itemName = "wand of decay", clientId = 3072, buy = 5000 }, + { itemName = "wand of draconia", clientId = 8093, buy = 7500 }, + { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, + { itemName = "wand of inferno", clientId = 3071, buy = 15000 }, + { itemName = "wand of starstorm", clientId = 8092, buy = 18000 }, + { itemName = "wand of voodoo", clientId = 8094, buy = 22000 }, + { itemName = "wand of vortex", clientId = 3074, buy = 500 }, + }, +} + +npcConfig.shop = {} +for _, categoryTable in pairs(itemsTable) do + for _, itemTable in ipairs(categoryTable) do + table.insert(npcConfig.shop, itemTable) + end +end + local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) @@ -50,48 +137,32 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end +local function creatureSayCallback(npc, creature, type, message) + local player = Player(creature) + local playerId = player:getId() + + if not npcHandler:checkInteraction(npc, creature) then + return false + end + + local formattedCategoryNames = {} + for categoryName, _ in pairs(itemsTable) do + table.insert(formattedCategoryNames, "{" .. categoryName .. "}") + end + + local categoryTable = itemsTable[message:lower()] + + if categoryTable then + npcHandler:say("Of course, just browse through my wares.", npc, player) + npc:openShopWindowTable(player, categoryTable) + end + return true +end + +npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) +npcHandler:setMessage(MESSAGE_SENDTRADE, "Of course, just browse through my wares. Or do you want to look only at {potions}, {wands} or {runes}?") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -npcConfig.shop = { - { itemName = "avalanche rune", clientId = 3161, buy = 57 }, - { itemName = "blank rune", clientId = 3147, buy = 10 }, - { itemName = "chameleon rune", clientId = 3178, buy = 210 }, - { itemName = "convince creature rune", clientId = 3177, buy = 80 }, - { itemName = "cure poison rune", clientId = 3153, buy = 65 }, - { itemName = "destroy field rune", clientId = 3148, buy = 15 }, - { itemName = "dragonfruit", clientId = 11682, buy = 5 }, - { itemName = "egg", clientId = 3606, buy = 3 }, - { itemName = "empty potion flask", clientId = 283, sell = 5 }, - { itemName = "empty potion flask", clientId = 284, sell = 5 }, - { itemName = "empty potion flask", clientId = 285, sell = 5 }, - { itemName = "energy field rune", clientId = 3164, buy = 38 }, - { itemName = "energy wall rune", clientId = 3166, buy = 85 }, - { itemName = "explosion rune", clientId = 3200, buy = 31 }, - { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, - { itemName = "fire field rune", clientId = 3188, buy = 28 }, - { itemName = "fire wall rune", clientId = 3190, buy = 61 }, - { itemName = "great fireball rune", clientId = 3191, buy = 57 }, - { itemName = "great health potion", clientId = 239, buy = 225 }, - { itemName = "great mana potion", clientId = 238, buy = 144 }, - { itemName = "great spirit potion", clientId = 7642, buy = 228 }, - { itemName = "health potion", clientId = 266, buy = 50 }, - { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, - { itemName = "intense healing rune", clientId = 3152, buy = 95 }, - { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, - { itemName = "mana potion", clientId = 268, buy = 56 }, - { itemName = "poison field rune", clientId = 3172, buy = 21 }, - { itemName = "poison wall rune", clientId = 3176, buy = 52 }, - { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, - { itemName = "strong health potion", clientId = 236, buy = 115 }, - { itemName = "strong mana potion", clientId = 237, buy = 93 }, - { itemName = "sudden death rune", clientId = 3155, buy = 135 }, - { itemName = "supreme health potion", clientId = 23375, buy = 625 }, - { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, - { itemName = "ultimate health potion", clientId = 7643, buy = 379 }, - { itemName = "ultimate mana potion", clientId = 23373, buy = 438 }, - { itemName = "ultimate spirit potion", clientId = 23374, buy = 438 }, - { itemName = "vial", clientId = 2874, sell = 5 }, -} -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) npc:sellItem(player, itemId, amount, subType, 0, ignore, inBackpacks) diff --git a/data-otservbr-global/npc/rabaz.lua b/data-otservbr-global/npc/rabaz.lua index b6f7f188cf8..83bb3254597 100644 --- a/data-otservbr-global/npc/rabaz.lua +++ b/data-otservbr-global/npc/rabaz.lua @@ -23,6 +23,74 @@ npcConfig.flags = { floorchange = false, } +local itemsTable = { + ["potions"] = { + { itemName = "empty potion flask", clientId = 283, sell = 5 }, + { itemName = "empty potion flask", clientId = 284, sell = 5 }, + { itemName = "empty potion flask", clientId = 285, sell = 5 }, + { itemName = "great health potion", clientId = 239, buy = 225 }, + { itemName = "great mana potion", clientId = 238, buy = 144 }, + { itemName = "great spirit potion", clientId = 7642, buy = 228 }, + { itemName = "health potion", clientId = 266, buy = 50 }, + { itemName = "mana potion", clientId = 268, buy = 56 }, + { itemName = "strong health potion", clientId = 236, buy = 115 }, + { itemName = "strong mana potion", clientId = 237, buy = 93 }, + { itemName = "supreme health potion", clientId = 23375, buy = 625 }, + { itemName = "ultimate health potion", clientId = 7643, buy = 379 }, + { itemName = "ultimate mana potion", clientId = 23373, buy = 438 }, + { itemName = "ultimate spirit potion", clientId = 23374, buy = 438 }, + { itemName = "vial", clientId = 2874, sell = 5 }, + }, + ["runes"] = { + { itemName = "avalanche rune", clientId = 3161, buy = 57 }, + { itemName = "blank rune", clientId = 3147, buy = 10 }, + { itemName = "chameleon rune", clientId = 3178, buy = 210 }, + { itemName = "convince creature rune", clientId = 3177, buy = 80 }, + { itemName = "cure poison rune", clientId = 3153, buy = 65 }, + { itemName = "destroy field rune", clientId = 3148, buy = 15 }, + { itemName = "energy field rune", clientId = 3164, buy = 38 }, + { itemName = "energy wall rune", clientId = 3166, buy = 85 }, + { itemName = "explosion rune", clientId = 3200, buy = 31 }, + { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, + { itemName = "fire field rune", clientId = 3188, buy = 28 }, + { itemName = "fire wall rune", clientId = 3190, buy = 61 }, + { itemName = "great fireball rune", clientId = 3191, buy = 57 }, + { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, + { itemName = "intense healing rune", clientId = 3152, buy = 95 }, + { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, + { itemName = "poison field rune", clientId = 3172, buy = 21 }, + { itemName = "poison wall rune", clientId = 3176, buy = 52 }, + { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, + { itemName = "sudden death rune", clientId = 3155, buy = 135 }, + { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, + }, + ["wands"] = { + { itemName = "hailstorm rod", clientId = 3067, buy = 15000 }, + { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, + { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, + { itemName = "northwind rod", clientId = 8083, buy = 7500 }, + { itemName = "snakebite rod", clientId = 3066, buy = 500 }, + { itemName = "springsprout rod", clientId = 8084, buy = 18000 }, + { itemName = "terra rod", clientId = 3065, buy = 10000 }, + { itemName = "underworld rod", clientId = 8082, buy = 22000 }, + { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, + { itemName = "wand of decay", clientId = 3072, buy = 5000 }, + { itemName = "wand of draconia", clientId = 8093, buy = 7500 }, + { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, + { itemName = "wand of inferno", clientId = 3071, buy = 15000 }, + { itemName = "wand of starstorm", clientId = 8092, buy = 18000 }, + { itemName = "wand of voodoo", clientId = 8094, buy = 22000 }, + { itemName = "wand of vortex", clientId = 3074, buy = 500 }, + }, +} + +npcConfig.shop = {} +for _, categoryTable in pairs(itemsTable) do + for _, itemTable in ipairs(categoryTable) do + table.insert(npcConfig.shop, itemTable) + end +end + local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) @@ -58,6 +126,12 @@ local function creatureSayCallback(npc, creature, type, message) return false end + local formattedCategoryNames = {} + for categoryName, _ in pairs(itemsTable) do + table.insert(formattedCategoryNames, "{" .. categoryName .. "}") + end + + local categoryTable = itemsTable[message:lower()] if MsgContains(message, "mission") then if player:getStorageValue(Storage.TibiaTales.AnInterestInBotany) < 1 then npcHandler:setTopic(playerId, 1) @@ -100,75 +174,20 @@ local function creatureSayCallback(npc, creature, type, message) npcHandler:setTopic(playerId, 0) end end + elseif categoryTable then + npcHandler:say("Have a look.", npc, player) + npc:openShopWindowTable(player, categoryTable) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) +npcHandler:setMessage(MESSAGE_GREET, "Ah, a customer! Please feel free to browse my wares, |PLAYERNAME|.") +npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye.") +npcHandler:setMessage(MESSAGE_WALKAWAY, "Good bye.") +npcHandler:setMessage(MESSAGE_SENDTRADE, "Have a look. But perhaps you just want to see my {potions}, {wands} or {runes}?") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -npcConfig.shop = { - { itemName = "avalanche rune", clientId = 3161, buy = 57 }, - { itemName = "blank rune", clientId = 3147, buy = 10 }, - { itemName = "chameleon rune", clientId = 3178, buy = 210 }, - { itemName = "convince creature rune", clientId = 3177, buy = 80 }, - { itemName = "cure poison rune", clientId = 3153, buy = 65 }, - { itemName = "destroy field rune", clientId = 3148, buy = 15 }, - { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 }, - { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 }, - { itemName = "empty potion flask", clientId = 283, sell = 5 }, - { itemName = "empty potion flask", clientId = 284, sell = 5 }, - { itemName = "empty potion flask", clientId = 285, sell = 5 }, - { itemName = "energy field rune", clientId = 3164, buy = 38 }, - { itemName = "energy wall rune", clientId = 3166, buy = 85 }, - { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 }, - { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 }, - { itemName = "explosion rune", clientId = 3200, buy = 31 }, - { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, - { itemName = "fire field rune", clientId = 3188, buy = 28 }, - { itemName = "fire wall rune", clientId = 3190, buy = 61 }, - { itemName = "great fireball rune", clientId = 3191, buy = 57 }, - { itemName = "great health potion", clientId = 239, buy = 225 }, - { itemName = "great mana potion", clientId = 238, buy = 144 }, - { itemName = "great spirit potion", clientId = 7642, buy = 228 }, - { itemName = "hailstorm rod", clientId = 3067, buy = 15000 }, - { itemName = "health potion", clientId = 266, buy = 50 }, - { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, - { itemName = "intense healing rune", clientId = 3152, buy = 95 }, - { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 }, - { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 }, - { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, - { itemName = "mana potion", clientId = 268, buy = 56 }, - { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, - { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, - { itemName = "northwind rod", clientId = 8083, buy = 7500 }, - { itemName = "poison field rune", clientId = 3172, buy = 21 }, - { itemName = "poison wall rune", clientId = 3176, buy = 52 }, - { itemName = "snakebite rod", clientId = 3066, buy = 500 }, - { itemName = "spellbook", clientId = 3059, buy = 150 }, - { itemName = "spellwand", clientId = 651, sell = 299 }, - { itemName = "springsprout rod", clientId = 8084, buy = 18000 }, - { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, - { itemName = "strong health potion", clientId = 236, buy = 115 }, - { itemName = "strong mana potion", clientId = 237, buy = 93 }, - { itemName = "sudden death rune", clientId = 3155, buy = 135 }, - { itemName = "supreme health potion", clientId = 23375, buy = 625 }, - { itemName = "terra rod", clientId = 3065, buy = 10000 }, - { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, - { itemName = "ultimate health potion", clientId = 7643, buy = 379 }, - { itemName = "ultimate mana potion", clientId = 23373, buy = 438 }, - { itemName = "ultimate spirit potion", clientId = 23374, buy = 438 }, - { itemName = "underworld rod", clientId = 8082, buy = 22000 }, - { itemName = "vial", clientId = 2874, sell = 5 }, - { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, - { itemName = "wand of decay", clientId = 3072, buy = 5000 }, - { itemName = "wand of draconia", clientId = 8093, buy = 7500 }, - { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, - { itemName = "wand of inferno", clientId = 3071, buy = 15000 }, - { itemName = "wand of starstorm", clientId = 8092, buy = 18000 }, - { itemName = "wand of voodoo", clientId = 8094, buy = 22000 }, - { itemName = "wand of vortex", clientId = 3074, buy = 500 }, -} -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) npc:sellItem(player, itemId, amount, subType, 0, ignore, inBackpacks) diff --git a/data-otservbr-global/npc/rachel.lua b/data-otservbr-global/npc/rachel.lua index 301f7ae2543..2153bb201ac 100644 --- a/data-otservbr-global/npc/rachel.lua +++ b/data-otservbr-global/npc/rachel.lua @@ -23,6 +23,63 @@ npcConfig.flags = { floorchange = false, } +local itemsTable = { + ["potions"] = { + { itemName = "empty potion flask", clientId = 283, sell = 5 }, + { itemName = "empty potion flask", clientId = 284, sell = 5 }, + { itemName = "empty potion flask", clientId = 285, sell = 5 }, + { itemName = "great health potion", clientId = 239, buy = 225 }, + { itemName = "great mana potion", clientId = 238, buy = 144 }, + { itemName = "great spirit potion", clientId = 7642, buy = 228 }, + { itemName = "health potion", clientId = 266, buy = 50 }, + { itemName = "mana potion", clientId = 268, buy = 56 }, + { itemName = "strong health potion", clientId = 236, buy = 115 }, + { itemName = "strong mana potion", clientId = 237, buy = 93 }, + { itemName = "ultimate health potion", clientId = 7643, buy = 379 }, + { itemName = "vial", clientId = 2874, sell = 5 }, + }, + ["runes"] = { + { itemName = "avalanche rune", clientId = 3161, buy = 57 }, + { itemName = "blank rune", clientId = 3147, buy = 10 }, + { itemName = "chameleon rune", clientId = 3178, buy = 210 }, + { itemName = "convince creature rune", clientId = 3177, buy = 80 }, + { itemName = "cure poison rune", clientId = 3153, buy = 65 }, + { itemName = "destroy field rune", clientId = 3148, buy = 15 }, + { itemName = "energy field rune", clientId = 3164, buy = 38 }, + { itemName = "energy wall rune", clientId = 3166, buy = 85 }, + { itemName = "explosion rune", clientId = 3200, buy = 31 }, + { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, + { itemName = "fire field rune", clientId = 3188, buy = 28 }, + { itemName = "fire wall rune", clientId = 3190, buy = 61 }, + { itemName = "great fireball rune", clientId = 3191, buy = 57 }, + { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, + { itemName = "intense healing rune", clientId = 3152, buy = 95 }, + { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, + { itemName = "poison field rune", clientId = 3172, buy = 21 }, + { itemName = "poison wall rune", clientId = 3176, buy = 52 }, + { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, + { itemName = "sudden death rune", clientId = 3155, buy = 135 }, + { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, + }, + ["wands"] = { + { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, + { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, + { itemName = "snakebite rod", clientId = 3066, buy = 500 }, + { itemName = "terra rod", clientId = 3065, buy = 10000 }, + { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, + { itemName = "wand of decay", clientId = 3072, buy = 5000 }, + { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, + { itemName = "wand of vortex", clientId = 3074, buy = 500 }, + }, +} + +npcConfig.shop = {} +for _, categoryTable in pairs(itemsTable) do + for _, itemTable in ipairs(categoryTable) do + table.insert(npcConfig.shop, itemTable) + end +end + local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) @@ -68,6 +125,12 @@ local function creatureSayCallback(npc, creature, type, message) return false end + local formattedCategoryNames = {} + for categoryName, _ in pairs(itemsTable) do + table.insert(formattedCategoryNames, "{" .. categoryName .. "}") + end + + local categoryTable = itemsTable[message:lower()] local itemId = items[player:getVocation():getBaseId()] if MsgContains(message, "first rod") or MsgContains(message, "first wand") then if player:isMage() then @@ -90,12 +153,14 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "no") and npcHandler:getTopic(playerId) == 1 then npcHandler:say("Ok then.", npc, creature) npcHandler:setTopic(playerId, 0) + elseif categoryTable then + npcHandler:say("Of course, just browse through my wares.", npc, player) + npc:openShopWindowTable(player, categoryTable) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) - npcHandler:setMessage(MESSAGE_GREET, "Welcome |PLAYERNAME|! Whats your need?") npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye, |PLAYERNAME|.") npcHandler:setMessage(MESSAGE_WALKAWAY, "Good bye, |PLAYERNAME|.") @@ -104,61 +169,8 @@ npcHandler:setMessage( "Of course, just browse through my wares. \z Or do you want to look only at {potions}, {wands} or {runes}?" ) - npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -npcConfig.shop = { - { itemName = "avalanche rune", clientId = 3161, buy = 57 }, - { itemName = "blank rune", clientId = 3147, buy = 10 }, - { itemName = "chameleon rune", clientId = 3178, buy = 210 }, - { itemName = "convince creature rune", clientId = 3177, buy = 80 }, - { itemName = "cure poison rune", clientId = 3153, buy = 65 }, - { itemName = "destroy field rune", clientId = 3148, buy = 15 }, - { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 }, - { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 }, - { itemName = "empty potion flask", clientId = 283, sell = 5 }, - { itemName = "empty potion flask", clientId = 284, sell = 5 }, - { itemName = "empty potion flask", clientId = 285, sell = 5 }, - { itemName = "energy field rune", clientId = 3164, buy = 38 }, - { itemName = "energy wall rune", clientId = 3166, buy = 85 }, - { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 }, - { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 }, - { itemName = "explosion rune", clientId = 3200, buy = 31 }, - { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, - { itemName = "fire field rune", clientId = 3188, buy = 28 }, - { itemName = "fire wall rune", clientId = 3190, buy = 61 }, - { itemName = "great fireball rune", clientId = 3191, buy = 57 }, - { itemName = "great health potion", clientId = 239, buy = 225 }, - { itemName = "great mana potion", clientId = 238, buy = 144 }, - { itemName = "great spirit potion", clientId = 7642, buy = 228 }, - { itemName = "health potion", clientId = 266, buy = 50 }, - { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, - { itemName = "intense healing rune", clientId = 3152, buy = 95 }, - { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 }, - { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 }, - { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, - { itemName = "mana potion", clientId = 268, buy = 56 }, - { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, - { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, - { itemName = "poison field rune", clientId = 3172, buy = 21 }, - { itemName = "poison wall rune", clientId = 3176, buy = 52 }, - { itemName = "snakebite rod", clientId = 3066, buy = 500 }, - { itemName = "spellbook", clientId = 3059, buy = 150 }, - { itemName = "spellwand", clientId = 651, sell = 299 }, - { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, - { itemName = "strong health potion", clientId = 236, buy = 115 }, - { itemName = "strong mana potion", clientId = 237, buy = 93 }, - { itemName = "sudden death rune", clientId = 3155, buy = 135 }, - { itemName = "talon", clientId = 3034, sell = 320 }, - { itemName = "terra rod", clientId = 3065, buy = 10000 }, - { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, - { itemName = "ultimate health potion", clientId = 7643, buy = 379 }, - { itemName = "vial", clientId = 2874, sell = 5 }, - { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, - { itemName = "wand of decay", clientId = 3072, buy = 5000 }, - { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, - { itemName = "wand of vortex", clientId = 3074, buy = 500 }, -} -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) npc:sellItem(player, itemId, amount, subType, 0, ignore, inBackpacks) diff --git a/data-otservbr-global/npc/rock_in_a_hard_place.lua b/data-otservbr-global/npc/rock_in_a_hard_place.lua index 29c36f10442..1a9fa25a8d5 100644 --- a/data-otservbr-global/npc/rock_in_a_hard_place.lua +++ b/data-otservbr-global/npc/rock_in_a_hard_place.lua @@ -45,214 +45,270 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end +local itemsTable = { + ["magic stuff"] = { + { itemName = "animate dead rune", clientId = 3203, buy = 375 }, + { itemName = "avalanche rune", clientId = 3161, buy = 57 }, + { itemName = "blank rune", clientId = 3147, buy = 10 }, + { itemName = "chameleon rune", clientId = 3178, buy = 210 }, + { itemName = "convince creature rune", clientId = 3177, buy = 80 }, + { itemName = "cure poison rune", clientId = 3153, buy = 65 }, + { itemName = "destroy field rune", clientId = 3148, buy = 15 }, + { itemName = "desintegrate rune", clientId = 3197, buy = 26 }, + { itemName = "empty potion flask", clientId = 283, sell = 5 }, + { itemName = "empty potion flask", clientId = 284, sell = 5 }, + { itemName = "empty potion flask", clientId = 285, sell = 5 }, + { itemName = "energy bomb rune", clientId = 3149, buy = 203 }, + { itemName = "energy field rune", clientId = 3164, buy = 38 }, + { itemName = "energy wall rune", clientId = 3166, buy = 85 }, + { itemName = "explosion rune", clientId = 3200, buy = 31 }, + { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, + { itemName = "fire field rune", clientId = 3188, buy = 28 }, + { itemName = "fire sword", clientId = 3280, sell = 1000 }, + { itemName = "fire wall rune", clientId = 3190, buy = 61 }, + { itemName = "fireball rune", clientId = 3189, buy = 30 }, + { itemName = "great fireball rune", clientId = 3191, buy = 57 }, + { itemName = "great health potion", clientId = 239, buy = 225 }, + { itemName = "great mana potion", clientId = 238, buy = 144 }, + { itemName = "great spirit potion", clientId = 7642, buy = 228 }, + { itemName = "health potion", clientId = 266, buy = 50 }, + { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, + { itemName = "holy missile rune", clientId = 3182, buy = 16 }, + { itemName = "icicle rune", clientId = 3158, buy = 30 }, + { itemName = "intense healing rune", clientId = 3152, buy = 95 }, + { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, + { itemName = "magic wall rune", clientId = 3180, buy = 116 }, + { itemName = "mana potion", clientId = 268, buy = 56 }, + { itemName = "paralyze rune", clientId = 3165, buy = 700 }, + { itemName = "poison bomb rune", clientId = 3173, buy = 85 }, + { itemName = "poison field rune", clientId = 3172, buy = 21 }, + { itemName = "poison wall rune", clientId = 3176, buy = 52 }, + { itemName = "soulfire rune", clientId = 3195, buy = 46 }, + { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, + { itemName = "stone shower rune", clientId = 3175, buy = 37 }, + { itemName = "strong health potion", clientId = 236, buy = 115 }, + { itemName = "strong mana potion", clientId = 237, buy = 93 }, + { itemName = "sudden death rune", clientId = 3155, buy = 135 }, + { itemName = "supreme health potion", clientId = 23375, buy = 625 }, + { itemName = "thunderstorm rune", clientId = 3202, buy = 47 }, + { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, + { itemName = "ultimate health potion", clientId = 7643, buy = 379 }, + { itemName = "ultimate mana potion", clientId = 23373, buy = 438 }, + { itemName = "ultimate spirit potion", clientId = 23374, buy = 438 }, + { itemName = "vial", clientId = 2874, sell = 5 }, + { itemName = "wild growth rune", clientId = 3156, buy = 160 }, + }, + ["local equipment"] = { + { itemName = "backpack", clientId = 2854, buy = 20 }, + { itemName = "basket", clientId = 2855, buy = 6 }, + { itemName = "bottle", clientId = 2875, buy = 3 }, + { itemName = "bucket", clientId = 2873, buy = 4 }, + { itemName = "calopteryx cape", clientId = 14086, sell = 15000 }, + { itemName = "carapace shield", clientId = 14088, sell = 32000 }, + { itemName = "candelabrum", clientId = 2911, buy = 8 }, + { itemName = "candlestick", clientId = 2917, buy = 2 }, + { itemName = "closed trap", clientId = 3481, buy = 280, sell = 75 }, + { itemName = "crowbar", clientId = 3304, buy = 260, sell = 50 }, + { itemName = "deepling axe", clientId = 13991, sell = 40000 }, + { itemName = "deepling squelcher", clientId = 14250, sell = 7000 }, + { itemName = "deepling staff", clientId = 13987, sell = 4000 }, + { itemName = "depth calcei", clientId = 13997, sell = 25000 }, + { itemName = "depth galea", clientId = 13995, sell = 35000 }, + { itemName = "depth lorica", clientId = 13994, sell = 30000 }, + { itemName = "depth ocrea", clientId = 13996, sell = 16000 }, + { itemName = "depth scutum", clientId = 13998, sell = 36000 }, + { itemName = "fishing rod", clientId = 3483, buy = 150, sell = 40 }, + { itemName = "grasshopper legs", clientId = 14087, sell = 15000 }, + { itemName = "guardian axe", clientId = 14043, sell = 9000 }, + { itemName = "hive bow", clientId = 14246, sell = 28000 }, + { itemName = "hive scythe", clientId = 14089, sell = 17000 }, + { itemName = "machete", clientId = 3308, buy = 35, sell = 6 }, + { itemName = "necklace of the deep", clientId = 13990, sell = 3000 }, + { itemName = "ornate chestplate", clientId = 13993, sell = 60000 }, + { itemName = "ornate crossbow", clientId = 14247, sell = 12000 }, + { itemName = "ornate legs", clientId = 13999, sell = 40000 }, + { itemName = "ornate mace", clientId = 14001, sell = 42000 }, + { itemName = "ornate shield", clientId = 14000, sell = 42000 }, + { itemName = "pick", clientId = 3456, buy = 50, sell = 15 }, + { itemName = "present", clientId = 2856, buy = 10 }, + { itemName = "rope", clientId = 3003, buy = 50, sell = 15 }, + { itemName = "scythe", clientId = 3453, buy = 50, sell = 10 }, + { itemName = "shovel", clientId = 3457, buy = 50, sell = 8 }, + { itemName = "torch", clientId = 2920, buy = 2 }, + { itemName = "warrior's axe", clientId = 14040, sell = 11000 }, + { itemName = "warrior's shield", clientId = 14042, sell = 9000 }, + { itemName = "watch", clientId = 2906, buy = 20, sell = 6 }, + { itemName = "wooden hammer", clientId = 3459, sell = 15 }, + { itemName = "worm", clientId = 3492, buy = 1 }, + }, + ["weapons"] = { + { itemName = "axe", clientId = 3274, buy = 20, sell = 7 }, + { itemName = "battle axe", clientId = 3266, buy = 235, sell = 80 }, + { itemName = "battle hammer", clientId = 3305, buy = 350, sell = 120 }, + { itemName = "bone club", clientId = 3337, sell = 5 }, + { itemName = "bone sword", clientId = 3338, buy = 75, sell = 20 }, + { itemName = "carlin sword", clientId = 3283, buy = 473, sell = 118 }, + { itemName = "club", clientId = 3270, buy = 5, sell = 1 }, + { itemName = "crowbar", clientId = 3304, buy = 260 }, + { itemName = "dagger", clientId = 3267, buy = 5, sell = 2 }, + { itemName = "double axe", clientId = 3275, sell = 260 }, + { itemName = "fire sword", clientId = 3280, sell = 1000 }, + { itemName = "halberd", clientId = 3269, sell = 400 }, + { itemName = "hand axe", clientId = 3268, buy = 8, sell = 4 }, + { itemName = "hatchet", clientId = 3276, sell = 25 }, + { itemName = "katana", clientId = 3300, sell = 35 }, + { itemName = "longsword", clientId = 3285, buy = 160, sell = 51 }, + { itemName = "mace", clientId = 3286, buy = 90, sell = 30 }, + { itemName = "morning star", clientId = 3282, buy = 430, sell = 100 }, + { itemName = "orcish axe", clientId = 3316, sell = 350 }, + { itemName = "rapier", clientId = 3272, buy = 15, sell = 5 }, + { itemName = "sabre", clientId = 3273, buy = 35, sell = 12 }, + { itemName = "short sword", clientId = 3294, buy = 26, sell = 10 }, + { itemName = "sickle", clientId = 3293, buy = 7, sell = 3 }, + { itemName = "spike sword", clientId = 3271, buy = 8000, sell = 240 }, + { itemName = "small axe", clientId = 3462, sell = 5 }, + { itemName = "studded club", clientId = 3336, sell = 10 }, + { itemName = "sword", clientId = 3264, buy = 85, sell = 25 }, + { itemName = "throwing knife", clientId = 3298, buy = 25, sell = 2 }, + { itemName = "two handed sword", clientId = 3265, buy = 950, sell = 450 }, + { itemName = "war hammer", clientId = 3279, buy = 10000, sell = 470 }, + }, + ["armor"] = { + { itemName = "battle shield", clientId = 3413, sell = 95 }, + { itemName = "brass armor", clientId = 3359, buy = 450, sell = 150 }, + { itemName = "brass helmet", clientId = 3354, buy = 120, sell = 30 }, + { itemName = "brass legs", clientId = 3372, buy = 195, sell = 49 }, + { itemName = "chain armor", clientId = 3358, buy = 200, sell = 70 }, + { itemName = "chain helmet", clientId = 3352, buy = 52, sell = 17 }, + { itemName = "chain legs", clientId = 3558, buy = 80, sell = 25 }, + { itemName = "coat", clientId = 3562, buy = 8, sell = 1 }, + { itemName = "copper shield", clientId = 3430, sell = 50 }, + { itemName = "doublet", clientId = 3379, buy = 16, sell = 3 }, + { itemName = "dwarven shield", clientId = 3425, buy = 500, sell = 100 }, + { itemName = "iron helmet", clientId = 3353, buy = 390, sell = 150 }, + { itemName = "jacket", clientId = 3561, buy = 12, sell = 1 }, + { itemName = "leather armor", clientId = 3361, buy = 35, sell = 12 }, + { itemName = "leather boots", clientId = 3552, buy = 10, sell = 2 }, + { itemName = "leather helmet", clientId = 3355, buy = 12, sell = 4 }, + { itemName = "leather legs", clientId = 3559, buy = 10, sell = 9 }, + { itemName = "legion helmet", clientId = 3374, sell = 22 }, + { itemName = "plate armor", clientId = 3357, buy = 1200, sell = 400 }, + { itemName = "plate legs", clientId = 3557, sell = 115 }, + { itemName = "plate shield", clientId = 3410, buy = 125, sell = 45 }, + { itemName = "scale armor", clientId = 3377, buy = 260, sell = 75 }, + { itemName = "soldier helmet", clientId = 3375, buy = 110, sell = 16 }, + { itemName = "steel helmet", clientId = 3351, buy = 580, sell = 293 }, + { itemName = "steel shield", clientId = 3409, buy = 240, sell = 80 }, + { itemName = "studded armor", clientId = 3378, buy = 90, sell = 25 }, + { itemName = "studded helmet", clientId = 3376, buy = 63, sell = 20 }, + { itemName = "studded legs", clientId = 3362, buy = 50, sell = 15 }, + { itemName = "studded shield", clientId = 3426, buy = 50, sell = 16 }, + { itemName = "swampling club", clientId = 17824, sell = 40 }, + { itemName = "viking helmet", clientId = 3367, buy = 265, sell = 66 }, + { itemName = "viking shield", clientId = 3431, buy = 260, sell = 85 }, + { itemName = "wooden shield", clientId = 3412, buy = 15, sell = 5 }, + }, + ["ammunition"] = { + { itemName = "arrow", clientId = 3447, buy = 3 }, + { itemName = "blue quiver", clientId = 35848, buy = 400 }, + { itemName = "bolt", clientId = 3446, buy = 4 }, + { itemName = "bow", clientId = 3350, buy = 400, sell = 100 }, + { itemName = "crossbow", clientId = 3349, buy = 500, sell = 120 }, + { itemName = "crystalline arrow", clientId = 15793, buy = 20 }, + { itemName = "diamond arrow", clientId = 35901, buy = 100 }, + { itemName = "drill bolt", clientId = 16142, buy = 12 }, + { itemName = "earth arrow", clientId = 774, buy = 5 }, + { itemName = "envenomed arrow", clientId = 16143, buy = 12 }, + { itemName = "flaming arrow", clientId = 763, buy = 5 }, + { itemName = "flash arrow", clientId = 761, buy = 5 }, + { itemName = "onyx arrow", clientId = 7365, buy = 7 }, + { itemName = "piercing bolt", clientId = 7363, buy = 5 }, + { itemName = "power bolt", clientId = 3450, buy = 7 }, + { itemName = "prismatic bolt", clientId = 16141, buy = 20 }, + { itemName = "quiver", clientId = 35562, buy = 400 }, + { itemName = "red quiver", clientId = 35849, buy = 400 }, + { itemName = "royal spear", clientId = 7378, buy = 15 }, + { itemName = "shiver arrow", clientId = 762, buy = 5 }, + { itemName = "sniper arrow", clientId = 7364, buy = 5 }, + { itemName = "spear", clientId = 3277, buy = 9, sell = 3 }, + { itemName = "spectral bolt", clientId = 35902, buy = 70 }, + { itemName = "tarsal arrow", clientId = 14251, buy = 6 }, + { itemName = "throwing star", clientId = 3287, buy = 42 }, + { itemName = "vortex bolt", clientId = 14252, buy = 6 }, + }, + ["post things"] = { + { itemName = "label", clientId = 3507, buy = 1 }, + { itemName = "letter", clientId = 3505, buy = 8 }, + { itemName = "parcel", clientId = 3503, buy = 15 }, + }, + ["creature products"] = { + { itemName = "compound eye", clientId = 14083, sell = 150 }, + { itemName = "crawler head plating", clientId = 14079, sell = 210 }, + { itemName = "deepling breaktime snack", clientId = 14011, sell = 90 }, + { itemName = "deepling claw", clientId = 14044, sell = 430 }, + { itemName = "deepling guard belt buckle", clientId = 14010, sell = 230 }, + { itemName = "deepling ridge", clientId = 14041, sell = 360 }, + { itemName = "deepling scales", clientId = 14017, sell = 80 }, + { itemName = "deepling warts", clientId = 14012, sell = 180 }, + { itemName = "deeptags", clientId = 14013, sell = 290 }, + { itemName = "dung ball", clientId = 14225, sell = 130 }, + { itemName = "eye of a deepling", clientId = 12730, sell = 150 }, + { itemName = "hand auger", clientId = 31334, buy = 25 }, + { itemName = "key to the drowned library", clientId = 14009, sell = 330 }, + { itemName = "kollos shell", clientId = 14077, sell = 420 }, + { itemName = "net", clientId = 31489, buy = 50 }, + { itemName = "spellsinger's seal", clientId = 14008, sell = 280 }, + { itemName = "spidris mandible", clientId = 14082, sell = 450 }, + { itemName = "spitter nose", clientId = 14078, sell = 340 }, + { itemName = "swarmer antenna", clientId = 14076, sell = 130 }, + { itemName = "waspoid claw", clientId = 14080, sell = 320 }, + { itemName = "waspoid wing", clientId = 14081, sell = 190 }, + }, +} + +local function creatureSayCallback(npc, creature, type, message) + local player = Player(creature) + local playerId = player:getId() + + if not npcHandler:checkInteraction(npc, creature) then + return false + end + + local formattedCategoryNames = {} + for categoryName, _ in pairs(itemsTable) do + table.insert(formattedCategoryNames, "{" .. categoryName .. "}") + end + + local categoryTable = itemsTable[message:lower()] + + if categoryTable then + npcHandler:say("Here, have a look", npc, player) + npc:openShopWindowTable(player, categoryTable) + end + return true +end + +local function onTradeRequest(npc, creature) + local player = Player(creature) + local playerId = player:getId() + + npcHandler:say("You would be surprised how many things are washed ashore here. I trade {magic stuff}, {local equipment}, {weapons}, {armor}, {ammunition}, {post things} and {creature products}.", npc, creature) + return true +end + +keywordHandler:addKeyword({ "job" }, StdModule.say, { npcHandler = npcHandler, text = "Have you noticed that I'm actually the only rock on this island with a proper job? Those lazy pebbleheads! I'm proud to announce: I'm a trader" }) +keywordHandler:addKeyword({ "name" }, StdModule.say, { npcHandler = npcHandler, text = "No, you got it all wrong! I said I'm stuck between a rock and a hard place!" }) +keywordHandler:addKeyword({ "help" }, StdModule.say, { npcHandler = npcHandler, text = "I can help you buy trading stuff with you. Good for me, good for you. It's a win-win!" }) +keywordHandler:addKeyword({ "job" }, StdModule.say, { npcHandler = npcHandler, text = "Have you noticed that I'm actually the only rock on this island with a proper job? Those lazy pebbleheads! I'm proud to announce: I'm a trader" }) + +npcHandler:setMessage(MESSAGE_GREET, "Everyone on this island has gone crazy! Except for me and you, it seems. Let's {trade} like normal people would.") +npcHandler:setMessage(MESSAGE_FAREWELL, "Promise to come back sometime, will ya?") +npcHandler:setMessage(MESSAGE_WALKAWAY, "Hey! Don't leave me alone with all these lunatics!") + +npcHandler:setCallback(CALLBACK_ON_TRADE_REQUEST, onTradeRequest) +npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -npcConfig.shop = { - { itemName = "animate dead rune", clientId = 3203, buy = 375 }, - { itemName = "arrow", clientId = 3447, buy = 3 }, - { itemName = "avalanche rune", clientId = 3161, buy = 57 }, - { itemName = "axe", clientId = 3274, buy = 20, sell = 7 }, - { itemName = "backpack", clientId = 2854, buy = 20 }, - { itemName = "basket", clientId = 2855, buy = 6 }, - { itemName = "battle axe", clientId = 3266, buy = 235, sell = 80 }, - { itemName = "battle hammer", clientId = 3305, buy = 350, sell = 120 }, - { itemName = "battle shield", clientId = 3413, sell = 95 }, - { itemName = "blank rune", clientId = 3147, buy = 10 }, - { itemName = "blue quiver", clientId = 35848, buy = 400 }, - { itemName = "bolt", clientId = 3446, buy = 4 }, - { itemName = "bone club", clientId = 3337, sell = 5 }, - { itemName = "bone sword", clientId = 3338, buy = 75, sell = 20 }, - { itemName = "bottle", clientId = 2875, buy = 3 }, - { itemName = "bow", clientId = 3350, buy = 400, sell = 100 }, - { itemName = "brass armor", clientId = 3359, buy = 450, sell = 150 }, - { itemName = "brass helmet", clientId = 3354, buy = 120, sell = 30 }, - { itemName = "brass legs", clientId = 3372, buy = 195, sell = 49 }, - { itemName = "brass shield", clientId = 3411, buy = 65, sell = 25 }, - { itemName = "bucket", clientId = 2873, buy = 4 }, - { itemName = "calopteryx cape", clientId = 14086, sell = 15000 }, - { itemName = "candelabrum", clientId = 2911, buy = 8 }, - { itemName = "candlestick", clientId = 2917, buy = 2 }, - { itemName = "carapace shield", clientId = 14088, sell = 32000 }, - { itemName = "carlin sword", clientId = 3283, buy = 473, sell = 118 }, - { itemName = "chain armor", clientId = 3358, buy = 200, sell = 70 }, - { itemName = "chain helmet", clientId = 3352, buy = 52, sell = 17 }, - { itemName = "chain legs", clientId = 3558, buy = 80, sell = 25 }, - { itemName = "chameleon rune", clientId = 3178, buy = 210 }, - { itemName = "closed trap", clientId = 3481, buy = 280, sell = 75 }, - { itemName = "club", clientId = 3270, buy = 5, sell = 1 }, - { itemName = "coat", clientId = 3562, buy = 8, sell = 1 }, - { itemName = "compound eye", clientId = 14083, sell = 150 }, - { itemName = "convince creature rune", clientId = 3177, buy = 80 }, - { itemName = "copper shield", clientId = 3430, sell = 50 }, - { itemName = "crawler head plating", clientId = 14079, sell = 210 }, - { itemName = "crossbow", clientId = 3349, buy = 500, sell = 120 }, - { itemName = "crowbar", clientId = 3304, buy = 260, sell = 50 }, - { itemName = "crowbar", clientId = 3304, buy = 260 }, - { itemName = "crystalline arrow", clientId = 15793, buy = 20 }, - { itemName = "cure poison rune", clientId = 3153, buy = 65 }, - { itemName = "dagger", clientId = 3267, buy = 5, sell = 2 }, - { itemName = "deepling axe", clientId = 13991, sell = 40000 }, - { itemName = "deepling breaktime snack", clientId = 14011, sell = 90 }, - { itemName = "deepling claw", clientId = 14044, sell = 430 }, - { itemName = "deepling guard belt buckle", clientId = 14010, sell = 230 }, - { itemName = "deepling ridge", clientId = 14041, sell = 360 }, - { itemName = "deepling scales", clientId = 14017, sell = 80 }, - { itemName = "deepling squelcher", clientId = 14250, sell = 7000 }, - { itemName = "deepling staff", clientId = 13987, sell = 4000 }, - { itemName = "deepling warts", clientId = 14012, sell = 180 }, - { itemName = "deeptags", clientId = 14013, sell = 290 }, - { itemName = "depth calcei", clientId = 13997, sell = 25000 }, - { itemName = "depth galea", clientId = 13995, sell = 35000 }, - { itemName = "depth lorica", clientId = 13994, sell = 30000 }, - { itemName = "depth ocrea", clientId = 13996, sell = 16000 }, - { itemName = "depth scutum", clientId = 13998, sell = 36000 }, - { itemName = "desintegrate rune", clientId = 3197, buy = 26 }, - { itemName = "destroy field rune", clientId = 3148, buy = 15 }, - { itemName = "diamond arrow", clientId = 35901, buy = 100 }, - { itemName = "double axe", clientId = 3275, sell = 260 }, - { itemName = "doublet", clientId = 3379, buy = 16, sell = 3 }, - { itemName = "drill bolt", clientId = 16142, buy = 12 }, - { itemName = "dung ball", clientId = 14225, sell = 130 }, - { itemName = "dwarven shield", clientId = 3425, buy = 500, sell = 100 }, - { itemName = "earth arrow", clientId = 774, buy = 5 }, - { itemName = "empty potion flask", clientId = 283, sell = 5 }, - { itemName = "empty potion flask", clientId = 284, sell = 5 }, - { itemName = "empty potion flask", clientId = 285, sell = 5 }, - { itemName = "energy bomb rune", clientId = 3149, buy = 203 }, - { itemName = "energy field rune", clientId = 3164, buy = 38 }, - { itemName = "energy wall rune", clientId = 3166, buy = 85 }, - { itemName = "envenomed arrow", clientId = 16143, buy = 12 }, - { itemName = "explosion rune", clientId = 3200, buy = 31 }, - { itemName = "eye of a deepling", clientId = 12730, sell = 150 }, - { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, - { itemName = "fire field rune", clientId = 3188, buy = 28 }, - { itemName = "fire sword", clientId = 3280, sell = 1000 }, - { itemName = "fire wall rune", clientId = 3190, buy = 61 }, - { itemName = "fireball rune", clientId = 3189, buy = 30 }, - { itemName = "fishing rod", clientId = 3483, buy = 150, sell = 40 }, - { itemName = "flaming arrow", clientId = 763, buy = 5 }, - { itemName = "flash arrow", clientId = 761, buy = 5 }, - { itemName = "grasshopper legs", clientId = 14087, sell = 15000 }, - { itemName = "great fireball rune", clientId = 3191, buy = 57 }, - { itemName = "great health potion", clientId = 239, buy = 225 }, - { itemName = "great mana potion", clientId = 238, buy = 144 }, - { itemName = "great spirit potion", clientId = 7642, buy = 228 }, - { itemName = "guardian axe", clientId = 14043, sell = 9000 }, - { itemName = "halberd", clientId = 3269, sell = 400 }, - { itemName = "hand auger", clientId = 31334, buy = 25 }, - { itemName = "hand axe", clientId = 3268, buy = 8, sell = 4 }, - { itemName = "hatchet", clientId = 3276, sell = 25 }, - { itemName = "health potion", clientId = 266, buy = 50 }, - { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, - { itemName = "hive bow", clientId = 14246, sell = 28000 }, - { itemName = "hive scythe", clientId = 14089, sell = 17000 }, - { itemName = "holy missile rune", clientId = 3182, buy = 16 }, - { itemName = "icicle rune", clientId = 3158, buy = 30 }, - { itemName = "intense healing rune", clientId = 3152, buy = 95 }, - { itemName = "iron helmet", clientId = 3353, buy = 390, sell = 150 }, - { itemName = "jacket", clientId = 3561, buy = 12, sell = 1 }, - { itemName = "katana", clientId = 3300, sell = 35 }, - { itemName = "key to the drowned library", clientId = 14009, sell = 330 }, - { itemName = "kollos shell", clientId = 14077, sell = 420 }, - { itemName = "label", clientId = 3507, buy = 1 }, - { itemName = "leather armor", clientId = 3361, buy = 35, sell = 12 }, - { itemName = "leather boots", clientId = 3552, buy = 10, sell = 2 }, - { itemName = "leather helmet", clientId = 3355, buy = 12, sell = 4 }, - { itemName = "leather legs", clientId = 3559, buy = 10, sell = 9 }, - { itemName = "legion helmet", clientId = 3374, sell = 22 }, - { itemName = "letter", clientId = 3505, buy = 8 }, - { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, - { itemName = "longsword", clientId = 3285, buy = 160, sell = 51 }, - { itemName = "mace", clientId = 3286, buy = 90, sell = 30 }, - { itemName = "machete", clientId = 3308, buy = 35, sell = 6 }, - { itemName = "magic wall rune", clientId = 3180, buy = 116 }, - { itemName = "mana potion", clientId = 268, buy = 56 }, - { itemName = "morning star", clientId = 3282, buy = 430, sell = 100 }, - { itemName = "necklace of the deep", clientId = 13990, sell = 3000 }, - { itemName = "net", clientId = 31489, buy = 50 }, - { itemName = "onyx arrow", clientId = 7365, buy = 7 }, - { itemName = "orcish axe", clientId = 3316, sell = 350 }, - { itemName = "ornate chestplate", clientId = 13993, sell = 60000 }, - { itemName = "ornate crossbow", clientId = 14247, sell = 12000 }, - { itemName = "ornate legs", clientId = 13999, sell = 40000 }, - { itemName = "ornate mace", clientId = 14001, sell = 42000 }, - { itemName = "ornate shield", clientId = 14000, sell = 42000 }, - { itemName = "paralyze rune", clientId = 3165, buy = 700 }, - { itemName = "parcel", clientId = 3503, buy = 15 }, - { itemName = "pick", clientId = 3456, buy = 50, sell = 15 }, - { itemName = "piercing bolt", clientId = 7363, buy = 5 }, - { itemName = "plate armor", clientId = 3357, buy = 1200, sell = 400 }, - { itemName = "plate legs", clientId = 3557, sell = 115 }, - { itemName = "plate shield", clientId = 3410, buy = 125, sell = 45 }, - { itemName = "poison bomb rune", clientId = 3173, buy = 85 }, - { itemName = "poison field rune", clientId = 3172, buy = 21 }, - { itemName = "poison wall rune", clientId = 3176, buy = 52 }, - { itemName = "power bolt", clientId = 3450, buy = 7 }, - { itemName = "present", clientId = 2856, buy = 10 }, - { itemName = "prismatic bolt", clientId = 16141, buy = 20 }, - { itemName = "quiver", clientId = 35562, buy = 400 }, - { itemName = "rapier", clientId = 3272, buy = 15, sell = 5 }, - { itemName = "red quiver", clientId = 35849, buy = 400 }, - { itemName = "rope", clientId = 3003, buy = 50, sell = 15 }, - { itemName = "royal spear", clientId = 7378, buy = 15 }, - { itemName = "sabre", clientId = 3273, buy = 35, sell = 12 }, - { itemName = "scale armor", clientId = 3377, buy = 260, sell = 75 }, - { itemName = "scythe", clientId = 3453, buy = 50, sell = 10 }, - { itemName = "shiver arrow", clientId = 762, buy = 5 }, - { itemName = "short sword", clientId = 3294, buy = 26, sell = 10 }, - { itemName = "shovel", clientId = 3457, buy = 50, sell = 8 }, - { itemName = "sickle", clientId = 3293, buy = 7, sell = 3 }, - { itemName = "small axe", clientId = 3462, sell = 5 }, - { itemName = "sniper arrow", clientId = 7364, buy = 5 }, - { itemName = "soldier helmet", clientId = 3375, buy = 110, sell = 16 }, - { itemName = "soulfire rune", clientId = 3195, buy = 46 }, - { itemName = "spear", clientId = 3277, buy = 9, sell = 3 }, - { itemName = "spectral bolt", clientId = 35902, buy = 70 }, - { itemName = "spellsinger's seal", clientId = 14008, sell = 280 }, - { itemName = "spidris mandible", clientId = 14082, sell = 450 }, - { itemName = "spike sword", clientId = 3271, buy = 8000, sell = 240 }, - { itemName = "spitter nose", clientId = 14078, sell = 340 }, - { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, - { itemName = "steel helmet", clientId = 3351, buy = 580, sell = 293 }, - { itemName = "steel shield", clientId = 3409, buy = 240, sell = 80 }, - { itemName = "stone shower rune", clientId = 3175, buy = 37 }, - { itemName = "strong health potion", clientId = 236, buy = 115 }, - { itemName = "strong mana potion", clientId = 237, buy = 93 }, - { itemName = "studded armor", clientId = 3378, buy = 90, sell = 25 }, - { itemName = "studded club", clientId = 3336, sell = 10 }, - { itemName = "studded helmet", clientId = 3376, buy = 63, sell = 20 }, - { itemName = "studded legs", clientId = 3362, buy = 50, sell = 15 }, - { itemName = "studded shield", clientId = 3426, buy = 50, sell = 16 }, - { itemName = "sudden death rune", clientId = 3155, buy = 135 }, - { itemName = "supreme health potion", clientId = 23375, buy = 625 }, - { itemName = "swampling club", clientId = 17824, sell = 40 }, - { itemName = "swarmer antenna", clientId = 14076, sell = 130 }, - { itemName = "sword", clientId = 3264, buy = 85, sell = 25 }, - { itemName = "tarsal arrow", clientId = 14251, buy = 6 }, - { itemName = "throwing knife", clientId = 3298, buy = 25, sell = 2 }, - { itemName = "throwing star", clientId = 3287, buy = 42 }, - { itemName = "thunderstorm rune", clientId = 3202, buy = 47 }, - { itemName = "torch", clientId = 2920, buy = 2 }, - { itemName = "two handed sword", clientId = 3265, buy = 950, sell = 450 }, - { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, - { itemName = "ultimate health potion", clientId = 7643, buy = 379 }, - { itemName = "ultimate mana potion", clientId = 23373, buy = 438 }, - { itemName = "ultimate spirit potion", clientId = 23374, buy = 438 }, - { itemName = "vial", clientId = 2874, sell = 5 }, - { itemName = "viking helmet", clientId = 3367, buy = 265, sell = 66 }, - { itemName = "viking shield", clientId = 3431, buy = 260, sell = 85 }, - { itemName = "vortex bolt", clientId = 14252, buy = 6 }, - { itemName = "war hammer", clientId = 3279, buy = 10000, sell = 470 }, - { itemName = "warrior's axe", clientId = 14040, sell = 11000 }, - { itemName = "warrior's shield", clientId = 14042, sell = 9000 }, - { itemName = "waspoid claw", clientId = 14080, sell = 320 }, - { itemName = "waspoid wing", clientId = 14081, sell = 190 }, - { itemName = "watch", clientId = 2906, buy = 20, sell = 6 }, - { itemName = "wild growth rune", clientId = 3156, buy = 160 }, - { itemName = "wooden hammer", clientId = 3459, sell = 15 }, - { itemName = "wooden shield", clientId = 3412, buy = 15, sell = 5 }, - { itemName = "worm", clientId = 3492, buy = 1 }, -} -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) npc:sellItem(player, itemId, amount, subType, 0, ignore, inBackpacks) diff --git a/data-otservbr-global/npc/romir.lua b/data-otservbr-global/npc/romir.lua index e64a7ee0e97..70bcb0e8da0 100644 --- a/data-otservbr-global/npc/romir.lua +++ b/data-otservbr-global/npc/romir.lua @@ -23,6 +23,74 @@ npcConfig.flags = { floorchange = false, } +local itemsTable = { + ["potions"] = { + { itemName = "empty potion flask", clientId = 283, sell = 5 }, + { itemName = "empty potion flask", clientId = 284, sell = 5 }, + { itemName = "empty potion flask", clientId = 285, sell = 5 }, + { itemName = "great health potion", clientId = 239, buy = 225 }, + { itemName = "great mana potion", clientId = 238, buy = 144 }, + { itemName = "great spirit potion", clientId = 7642, buy = 228 }, + { itemName = "health potion", clientId = 266, buy = 50 }, + { itemName = "mana potion", clientId = 268, buy = 56 }, + { itemName = "strong health potion", clientId = 236, buy = 115 }, + { itemName = "strong mana potion", clientId = 237, buy = 93 }, + { itemName = "supreme health potion", clientId = 23375, buy = 625 }, + { itemName = "ultimate health potion", clientId = 7643, buy = 379 }, + { itemName = "ultimate mana potion", clientId = 23373, buy = 438 }, + { itemName = "ultimate spirit potion", clientId = 23374, buy = 438 }, + { itemName = "vial", clientId = 2874, sell = 5 }, + }, + ["runes"] = { + { itemName = "avalanche rune", clientId = 3161, buy = 57 }, + { itemName = "blank rune", clientId = 3147, buy = 10 }, + { itemName = "chameleon rune", clientId = 3178, buy = 210 }, + { itemName = "convince creature rune", clientId = 3177, buy = 80 }, + { itemName = "cure poison rune", clientId = 3153, buy = 65 }, + { itemName = "destroy field rune", clientId = 3148, buy = 15 }, + { itemName = "energy field rune", clientId = 3164, buy = 38 }, + { itemName = "energy wall rune", clientId = 3166, buy = 85 }, + { itemName = "explosion rune", clientId = 3200, buy = 31 }, + { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, + { itemName = "fire field rune", clientId = 3188, buy = 28 }, + { itemName = "fire wall rune", clientId = 3190, buy = 61 }, + { itemName = "great fireball rune", clientId = 3191, buy = 57 }, + { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, + { itemName = "intense healing rune", clientId = 3152, buy = 95 }, + { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, + { itemName = "poison field rune", clientId = 3172, buy = 21 }, + { itemName = "poison wall rune", clientId = 3176, buy = 52 }, + { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, + { itemName = "sudden death rune", clientId = 3155, buy = 135 }, + { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, + }, + ["wands"] = { + { itemName = "hailstorm rod", clientId = 3067, buy = 15000 }, + { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, + { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, + { itemName = "northwind rod", clientId = 8083, buy = 7500 }, + { itemName = "snakebite rod", clientId = 3066, buy = 500 }, + { itemName = "springsprout rod", clientId = 8084, buy = 18000 }, + { itemName = "terra rod", clientId = 3065, buy = 10000 }, + { itemName = "underworld rod", clientId = 8082, buy = 22000 }, + { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, + { itemName = "wand of decay", clientId = 3072, buy = 5000 }, + { itemName = "wand of draconia", clientId = 8093, buy = 7500 }, + { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, + { itemName = "wand of inferno", clientId = 3071, buy = 15000 }, + { itemName = "wand of starstorm", clientId = 8092, buy = 18000 }, + { itemName = "wand of voodoo", clientId = 8094, buy = 22000 }, + { itemName = "wand of vortex", clientId = 3074, buy = 500 }, + }, +} + +npcConfig.shop = {} +for _, categoryTable in pairs(itemsTable) do + for _, itemTable in ipairs(categoryTable) do + table.insert(npcConfig.shop, itemTable) + end +end + local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) @@ -50,70 +118,39 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end +local function creatureSayCallback(npc, creature, type, message) + local player = Player(creature) + local playerId = player:getId() + + if not npcHandler:checkInteraction(npc, creature) then + return false + end + + local formattedCategoryNames = {} + for categoryName, _ in pairs(itemsTable) do + table.insert(formattedCategoryNames, "{" .. categoryName .. "}") + end + + local categoryTable = itemsTable[message:lower()] + + if categoryTable then + npcHandler:say("Of course, just browse through my wares.", npc, player) + npc:openShopWindowTable(player, categoryTable) + end + return true +end + +npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) +npcHandler:setMessage(MESSAGE_GREET, "Greetings, traveller. I'm a magical trader and trainer for sorcerer spells. How may I help you?") +npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye.") +npcHandler:setMessage(MESSAGE_WALKAWAY, "Good bye.") +npcHandler:setMessage( + MESSAGE_SENDTRADE, + "Of course, just browse through my wares. \z + Or do you want to look only at {potions}, {wands} or {runes}?" +) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -npcConfig.shop = { - { itemName = "avalanche rune", clientId = 3161, buy = 57 }, - { itemName = "blank rune", clientId = 3147, buy = 10 }, - { itemName = "chameleon rune", clientId = 3178, buy = 210 }, - { itemName = "convince creature rune", clientId = 3177, buy = 80 }, - { itemName = "cure poison rune", clientId = 3153, buy = 65 }, - { itemName = "destroy field rune", clientId = 3148, buy = 15 }, - { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 }, - { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 }, - { itemName = "empty potion flask", clientId = 283, sell = 5 }, - { itemName = "empty potion flask", clientId = 284, sell = 5 }, - { itemName = "empty potion flask", clientId = 285, sell = 5 }, - { itemName = "energy field rune", clientId = 3164, buy = 38 }, - { itemName = "energy wall rune", clientId = 3166, buy = 85 }, - { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 }, - { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 }, - { itemName = "explosion rune", clientId = 3200, buy = 31 }, - { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, - { itemName = "fire field rune", clientId = 3188, buy = 28 }, - { itemName = "fire wall rune", clientId = 3190, buy = 61 }, - { itemName = "great fireball rune", clientId = 3191, buy = 57 }, - { itemName = "great health potion", clientId = 239, buy = 225 }, - { itemName = "great mana potion", clientId = 238, buy = 144 }, - { itemName = "great spirit potion", clientId = 7642, buy = 228 }, - { itemName = "hailstorm rod", clientId = 3067, buy = 15000 }, - { itemName = "health potion", clientId = 266, buy = 50 }, - { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, - { itemName = "intense healing rune", clientId = 3152, buy = 95 }, - { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 }, - { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 }, - { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, - { itemName = "mana potion", clientId = 268, buy = 56 }, - { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, - { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, - { itemName = "northwind rod", clientId = 8083, buy = 7500 }, - { itemName = "poison field rune", clientId = 3172, buy = 21 }, - { itemName = "poison wall rune", clientId = 3176, buy = 52 }, - { itemName = "snakebite rod", clientId = 3066, buy = 500 }, - { itemName = "spellbook", clientId = 3059, buy = 150 }, - { itemName = "spellwand", clientId = 651, sell = 299 }, - { itemName = "springsprout rod", clientId = 8084, buy = 18000 }, - { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, - { itemName = "strong health potion", clientId = 236, buy = 115 }, - { itemName = "strong mana potion", clientId = 237, buy = 93 }, - { itemName = "sudden death rune", clientId = 3155, buy = 135 }, - { itemName = "supreme health potion", clientId = 23375, buy = 625 }, - { itemName = "terra rod", clientId = 3065, buy = 10000 }, - { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, - { itemName = "ultimate health potion", clientId = 7643, buy = 379 }, - { itemName = "ultimate mana potion", clientId = 23373, buy = 438 }, - { itemName = "ultimate spirit potion", clientId = 23374, buy = 438 }, - { itemName = "underworld rod", clientId = 8082, buy = 22000 }, - { itemName = "vial", clientId = 2874, sell = 5 }, - { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, - { itemName = "wand of decay", clientId = 3072, buy = 5000 }, - { itemName = "wand of draconia", clientId = 8093, buy = 7500 }, - { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, - { itemName = "wand of inferno", clientId = 3071, buy = 15000 }, - { itemName = "wand of starstorm", clientId = 8092, buy = 18000 }, - { itemName = "wand of voodoo", clientId = 8094, buy = 22000 }, - { itemName = "wand of vortex", clientId = 3074, buy = 500 }, -} -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) npc:sellItem(player, itemId, amount, subType, 0, ignore, inBackpacks) diff --git a/data-otservbr-global/npc/shiriel.lua b/data-otservbr-global/npc/shiriel.lua index 8793fe4940c..4c6408e7874 100644 --- a/data-otservbr-global/npc/shiriel.lua +++ b/data-otservbr-global/npc/shiriel.lua @@ -22,6 +22,63 @@ npcConfig.flags = { floorchange = false, } +local itemsTable = { + ["potions"] = { + { itemName = "empty potion flask", clientId = 283, sell = 5 }, + { itemName = "empty potion flask", clientId = 284, sell = 5 }, + { itemName = "empty potion flask", clientId = 285, sell = 5 }, + { itemName = "great health potion", clientId = 239, buy = 225 }, + { itemName = "great mana potion", clientId = 238, buy = 144 }, + { itemName = "great spirit potion", clientId = 7642, buy = 228 }, + { itemName = "health potion", clientId = 266, buy = 50 }, + { itemName = "mana potion", clientId = 268, buy = 56 }, + { itemName = "strong health potion", clientId = 236, buy = 115 }, + { itemName = "strong mana potion", clientId = 237, buy = 93 }, + { itemName = "ultimate health potion", clientId = 7643, buy = 379 }, + { itemName = "vial", clientId = 2874, sell = 5 }, + }, + ["runes"] = { + { itemName = "avalanche rune", clientId = 3161, buy = 57 }, + { itemName = "blank rune", clientId = 3147, buy = 10 }, + { itemName = "chameleon rune", clientId = 3178, buy = 210 }, + { itemName = "convince creature rune", clientId = 3177, buy = 80 }, + { itemName = "cure poison rune", clientId = 3153, buy = 65 }, + { itemName = "destroy field rune", clientId = 3148, buy = 15 }, + { itemName = "energy field rune", clientId = 3164, buy = 38 }, + { itemName = "energy wall rune", clientId = 3166, buy = 85 }, + { itemName = "explosion rune", clientId = 3200, buy = 31 }, + { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, + { itemName = "fire field rune", clientId = 3188, buy = 28 }, + { itemName = "fire wall rune", clientId = 3190, buy = 61 }, + { itemName = "great fireball rune", clientId = 3191, buy = 57 }, + { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, + { itemName = "intense healing rune", clientId = 3152, buy = 95 }, + { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, + { itemName = "poison field rune", clientId = 3172, buy = 21 }, + { itemName = "poison wall rune", clientId = 3176, buy = 52 }, + { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, + { itemName = "sudden death rune", clientId = 3155, buy = 135 }, + { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, + }, + ["wands"] = { + { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, + { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, + { itemName = "snakebite rod", clientId = 3066, buy = 500 }, + { itemName = "terra rod", clientId = 3065, buy = 10000 }, + { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, + { itemName = "wand of decay", clientId = 3072, buy = 5000 }, + { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, + { itemName = "wand of vortex", clientId = 3074, buy = 500 }, + }, +} + +npcConfig.shop = {} +for _, categoryTable in pairs(itemsTable) do + for _, itemTable in ipairs(categoryTable) do + table.insert(npcConfig.shop, itemTable) + end +end + local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) @@ -49,65 +106,44 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end +local function creatureSayCallback(npc, creature, type, message) + local player = Player(creature) + local playerId = player:getId() + + if not npcHandler:checkInteraction(npc, creature) then + return false + end + + local formattedCategoryNames = {} + for categoryName, _ in pairs(itemsTable) do + table.insert(formattedCategoryNames, "{" .. categoryName .. "}") + end + + local categoryTable = itemsTable[message:lower()] + + if categoryTable then + npcHandler:say("Of course, just browse through my wares.", npc, player) + npc:openShopWindowTable(player, categoryTable) + end + return true +end + +npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) +npcHandler:setMessage(MESSAGE_GREET, "Greetings, |PLAYERNAME|.") +npcHandler:setMessage(MESSAGE_FAREWELL, "Goodbye, |PLAYERNAME|.") +npcHandler:setMessage(MESSAGE_WALKAWAY, "Goodbye, |PLAYERNAME|.") +npcHandler:setMessage( + MESSAGE_SENDTRADE, + "Of course, just browse through my wares. \z + Or do you want to look only at {potions}, {wands} or {runes}?" +) +npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) + -- Greeting message keywordHandler:addGreetKeyword({ "ashari" }, { npcHandler = npcHandler, text = "Greetings, |PLAYERNAME|." }) --Farewell message keywordHandler:addFarewellKeyword({ "asgha thrazi" }, { npcHandler = npcHandler, text = "Goodbye, |PLAYERNAME|." }) -npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye!") - -npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -npcConfig.shop = { - { itemName = "avalanche rune", clientId = 3161, buy = 57 }, - { itemName = "blank rune", clientId = 3147, buy = 10 }, - { itemName = "chameleon rune", clientId = 3178, buy = 210 }, - { itemName = "convince creature rune", clientId = 3177, buy = 80 }, - { itemName = "cure poison rune", clientId = 3153, buy = 65 }, - { itemName = "destroy field rune", clientId = 3148, buy = 15 }, - { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 }, - { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 }, - { itemName = "empty potion flask", clientId = 283, sell = 5 }, - { itemName = "empty potion flask", clientId = 284, sell = 5 }, - { itemName = "empty potion flask", clientId = 285, sell = 5 }, - { itemName = "energy field rune", clientId = 3164, buy = 38 }, - { itemName = "energy wall rune", clientId = 3166, buy = 85 }, - { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 }, - { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 }, - { itemName = "explosion rune", clientId = 3200, buy = 31 }, - { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, - { itemName = "fire field rune", clientId = 3188, buy = 28 }, - { itemName = "fire wall rune", clientId = 3190, buy = 61 }, - { itemName = "great fireball rune", clientId = 3191, buy = 57 }, - { itemName = "great health potion", clientId = 239, buy = 225 }, - { itemName = "great mana potion", clientId = 238, buy = 144 }, - { itemName = "great spirit potion", clientId = 7642, buy = 228 }, - { itemName = "health potion", clientId = 266, buy = 50 }, - { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, - { itemName = "intense healing rune", clientId = 3152, buy = 95 }, - { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 }, - { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 }, - { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, - { itemName = "mana potion", clientId = 268, buy = 56 }, - { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, - { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, - { itemName = "poison field rune", clientId = 3172, buy = 21 }, - { itemName = "poison wall rune", clientId = 3176, buy = 52 }, - { itemName = "snakebite rod", clientId = 3066, buy = 500 }, - { itemName = "spellbook", clientId = 3059, buy = 150 }, - { itemName = "spellwand", clientId = 651, sell = 299 }, - { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, - { itemName = "strong health potion", clientId = 236, buy = 115 }, - { itemName = "strong mana potion", clientId = 237, buy = 93 }, - { itemName = "sudden death rune", clientId = 3155, buy = 135 }, - { itemName = "terra rod", clientId = 3065, buy = 10000 }, - { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, - { itemName = "ultimate health potion", clientId = 7643, buy = 379 }, - { itemName = "vial", clientId = 2874, sell = 5 }, - { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, - { itemName = "wand of decay", clientId = 3072, buy = 5000 }, - { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, - { itemName = "wand of vortex", clientId = 3074, buy = 500 }, -} -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) npc:sellItem(player, itemId, amount, subType, 0, ignore, inBackpacks) diff --git a/data-otservbr-global/npc/sigurd.lua b/data-otservbr-global/npc/sigurd.lua index 78b630963dd..0ac9eaea26a 100644 --- a/data-otservbr-global/npc/sigurd.lua +++ b/data-otservbr-global/npc/sigurd.lua @@ -18,6 +18,69 @@ npcConfig.flags = { floorchange = false, } +npcConfig.voices = { + interval = 15000, + chance = 50, + { text = "Hiho adventurers, get your runes, potions, wands and rods here!" }, +} + +local itemsTable = { + ["potions"] = { + { itemName = "empty potion flask", clientId = 283, sell = 5 }, + { itemName = "empty potion flask", clientId = 284, sell = 5 }, + { itemName = "empty potion flask", clientId = 285, sell = 5 }, + { itemName = "great health potion", clientId = 239, buy = 225 }, + { itemName = "great mana potion", clientId = 238, buy = 144 }, + { itemName = "great spirit potion", clientId = 7642, buy = 228 }, + { itemName = "health potion", clientId = 266, buy = 50 }, + { itemName = "mana potion", clientId = 268, buy = 56 }, + { itemName = "strong health potion", clientId = 236, buy = 115 }, + { itemName = "strong mana potion", clientId = 237, buy = 93 }, + { itemName = "ultimate health potion", clientId = 7643, buy = 379 }, + { itemName = "vial", clientId = 2874, sell = 5 }, + }, + ["runes"] = { + { itemName = "avalanche rune", clientId = 3161, buy = 57 }, + { itemName = "blank rune", clientId = 3147, buy = 10 }, + { itemName = "chameleon rune", clientId = 3178, buy = 210 }, + { itemName = "convince creature rune", clientId = 3177, buy = 80 }, + { itemName = "cure poison rune", clientId = 3153, buy = 65 }, + { itemName = "destroy field rune", clientId = 3148, buy = 15 }, + { itemName = "energy field rune", clientId = 3164, buy = 38 }, + { itemName = "energy wall rune", clientId = 3166, buy = 85 }, + { itemName = "explosion rune", clientId = 3200, buy = 31 }, + { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, + { itemName = "fire field rune", clientId = 3188, buy = 28 }, + { itemName = "fire wall rune", clientId = 3190, buy = 61 }, + { itemName = "great fireball rune", clientId = 3191, buy = 57 }, + { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, + { itemName = "intense healing rune", clientId = 3152, buy = 95 }, + { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, + { itemName = "poison field rune", clientId = 3172, buy = 21 }, + { itemName = "poison wall rune", clientId = 3176, buy = 52 }, + { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, + { itemName = "sudden death rune", clientId = 3155, buy = 135 }, + { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, + }, + ["wands"] = { + { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, + { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, + { itemName = "snakebite rod", clientId = 3066, buy = 500 }, + { itemName = "terra rod", clientId = 3065, buy = 10000 }, + { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, + { itemName = "wand of decay", clientId = 3072, buy = 5000 }, + { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, + { itemName = "wand of vortex", clientId = 3074, buy = 500 }, + }, +} + +npcConfig.shop = {} +for _, categoryTable in pairs(itemsTable) do + for _, itemTable in ipairs(categoryTable) do + table.insert(npcConfig.shop, itemTable) + end +end + local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) @@ -45,59 +108,39 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end +local function creatureSayCallback(npc, creature, type, message) + local player = Player(creature) + local playerId = player:getId() + + if not npcHandler:checkInteraction(npc, creature) then + return false + end + + local formattedCategoryNames = {} + for categoryName, _ in pairs(itemsTable) do + table.insert(formattedCategoryNames, "{" .. categoryName .. "}") + end + + local categoryTable = itemsTable[message:lower()] + + if categoryTable then + npcHandler:say("Of course, just browse through my wares.", npc, player) + npc:openShopWindowTable(player, categoryTable) + end + return true +end + +npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) +npcHandler:setMessage(MESSAGE_GREET, "Welcome to the magic store, |PLAYERNAME|! Ask me for a trade if you need something.") +npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye. Come back soon.") +npcHandler:setMessage(MESSAGE_WALKAWAY, "Good bye. Come back soon.") +npcHandler:setMessage( + MESSAGE_SENDTRADE, + "Of course, just browse through my wares. \z + Or do you want to look only at {potions}, {wands} or {runes}?" +) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -npcConfig.shop = { - { itemName = "avalanche rune", clientId = 3161, buy = 57 }, - { itemName = "blank rune", clientId = 3147, buy = 10 }, - { itemName = "chameleon rune", clientId = 3178, buy = 210 }, - { itemName = "convince creature rune", clientId = 3177, buy = 80 }, - { itemName = "cure poison rune", clientId = 3153, buy = 65 }, - { itemName = "destroy field rune", clientId = 3148, buy = 15 }, - { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 }, - { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 }, - { itemName = "empty potion flask", clientId = 283, sell = 5 }, - { itemName = "empty potion flask", clientId = 284, sell = 5 }, - { itemName = "empty potion flask", clientId = 285, sell = 5 }, - { itemName = "energy field rune", clientId = 3164, buy = 38 }, - { itemName = "energy wall rune", clientId = 3166, buy = 85 }, - { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 }, - { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 }, - { itemName = "explosion rune", clientId = 3200, buy = 31 }, - { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, - { itemName = "fire field rune", clientId = 3188, buy = 28 }, - { itemName = "fire wall rune", clientId = 3190, buy = 61 }, - { itemName = "great fireball rune", clientId = 3191, buy = 57 }, - { itemName = "great health potion", clientId = 239, buy = 225 }, - { itemName = "great mana potion", clientId = 238, buy = 144 }, - { itemName = "great spirit potion", clientId = 7642, buy = 228 }, - { itemName = "health potion", clientId = 266, buy = 50 }, - { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, - { itemName = "intense healing rune", clientId = 3152, buy = 95 }, - { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 }, - { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 }, - { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, - { itemName = "mana potion", clientId = 268, buy = 56 }, - { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, - { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, - { itemName = "poison field rune", clientId = 3172, buy = 21 }, - { itemName = "poison wall rune", clientId = 3176, buy = 52 }, - { itemName = "snakebite rod", clientId = 3066, buy = 500 }, - { itemName = "spellbook", clientId = 3059, buy = 150 }, - { itemName = "spellwand", clientId = 651, sell = 299 }, - { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, - { itemName = "strong health potion", clientId = 236, buy = 115 }, - { itemName = "strong mana potion", clientId = 237, buy = 93 }, - { itemName = "sudden death rune", clientId = 3155, buy = 135 }, - { itemName = "terra rod", clientId = 3065, buy = 10000 }, - { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, - { itemName = "ultimate health potion", clientId = 7643, buy = 379 }, - { itemName = "vial", clientId = 2874, sell = 5 }, - { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, - { itemName = "wand of decay", clientId = 3072, buy = 5000 }, - { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, - { itemName = "wand of vortex", clientId = 3074, buy = 500 }, -} -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) npc:sellItem(player, itemId, amount, subType, 0, ignore, inBackpacks) diff --git a/data-otservbr-global/npc/sundara.lua b/data-otservbr-global/npc/sundara.lua index b919dbca971..a4b973e0db8 100644 --- a/data-otservbr-global/npc/sundara.lua +++ b/data-otservbr-global/npc/sundara.lua @@ -23,6 +23,93 @@ npcConfig.flags = { floorchange = false, } +npcConfig.voices = { + interval = 15000, + chance = 50, + { text = "Health potions! Mana potions! Buy them here!" }, + { text = "All kinds of potions available here!" }, +} + +local itemsTable = { + ["potions"] = { + { itemName = "empty potion flask", clientId = 283, sell = 5 }, + { itemName = "empty potion flask", clientId = 284, sell = 5 }, + { itemName = "empty potion flask", clientId = 285, sell = 5 }, + { itemName = "great health potion", clientId = 239, buy = 225 }, + { itemName = "great mana potion", clientId = 238, buy = 144 }, + { itemName = "great spirit potion", clientId = 7642, buy = 228 }, + { itemName = "health potion", clientId = 266, buy = 50 }, + { itemName = "mana potion", clientId = 268, buy = 56 }, + { itemName = "strong health potion", clientId = 236, buy = 115 }, + { itemName = "strong mana potion", clientId = 237, buy = 93 }, + { itemName = "supreme health potion", clientId = 23375, buy = 625 }, + { itemName = "ultimate health potion", clientId = 7643, buy = 379 }, + { itemName = "ultimate mana potion", clientId = 23373, buy = 438 }, + { itemName = "ultimate spirit potion", clientId = 23374, buy = 438 }, + { itemName = "vial", clientId = 2874, sell = 5 }, + }, + ["runes"] = { + { itemName = "animate dead rune", clientId = 3203, buy = 375 }, + { itemName = "avalanche rune", clientId = 3161, buy = 57 }, + { itemName = "blank rune", clientId = 3147, buy = 10 }, + { itemName = "chameleon rune", clientId = 3178, buy = 210 }, + { itemName = "convince creature rune", clientId = 3177, buy = 80 }, + { itemName = "cure poison rune", clientId = 3153, buy = 65 }, + { itemName = "destroy field rune", clientId = 3148, buy = 15 }, + { itemName = "desintegrate rune", clientId = 3197, buy = 26 }, + { itemName = "energy field rune", clientId = 3164, buy = 38 }, + { itemName = "energy wall rune", clientId = 3166, buy = 85 }, + { itemName = "energy bomb rune", clientId = 3149, buy = 203 }, + { itemName = "explosion rune", clientId = 3200, buy = 31 }, + { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, + { itemName = "fire field rune", clientId = 3188, buy = 28 }, + { itemName = "fire wall rune", clientId = 3190, buy = 61 }, + { itemName = "fireball rune", clientId = 3189, buy = 30 }, + { itemName = "great fireball rune", clientId = 3191, buy = 57 }, + { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, + { itemName = "holy missile rune", clientId = 3182, buy = 16 }, + { itemName = "icicle rune", clientId = 3158, buy = 30 }, + { itemName = "intense healing rune", clientId = 3152, buy = 95 }, + { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, + { itemName = "magic wall rune", clientId = 3180, buy = 116 }, + { itemName = "paralyze rune", clientId = 3165, buy = 700 }, + { itemName = "poison bomb rune", clientId = 3173, buy = 85 }, + { itemName = "poison field rune", clientId = 3172, buy = 21 }, + { itemName = "poison wall rune", clientId = 3176, buy = 52 }, + { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, + { itemName = "stone shower rune", clientId = 3175, buy = 37 }, + { itemName = "sudden death rune", clientId = 3155, buy = 135 }, + { itemName = "thunderstorm rune", clientId = 3202, buy = 47 }, + { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, + { itemName = "wild growth rune", clientId = 3156, buy = 160 }, + }, + ["wands"] = { + { itemName = "hailstorm rod", clientId = 3067, buy = 15000 }, + { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, + { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, + { itemName = "northwind rod", clientId = 8083, buy = 7500 }, + { itemName = "snakebite rod", clientId = 3066, buy = 500 }, + { itemName = "springsprout rod", clientId = 8084, buy = 18000 }, + { itemName = "terra rod", clientId = 3065, buy = 10000 }, + { itemName = "underworld rod", clientId = 8082, buy = 22000 }, + { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, + { itemName = "wand of decay", clientId = 3072, buy = 5000 }, + { itemName = "wand of draconia", clientId = 8093, buy = 7500 }, + { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, + { itemName = "wand of inferno", clientId = 3071, buy = 15000 }, + { itemName = "wand of starstorm", clientId = 8092, buy = 18000 }, + { itemName = "wand of voodoo", clientId = 8094, buy = 22000 }, + { itemName = "wand of vortex", clientId = 3074, buy = 500 }, + }, +} + +npcConfig.shop = {} +for _, categoryTable in pairs(itemsTable) do + for _, itemTable in ipairs(categoryTable) do + table.insert(npcConfig.shop, itemTable) + end +end + local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) @@ -50,48 +137,36 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end +local function creatureSayCallback(npc, creature, type, message) + local player = Player(creature) + local playerId = player:getId() + + if not npcHandler:checkInteraction(npc, creature) then + return false + end + + local formattedCategoryNames = {} + for categoryName, _ in pairs(itemsTable) do + table.insert(formattedCategoryNames, "{" .. categoryName .. "}") + end + + local categoryTable = itemsTable[message:lower()] + + if categoryTable then + npcHandler:say("Of course, just browse through my wares.", npc, player) + npc:openShopWindowTable(player, categoryTable) + end + return true +end + +npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) +npcHandler:setMessage( + MESSAGE_SENDTRADE, + "Of course, just browse through my wares. \z + Or do you want to look only at {potions}, {wands} or {runes}?" +) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -npcConfig.shop = { - { itemName = "avalanche rune", clientId = 3161, buy = 57 }, - { itemName = "blank rune", clientId = 3147, buy = 10 }, - { itemName = "chameleon rune", clientId = 3178, buy = 210 }, - { itemName = "convince creature rune", clientId = 3177, buy = 80 }, - { itemName = "cure poison rune", clientId = 3153, buy = 65 }, - { itemName = "destroy field rune", clientId = 3148, buy = 15 }, - { itemName = "dragonfruit", clientId = 11682, buy = 5 }, - { itemName = "egg", clientId = 3606, buy = 3 }, - { itemName = "empty potion flask", clientId = 283, sell = 5 }, - { itemName = "empty potion flask", clientId = 284, sell = 5 }, - { itemName = "empty potion flask", clientId = 285, sell = 5 }, - { itemName = "energy field rune", clientId = 3164, buy = 38 }, - { itemName = "energy wall rune", clientId = 3166, buy = 85 }, - { itemName = "explosion rune", clientId = 3200, buy = 31 }, - { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, - { itemName = "fire field rune", clientId = 3188, buy = 28 }, - { itemName = "fire wall rune", clientId = 3190, buy = 61 }, - { itemName = "great fireball rune", clientId = 3191, buy = 57 }, - { itemName = "great health potion", clientId = 239, buy = 225 }, - { itemName = "great mana potion", clientId = 238, buy = 144 }, - { itemName = "great spirit potion", clientId = 7642, buy = 228 }, - { itemName = "health potion", clientId = 266, buy = 50 }, - { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, - { itemName = "intense healing rune", clientId = 3152, buy = 95 }, - { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, - { itemName = "mana potion", clientId = 268, buy = 56 }, - { itemName = "poison field rune", clientId = 3172, buy = 21 }, - { itemName = "poison wall rune", clientId = 3176, buy = 52 }, - { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, - { itemName = "strong health potion", clientId = 236, buy = 115 }, - { itemName = "strong mana potion", clientId = 237, buy = 93 }, - { itemName = "sudden death rune", clientId = 3155, buy = 135 }, - { itemName = "supreme health potion", clientId = 23375, buy = 625 }, - { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, - { itemName = "ultimate health potion", clientId = 7643, buy = 379 }, - { itemName = "ultimate mana potion", clientId = 23373, buy = 438 }, - { itemName = "ultimate spirit potion", clientId = 23374, buy = 438 }, - { itemName = "vial", clientId = 2874, sell = 5 }, -} -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) npc:sellItem(player, itemId, amount, subType, 0, ignore, inBackpacks) diff --git a/data-otservbr-global/npc/tandros.lua b/data-otservbr-global/npc/tandros.lua index efc5ee49a57..204a32e10b8 100644 --- a/data-otservbr-global/npc/tandros.lua +++ b/data-otservbr-global/npc/tandros.lua @@ -23,6 +23,80 @@ npcConfig.flags = { floorchange = false, } +npcConfig.voices = { + interval = 15000, + chance = 50, + { text = "Potions, wands and runes for aspiring magicians." }, +} + +local itemsTable = { + ["potions"] = { + { itemName = "empty potion flask", clientId = 283, sell = 5 }, + { itemName = "empty potion flask", clientId = 284, sell = 5 }, + { itemName = "empty potion flask", clientId = 285, sell = 5 }, + { itemName = "great health potion", clientId = 239, buy = 225 }, + { itemName = "great mana potion", clientId = 238, buy = 144 }, + { itemName = "great spirit potion", clientId = 7642, buy = 228 }, + { itemName = "health potion", clientId = 266, buy = 50 }, + { itemName = "mana potion", clientId = 268, buy = 56 }, + { itemName = "strong health potion", clientId = 236, buy = 115 }, + { itemName = "strong mana potion", clientId = 237, buy = 93 }, + { itemName = "supreme health potion", clientId = 23375, buy = 625 }, + { itemName = "ultimate health potion", clientId = 7643, buy = 379 }, + { itemName = "ultimate mana potion", clientId = 23373, buy = 438 }, + { itemName = "ultimate spirit potion", clientId = 23374, buy = 438 }, + { itemName = "vial", clientId = 2874, sell = 5 }, + }, + ["runes"] = { + { itemName = "avalanche rune", clientId = 3161, buy = 57 }, + { itemName = "blank rune", clientId = 3147, buy = 10 }, + { itemName = "chameleon rune", clientId = 3178, buy = 210 }, + { itemName = "convince creature rune", clientId = 3177, buy = 80 }, + { itemName = "cure poison rune", clientId = 3153, buy = 65 }, + { itemName = "destroy field rune", clientId = 3148, buy = 15 }, + { itemName = "energy field rune", clientId = 3164, buy = 38 }, + { itemName = "energy wall rune", clientId = 3166, buy = 85 }, + { itemName = "explosion rune", clientId = 3200, buy = 31 }, + { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, + { itemName = "fire field rune", clientId = 3188, buy = 28 }, + { itemName = "fire wall rune", clientId = 3190, buy = 61 }, + { itemName = "great fireball rune", clientId = 3191, buy = 57 }, + { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, + { itemName = "intense healing rune", clientId = 3152, buy = 95 }, + { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, + { itemName = "poison field rune", clientId = 3172, buy = 21 }, + { itemName = "poison wall rune", clientId = 3176, buy = 52 }, + { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, + { itemName = "sudden death rune", clientId = 3155, buy = 135 }, + { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, + }, + ["wands"] = { + { itemName = "hailstorm rod", clientId = 3067, buy = 15000 }, + { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, + { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, + { itemName = "northwind rod", clientId = 8083, buy = 7500 }, + { itemName = "snakebite rod", clientId = 3066, buy = 500 }, + { itemName = "springsprout rod", clientId = 8084, buy = 18000 }, + { itemName = "terra rod", clientId = 3065, buy = 10000 }, + { itemName = "underworld rod", clientId = 8082, buy = 22000 }, + { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, + { itemName = "wand of decay", clientId = 3072, buy = 5000 }, + { itemName = "wand of draconia", clientId = 8093, buy = 7500 }, + { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, + { itemName = "wand of inferno", clientId = 3071, buy = 15000 }, + { itemName = "wand of starstorm", clientId = 8092, buy = 18000 }, + { itemName = "wand of voodoo", clientId = 8094, buy = 22000 }, + { itemName = "wand of vortex", clientId = 3074, buy = 500 }, + }, +} + +npcConfig.shop = {} +for _, categoryTable in pairs(itemsTable) do + for _, itemTable in ipairs(categoryTable) do + table.insert(npcConfig.shop, itemTable) + end +end + local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) @@ -50,69 +124,36 @@ npcType.onCloseChannel = function(npc, creature) npcHandler:onCloseChannel(npc, creature) end +local function creatureSayCallback(npc, creature, type, message) + local player = Player(creature) + local playerId = player:getId() + + if not npcHandler:checkInteraction(npc, creature) then + return false + end + + local formattedCategoryNames = {} + for categoryName, _ in pairs(itemsTable) do + table.insert(formattedCategoryNames, "{" .. categoryName .. "}") + end + + local categoryTable = itemsTable[message:lower()] + + if categoryTable then + npcHandler:say("Of course, just browse through my wares.", npc, player) + npc:openShopWindowTable(player, categoryTable) + end + return true +end + +npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) +npcHandler:setMessage( + MESSAGE_SENDTRADE, + "Of course, just browse through my wares. \z + Or do you want to look only at {potions}, {wands} or {runes}?" +) npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -npcConfig.shop = { - { itemName = "avalanche rune", clientId = 3161, buy = 57 }, - { itemName = "blank rune", clientId = 3147, buy = 10 }, - { itemName = "chameleon rune", clientId = 3178, buy = 210 }, - { itemName = "convince creature rune", clientId = 3177, buy = 80 }, - { itemName = "cure poison rune", clientId = 3153, buy = 65 }, - { itemName = "destroy field rune", clientId = 3148, buy = 15 }, - { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 }, - { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 }, - { itemName = "empty potion flask", clientId = 283, sell = 5 }, - { itemName = "empty potion flask", clientId = 284, sell = 5 }, - { itemName = "empty potion flask", clientId = 285, sell = 5 }, - { itemName = "energy field rune", clientId = 3164, buy = 38 }, - { itemName = "energy wall rune", clientId = 3166, buy = 85 }, - { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 }, - { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 }, - { itemName = "explosion rune", clientId = 3200, buy = 31 }, - { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, - { itemName = "fire field rune", clientId = 3188, buy = 28 }, - { itemName = "fire wall rune", clientId = 3190, buy = 61 }, - { itemName = "great fireball rune", clientId = 3191, buy = 57 }, - { itemName = "great health potion", clientId = 239, buy = 225 }, - { itemName = "great mana potion", clientId = 238, buy = 144 }, - { itemName = "great spirit potion", clientId = 7642, buy = 228 }, - { itemName = "hailstorm rod", clientId = 3067, buy = 15000 }, - { itemName = "health potion", clientId = 266, buy = 50 }, - { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, - { itemName = "intense healing rune", clientId = 3152, buy = 95 }, - { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 }, - { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 }, - { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, - { itemName = "mana potion", clientId = 268, buy = 56 }, - { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, - { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, - { itemName = "northwind rod", clientId = 8083, buy = 7500 }, - { itemName = "poison field rune", clientId = 3172, buy = 21 }, - { itemName = "poison wall rune", clientId = 3176, buy = 52 }, - { itemName = "snakebite rod", clientId = 3066, buy = 500 }, - { itemName = "spellbook", clientId = 3059, buy = 150 }, - { itemName = "spellwand", clientId = 651, sell = 299 }, - { itemName = "springsprout rod", clientId = 8084, buy = 18000 }, - { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, - { itemName = "strong health potion", clientId = 236, buy = 115 }, - { itemName = "strong mana potion", clientId = 237, buy = 93 }, - { itemName = "sudden death rune", clientId = 3155, buy = 135 }, - { itemName = "supreme health potion", clientId = 23375, buy = 625 }, - { itemName = "terra rod", clientId = 3065, buy = 10000 }, - { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, - { itemName = "ultimate health potion", clientId = 7643, buy = 379 }, - { itemName = "ultimate mana potion", clientId = 23373, buy = 438 }, - { itemName = "ultimate spirit potion", clientId = 23374, buy = 438 }, - { itemName = "underworld rod", clientId = 8082, buy = 22000 }, - { itemName = "vial", clientId = 2874, sell = 5 }, - { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, - { itemName = "wand of decay", clientId = 3072, buy = 5000 }, - { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, - { itemName = "wand of inferno", clientId = 3071, buy = 15000 }, - { itemName = "wand of starstorm", clientId = 8092, buy = 18000 }, - { itemName = "wand of voodoo", clientId = 8094, buy = 22000 }, - { itemName = "wand of vortex", clientId = 3074, buy = 500 }, -} -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) npc:sellItem(player, itemId, amount, subType, 0, ignore, inBackpacks) diff --git a/data-otservbr-global/npc/topsy.lua b/data-otservbr-global/npc/topsy.lua index 06d4353dd66..751d1595c4b 100644 --- a/data-otservbr-global/npc/topsy.lua +++ b/data-otservbr-global/npc/topsy.lua @@ -29,6 +29,64 @@ npcConfig.voices = { { text = "Runes, wands, rods, health and mana potions! Have a look!" }, } +local itemsTable = { + ["potions"] = { + { itemName = "empty potion flask", clientId = 283, sell = 5 }, + { itemName = "empty potion flask", clientId = 284, sell = 5 }, + { itemName = "empty potion flask", clientId = 285, sell = 5 }, + { itemName = "great health potion", clientId = 239, buy = 225 }, + { itemName = "great mana potion", clientId = 238, buy = 144 }, + { itemName = "great spirit potion", clientId = 7642, buy = 228 }, + { itemName = "health potion", clientId = 266, buy = 50 }, + { itemName = "mana potion", clientId = 268, buy = 56 }, + { itemName = "strong health potion", clientId = 236, buy = 115 }, + { itemName = "strong mana potion", clientId = 237, buy = 93 }, + { itemName = "ultimate health potion", clientId = 7643, buy = 379 }, + { itemName = "vial", clientId = 2874, sell = 5 }, + }, + ["runes"] = { + { itemName = "avalanche rune", clientId = 3161, buy = 57 }, + { itemName = "blank rune", clientId = 3147, buy = 10 }, + { itemName = "chameleon rune", clientId = 3178, buy = 210 }, + { itemName = "convince creature rune", clientId = 3177, buy = 80 }, + { itemName = "cure poison rune", clientId = 3153, buy = 65 }, + { itemName = "destroy field rune", clientId = 3148, buy = 15 }, + { itemName = "energy field rune", clientId = 3164, buy = 38 }, + { itemName = "energy wall rune", clientId = 3166, buy = 85 }, + { itemName = "explosion rune", clientId = 3200, buy = 31 }, + { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, + { itemName = "fire field rune", clientId = 3188, buy = 28 }, + { itemName = "fire wall rune", clientId = 3190, buy = 61 }, + { itemName = "great fireball rune", clientId = 3191, buy = 57 }, + { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, + { itemName = "intense healing rune", clientId = 3152, buy = 95 }, + { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, + { itemName = "poison field rune", clientId = 3172, buy = 21 }, + { itemName = "poison wall rune", clientId = 3176, buy = 52 }, + { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, + { itemName = "sudden death rune", clientId = 3155, buy = 135 }, + { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, + }, + ["wands"] = { + { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, + { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, + { itemName = "snakebite rod", clientId = 3066, buy = 500 }, + { itemName = "springsprout rod", clientId = 8084, buy = 18000 }, + { itemName = "terra rod", clientId = 3065, buy = 10000 }, + { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, + { itemName = "wand of decay", clientId = 3072, buy = 5000 }, + { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, + { itemName = "wand of vortex", clientId = 3074, buy = 500 }, + }, +} + +npcConfig.shop = {} +for _, categoryTable in pairs(itemsTable) do + for _, itemTable in ipairs(categoryTable) do + table.insert(npcConfig.shop, itemTable) + end +end + local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) @@ -69,6 +127,12 @@ local function creatureSayCallback(npc, creature, type, message) return false end + local formattedCategoryNames = {} + for categoryName, _ in pairs(itemsTable) do + table.insert(formattedCategoryNames, "{" .. categoryName .. "}") + end + + local categoryTable = itemsTable[message:lower()] local itemId = items[player:getVocation():getBaseId()] if MsgContains(message, "first rod") or MsgContains(message, "first wand") then if player:isMage() then @@ -91,73 +155,28 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "no") and npcHandler:getTopic(playerId) == 1 then npcHandler:say("Ok then.", npc, creature) npcHandler:setTopic(playerId, 0) + elseif categoryTable then + npcHandler:say("Of course, just browse through my wares.", npc, player) + npc:openShopWindowTable(player, categoryTable) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) - npcHandler:setMessage( MESSAGE_GREET, "Hello, dear |PLAYERNAME|. How can I help you? \z - If you need magical equipment such as runes or wands, just ask me for a trade. " + If you need magical equipment such as {runes} or {wands}, just ask me for a {trade}." +) +npcHandler:setMessage( + MESSAGE_SENDTRADE, + "Of course, just browse through my wares. \z + Or do you want to look only at {potions}, {wands} or {runes}?" ) npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye, |PLAYERNAME|. Do come again!") npcHandler:setMessage(MESSAGE_WALKAWAY, "Good bye, |PLAYERNAME|. Do come again!") - npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -npcConfig.shop = { - { itemName = "avalanche rune", clientId = 3161, buy = 57 }, - { itemName = "blank rune", clientId = 3147, buy = 10 }, - { itemName = "chameleon rune", clientId = 3178, buy = 210 }, - { itemName = "convince creature rune", clientId = 3177, buy = 80 }, - { itemName = "cure poison rune", clientId = 3153, buy = 65 }, - { itemName = "destroy field rune", clientId = 3148, buy = 15 }, - { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 }, - { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 }, - { itemName = "empty potion flask", clientId = 283, sell = 5 }, - { itemName = "empty potion flask", clientId = 284, sell = 5 }, - { itemName = "empty potion flask", clientId = 285, sell = 5 }, - { itemName = "energy field rune", clientId = 3164, buy = 38 }, - { itemName = "energy wall rune", clientId = 3166, buy = 85 }, - { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 }, - { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 }, - { itemName = "explosion rune", clientId = 3200, buy = 31 }, - { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, - { itemName = "fire field rune", clientId = 3188, buy = 28 }, - { itemName = "fire wall rune", clientId = 3190, buy = 61 }, - { itemName = "great fireball rune", clientId = 3191, buy = 57 }, - { itemName = "great health potion", clientId = 239, buy = 225 }, - { itemName = "great mana potion", clientId = 238, buy = 144 }, - { itemName = "great spirit potion", clientId = 7642, buy = 228 }, - { itemName = "health potion", clientId = 266, buy = 50 }, - { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, - { itemName = "intense healing rune", clientId = 3152, buy = 95 }, - { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 }, - { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 }, - { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, - { itemName = "mana potion", clientId = 268, buy = 56 }, - { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, - { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, - { itemName = "poison field rune", clientId = 3172, buy = 21 }, - { itemName = "poison wall rune", clientId = 3176, buy = 52 }, - { itemName = "snakebite rod", clientId = 3066, buy = 500 }, - { itemName = "spellbook", clientId = 3059, buy = 150 }, - { itemName = "spellwand", clientId = 651, sell = 299 }, - { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, - { itemName = "strong health potion", clientId = 236, buy = 115 }, - { itemName = "strong mana potion", clientId = 237, buy = 93 }, - { itemName = "sudden death rune", clientId = 3155, buy = 135 }, - { itemName = "terra rod", clientId = 3065, buy = 10000 }, - { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, - { itemName = "ultimate health potion", clientId = 7643, buy = 379 }, - { itemName = "vial", clientId = 2874, sell = 5 }, - { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, - { itemName = "wand of decay", clientId = 3072, buy = 5000 }, - { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, - { itemName = "wand of vortex", clientId = 3074, buy = 500 }, -} -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) npc:sellItem(player, itemId, amount, subType, 0, ignore, inBackpacks) diff --git a/data-otservbr-global/npc/xodet.lua b/data-otservbr-global/npc/xodet.lua index 5ac76ecada8..f519a5ca2a4 100644 --- a/data-otservbr-global/npc/xodet.lua +++ b/data-otservbr-global/npc/xodet.lua @@ -23,6 +23,64 @@ npcConfig.flags = { floorchange = false, } +local itemsTable = { + ["potions"] = { + { itemName = "empty potion flask", clientId = 283, sell = 5 }, + { itemName = "empty potion flask", clientId = 284, sell = 5 }, + { itemName = "empty potion flask", clientId = 285, sell = 5 }, + { itemName = "great health potion", clientId = 239, buy = 225 }, + { itemName = "great mana potion", clientId = 238, buy = 144 }, + { itemName = "great spirit potion", clientId = 7642, buy = 228 }, + { itemName = "health potion", clientId = 266, buy = 50 }, + { itemName = "mana potion", clientId = 268, buy = 56 }, + { itemName = "strong health potion", clientId = 236, buy = 115 }, + { itemName = "strong mana potion", clientId = 237, buy = 93 }, + { itemName = "ultimate health potion", clientId = 7643, buy = 379 }, + { itemName = "vial", clientId = 2874, sell = 5 }, + }, + ["runes"] = { + { itemName = "avalanche rune", clientId = 3161, buy = 57 }, + { itemName = "blank rune", clientId = 3147, buy = 10 }, + { itemName = "chameleon rune", clientId = 3178, buy = 210 }, + { itemName = "convince creature rune", clientId = 3177, buy = 80 }, + { itemName = "cure poison rune", clientId = 3153, buy = 65 }, + { itemName = "destroy field rune", clientId = 3148, buy = 15 }, + { itemName = "energy field rune", clientId = 3164, buy = 38 }, + { itemName = "energy wall rune", clientId = 3166, buy = 85 }, + { itemName = "explosion rune", clientId = 3200, buy = 31 }, + { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, + { itemName = "fire field rune", clientId = 3188, buy = 28 }, + { itemName = "fire wall rune", clientId = 3190, buy = 61 }, + { itemName = "great fireball rune", clientId = 3191, buy = 57 }, + { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, + { itemName = "intense healing rune", clientId = 3152, buy = 95 }, + { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, + { itemName = "poison field rune", clientId = 3172, buy = 21 }, + { itemName = "poison wall rune", clientId = 3176, buy = 52 }, + { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, + { itemName = "sudden death rune", clientId = 3155, buy = 135 }, + { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, + }, + ["wands"] = { + { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, + { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, + { itemName = "snakebite rod", clientId = 3066, buy = 500 }, + { itemName = "springsprout rod", clientId = 8084, buy = 18000 }, + { itemName = "terra rod", clientId = 3065, buy = 10000 }, + { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, + { itemName = "wand of decay", clientId = 3072, buy = 5000 }, + { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, + { itemName = "wand of vortex", clientId = 3074, buy = 500 }, + }, +} + +npcConfig.shop = {} +for _, categoryTable in pairs(itemsTable) do + for _, itemTable in ipairs(categoryTable) do + table.insert(npcConfig.shop, itemTable) + end +end + local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) @@ -63,6 +121,12 @@ local function creatureSayCallback(npc, creature, type, message) return false end + local formattedCategoryNames = {} + for categoryName, _ in pairs(itemsTable) do + table.insert(formattedCategoryNames, "{" .. categoryName .. "}") + end + + local categoryTable = itemsTable[message:lower()] local itemId = items[player:getVocation():getBaseId()] if MsgContains(message, "first rod") or MsgContains(message, "first wand") then if player:isMage() then @@ -85,65 +149,28 @@ local function creatureSayCallback(npc, creature, type, message) elseif MsgContains(message, "no") and npcHandler:getTopic(playerId) == 1 then npcHandler:say("Ok then.", npc, creature) npcHandler:setTopic(playerId, 0) + elseif categoryTable then + npcHandler:say("Of course, just browse through my wares.", npc, player) + npc:openShopWindowTable(player, categoryTable) end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) - +npcHandler:setMessage( + MESSAGE_GREET, + "Oh, please come in, |PLAYERNAME| \z + If you need magical equipment such as {runes} or {wands}, just ask me for a {trade}." +) +npcHandler:setMessage( + MESSAGE_SENDTRADE, + "Of course, just browse through my wares. \z + Or do you want to look only at {potions}, {wands} or {runes}?" +) +npcHandler:setMessage(MESSAGE_FAREWELL, "Good bye and come again.") +npcHandler:setMessage(MESSAGE_WALKAWAY, "Good bye and come again.") npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -npcConfig.shop = { - { itemName = "avalanche rune", clientId = 3161, buy = 57 }, - { itemName = "blank rune", clientId = 3147, buy = 10 }, - { itemName = "chameleon rune", clientId = 3178, buy = 210 }, - { itemName = "convince creature rune", clientId = 3177, buy = 80 }, - { itemName = "cure poison rune", clientId = 3153, buy = 65 }, - { itemName = "destroy field rune", clientId = 3148, buy = 15 }, - { itemName = "durable exercise rod", clientId = 35283, buy = 945000, count = 1800 }, - { itemName = "durable exercise wand", clientId = 35284, buy = 945000, count = 1800 }, - { itemName = "empty potion flask", clientId = 283, sell = 5 }, - { itemName = "empty potion flask", clientId = 284, sell = 5 }, - { itemName = "empty potion flask", clientId = 285, sell = 5 }, - { itemName = "energy field rune", clientId = 3164, buy = 38 }, - { itemName = "energy wall rune", clientId = 3166, buy = 85 }, - { itemName = "exercise rod", clientId = 28556, buy = 262500, count = 500 }, - { itemName = "exercise wand", clientId = 28557, buy = 262500, count = 500 }, - { itemName = "explosion rune", clientId = 3200, buy = 31 }, - { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, - { itemName = "fire field rune", clientId = 3188, buy = 28 }, - { itemName = "fire wall rune", clientId = 3190, buy = 61 }, - { itemName = "great fireball rune", clientId = 3191, buy = 57 }, - { itemName = "great health potion", clientId = 239, buy = 225 }, - { itemName = "great mana potion", clientId = 238, buy = 144 }, - { itemName = "great spirit potion", clientId = 7642, buy = 228 }, - { itemName = "health potion", clientId = 266, buy = 50 }, - { itemName = "heavy magic missile rune", clientId = 3198, buy = 12 }, - { itemName = "intense healing rune", clientId = 3152, buy = 95 }, - { itemName = "lasting exercise rod", clientId = 35289, buy = 7560000, count = 14400 }, - { itemName = "lasting exercise wand", clientId = 35290, buy = 7560000, count = 14400 }, - { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, - { itemName = "mana potion", clientId = 268, buy = 56 }, - { itemName = "moonlight rod", clientId = 3070, buy = 1000 }, - { itemName = "necrotic rod", clientId = 3069, buy = 5000 }, - { itemName = "poison field rune", clientId = 3172, buy = 21 }, - { itemName = "poison wall rune", clientId = 3176, buy = 52 }, - { itemName = "snakebite rod", clientId = 3066, buy = 500 }, - { itemName = "spellbook", clientId = 3059, buy = 150 }, - { itemName = "spellwand", clientId = 651, sell = 299 }, - { itemName = "stalagmite rune", clientId = 3179, buy = 12 }, - { itemName = "strong health potion", clientId = 236, buy = 115 }, - { itemName = "strong mana potion", clientId = 237, buy = 93 }, - { itemName = "sudden death rune", clientId = 3155, buy = 135 }, - { itemName = "terra rod", clientId = 3065, buy = 10000 }, - { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, - { itemName = "ultimate health potion", clientId = 7643, buy = 379 }, - { itemName = "vial", clientId = 2874, sell = 5 }, - { itemName = "wand of cosmic energy", clientId = 3073, buy = 10000 }, - { itemName = "wand of decay", clientId = 3072, buy = 5000 }, - { itemName = "wand of dragonbreath", clientId = 3075, buy = 1000 }, - { itemName = "wand of vortex", clientId = 3074, buy = 500 }, -} -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) npc:sellItem(player, itemId, amount, subType, 0, ignore, inBackpacks) diff --git a/data/npclib/npc_system/npc_handler.lua b/data/npclib/npc_system/npc_handler.lua index 27b941366ee..d72dca40553 100644 --- a/data/npclib/npc_system/npc_handler.lua +++ b/data/npclib/npc_system/npc_handler.lua @@ -467,6 +467,7 @@ if NpcHandler == nil then -- If is npc shop, send shop window and parse default message (if not have callback on the npc) if npc:isMerchant() then + npc:closeShopWindow(player) npc:openShopWindow(player) self:say(msg, npc, player) end From 6fab2cdf643d8215ff9aaea215205101d4e981c1 Mon Sep 17 00:00:00 2001 From: Luan Luciano Date: Sat, 9 Dec 2023 16:55:21 -0300 Subject: [PATCH 05/28] improve: ajustment unrealized dream (#1967) Use stats from wiki for percentage based rolls: https://tibia.fandom.com/wiki/Unrealized_Dream/Statistics --- .../actions/other/unrealized_dream.lua | 102 ------------------ .../actions/valuables/random_items.lua | 27 +++++ 2 files changed, 27 insertions(+), 102 deletions(-) delete mode 100644 data-otservbr-global/scripts/actions/other/unrealized_dream.lua diff --git a/data-otservbr-global/scripts/actions/other/unrealized_dream.lua b/data-otservbr-global/scripts/actions/other/unrealized_dream.lua deleted file mode 100644 index 6b4f7398bef..00000000000 --- a/data-otservbr-global/scripts/actions/other/unrealized_dream.lua +++ /dev/null @@ -1,102 +0,0 @@ -local unrealizedDream = Action() - -function unrealizedDream.onUse(cid, item, frompos, item2, topos) - presente = math.random(1, 22) - pos = getPlayerPosition(cid) - - --surpriese bag-- - if presente == 1 then - doSendMagicEffect(pos, 26) - doPlayerAddItem(cid, 12548, 1) -- Bag of Apple Slices - doRemoveItem(item.uid, 1) - elseif presente == 2 then - doSendMagicEffect(pos, 26) - doPlayerAddItem(cid, 20275, 1) -- Dream Warden Claw - doRemoveItem(item.uid, 1) - elseif presente == 3 then - doSendMagicEffect(pos, 26) - doPlayerAddItem(cid, 3242, 1) -- Stuffed Bunny - doRemoveItem(item.uid, 1) - elseif presente == 4 then - doSendMagicEffect(pos, 26) - doPlayerAddItem(cid, 5929, 1) -- Goldfish Bowl - doRemoveItem(item.uid, 1) - elseif presente == 5 then - doSendMagicEffect(pos, 26) - doPlayerAddItem(cid, 5792, 1) -- Dice - doRemoveItem(item.uid, 1) - elseif presente == 6 then - doSendMagicEffect(pos, 26) - doPlayerAddItem(cid, 3577, 1) -- Meat - doRemoveItem(item.uid, 1) - elseif presente == 7 then - doSendMagicEffect(pos, 26) - doPlayerAddItem(cid, 3004, 1) -- Wedding Ring - doRemoveItem(item.uid, 1) - elseif presente == 8 then - doSendMagicEffect(pos, 26) - doPlayerAddItem(cid, 3463, 1) -- Mirror - doRemoveItem(item.uid, 1) - elseif presente == 9 then - doSendMagicEffect(pos, 26) - doPlayerAddItem(cid, 7459, 1) -- Pair of Earmuffs - doRemoveItem(item.uid, 1) - elseif presente == 10 then - doSendMagicEffect(pos, 26) - doPlayerAddItem(cid, 2992, 1) -- Snowball - doRemoveItem(item.uid, 1) - elseif presente == 11 then - doSendMagicEffect(pos, 26) - doPlayerAddItem(cid, 3108, 1) -- Rubbish - doRemoveItem(item.uid, 1) - elseif presente == 12 then - doSendMagicEffect(pos, 26) - doPlayerAddItem(cid, 2995, 1) -- Piggy Bank - doRemoveItem(item.uid, 1) - elseif presente == 13 then - doSendMagicEffect(pos, 26) - doPlayerAddItem(cid, 3568, 1) -- Simple Dress - doRemoveItem(item.uid, 1) - elseif presente == 14 then - doSendMagicEffect(pos, 26) - doPlayerAddItem(cid, 2856, 1) -- Present - doRemoveItem(item.uid, 1) - elseif presente == 15 then - doSendMagicEffect(pos, 26) - doPlayerAddItem(cid, 3659, 1) -- Blue Rose - doRemoveItem(item.uid, 1) - elseif presente == 16 then - doSendMagicEffect(pos, 26) - doPlayerAddItem(cid, 2950, 1) -- Lute - doRemoveItem(item.uid, 1) - elseif presente == 17 then - doSendMagicEffect(pos, 26) - doPlayerAddItem(cid, 20272, 1) -- Bronze Prison Key - doRemoveItem(item.uid, 1) - elseif presente == 18 then - doSendMagicEffect(pos, 26) - doPlayerAddItem(cid, 20270, 1) -- Silver Prison Key - doRemoveItem(item.uid, 1) - elseif presente == 19 then - doSendMagicEffect(pos, 26) - doPlayerAddItem(cid, 20273, 1) -- Golden Prison Key - doRemoveItem(item.uid, 1) - elseif presente == 20 then - doSendMagicEffect(pos, 26) - doPlayerAddItem(cid, 20062, 1) -- Cluster of Solace - doRemoveItem(item.uid, 1) - elseif presente == 21 then - doSendMagicEffect(pos, 26) - doPlayerAddItem(cid, 651, 1) -- Spellwand - doRemoveItem(item.uid, 1) - elseif presente == 22 then - doSendMagicEffect(pos, 26) - doPlayerAddItem(cid, 20271, 1) -- Copper Prision Key - doRemoveItem(item.uid, 1) - end - - return 1 -end - -unrealizedDream:id(20264) -unrealizedDream:register() diff --git a/data-otservbr-global/scripts/actions/valuables/random_items.lua b/data-otservbr-global/scripts/actions/valuables/random_items.lua index c012c549a44..f91dcf4f15a 100644 --- a/data-otservbr-global/scripts/actions/valuables/random_items.lua +++ b/data-otservbr-global/scripts/actions/valuables/random_items.lua @@ -76,6 +76,33 @@ local config = { }, effect = CONST_ME_CRAPS, }, + [20264] = { -- unrealized dream + chances = { + { from = 1, to = 1081, itemId = 3108 }, -- Rubbish (10.81%) + { from = 1082, to = 2125, itemId = 2992 }, -- Snowball (10.44%) + { from = 2126, to = 3109, itemId = 5792 }, -- Die (9.83%) + { from = 3110, to = 4074, itemId = 2856 }, -- Present (9.64%) + { from = 4075, to = 5039, itemId = 3659 }, -- Blue Rose (9.64%) + { from = 5040, to = 6007, itemId = 3568 }, -- Simple Dress (9.67%) + { from = 6008, to = 6969, itemId = 3463 }, -- Mirror (9.61%) + { from = 6970, to = 7457, itemId = 2995 }, -- Piggy Bank (4.87%) + { from = 7458, to = 7945, itemId = 2950 }, -- Lute (4.87%) + { from = 7946, to = 8268, itemId = 651 }, -- Spellwand (4.22%) + { from = 8269, to = 8659, itemId = 5929 }, -- Goldfish Bowl (3.90%) + { from = 8660, to = 8984, itemId = 3577 }, -- Meat (3.24%) + { from = 8985, to = 9192, itemId = 20271 }, -- Copper Prision Key (2.07%) + { from = 9193, to = 9396, itemId = 20272 }, -- Bronze Prison Key (2.03%) + { from = 9397, to = 9588, itemId = 20270 }, -- Silver Prison Key (1.91%) + { from = 9589, to = 9719, itemId = 20062 }, -- Cluster of Solace (1.30%) + { from = 9720, to = 9780, itemId = 3004 }, -- Wedding Ring (0.60%) + { from = 9781, to = 9842, itemId = 7459 }, -- Pair of Earmuffs (0.61%) + { from = 9843, to = 9894, itemId = 20275 }, -- Dream Warden Claw (0.51%) + { from = 9895, to = 9946, itemId = 20273 }, -- Golden Prison Key (0.51%) + { from = 9947, to = 9987, itemId = 3242 }, -- Stuffed Bunny (0.40%) + { from = 9988, to = 10001, itemId = 12548 }, -- Bag of Apple Slices (0.13%) + }, + effect = CONST_ME_BUBBLES, + }, [22763] = { -- shaggy ogre bag chances = { { from = 1, to = 1440, itemId = 22187, count = 5 }, From 56f4fb2c24420727dc2e11445f0271aa44eb6280 Mon Sep 17 00:00:00 2001 From: Luan Luciano Date: Sat, 9 Dec 2023 17:01:41 -0300 Subject: [PATCH 06/28] fix: remove constraint 'guildwar_kills_unique' from 'guildwar_kills' table (#1968) The "warid" column from the "guildwar_kills" table cannot be UNIQUE, because when a player from the war dies (warid) we add another entry with the same warid. ![image](https://github.com/opentibiabr/canary/assets/6209529/fe9fd7e7-2649-4ea8-a12d-4f1f7c2d4247) ```sql ALTER TABLE `guildwar_kills` DROP INDEX `guildwar_kills_unique`; ``` --- data-otservbr-global/migrations/42.lua | 9 ++++++++- data-otservbr-global/migrations/43.lua | 3 +++ schema.sql | 3 +-- 3 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 data-otservbr-global/migrations/43.lua diff --git a/data-otservbr-global/migrations/42.lua b/data-otservbr-global/migrations/42.lua index 86a6d8ffec1..4d07b663daa 100644 --- a/data-otservbr-global/migrations/42.lua +++ b/data-otservbr-global/migrations/42.lua @@ -1,3 +1,10 @@ function onUpdateDatabase() - return false -- true = There are others migrations file | false = this is the last migration file + logger.info("Updating database to version 43 (fix guildwar_kills_unique)") + + db.query([[ + ALTER TABLE `guildwar_kills` + DROP INDEX `guildwar_kills_unique` + ]]) + + return true end diff --git a/data-otservbr-global/migrations/43.lua b/data-otservbr-global/migrations/43.lua new file mode 100644 index 00000000000..86a6d8ffec1 --- /dev/null +++ b/data-otservbr-global/migrations/43.lua @@ -0,0 +1,3 @@ +function onUpdateDatabase() + return false -- true = There are others migrations file | false = this is the last migration file +end diff --git a/schema.sql b/schema.sql index 3ba4e35effc..756339fd9d6 100644 --- a/schema.sql +++ b/schema.sql @@ -7,7 +7,7 @@ CREATE TABLE IF NOT EXISTS `server_config` ( CONSTRAINT `server_config_pk` PRIMARY KEY (`config`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -INSERT INTO `server_config` (`config`, `value`) VALUES ('db_version', '41'), ('motd_hash', ''), ('motd_num', '0'), ('players_record', '0'); +INSERT INTO `server_config` (`config`, `value`) VALUES ('db_version', '43'), ('motd_hash', ''), ('motd_num', '0'), ('players_record', '0'); -- Table structure `accounts` CREATE TABLE IF NOT EXISTS `accounts` ( @@ -331,7 +331,6 @@ CREATE TABLE IF NOT EXISTS `guildwar_kills` ( `time` bigint(15) NOT NULL, INDEX `warid` (`warid`), CONSTRAINT `guildwar_kills_pk` PRIMARY KEY (`id`), - CONSTRAINT `guildwar_kills_unique` UNIQUE (`warid`), CONSTRAINT `guildwar_kills_warid_fk` FOREIGN KEY (`warid`) REFERENCES `guild_wars` (`id`) ON DELETE CASCADE From ec2b32ee8de1061bd09bad7af21c03908f1c08a7 Mon Sep 17 00:00:00 2001 From: Elson Costa Date: Sat, 9 Dec 2023 17:26:50 -0300 Subject: [PATCH 07/28] fix: adjusts from other pr (#1970) - changed return 'false' to 'true' in talkaction (when return is true, the command isn't showed in chat). - adjusted '/listplayers' command. - fixed ids from 'Darkfire Devourer' and 'Spirit of Purity' mounts. --- data-otservbr-global/monster/raids/fernfang.lua | 2 +- .../ferumbras_ascendant/rift_invader_death.lua | 9 +++------ data/modules/scripts/gamestore/gamestore.lua | 4 ++-- .../talkactions/gm/teleport_to_active_player.lua | 4 ++-- data/scripts/talkactions/gm/teleport_to_player.lua | 9 +++++---- data/scripts/talkactions/god/add_addon.lua | 8 ++++---- data/scripts/talkactions/god/add_bosstiary_kills.lua | 4 ++-- data/scripts/talkactions/god/add_money.lua | 6 +++--- data/scripts/talkactions/god/goto_house.lua | 2 +- data/scripts/talkactions/god/inbox_command.lua | 2 +- data/scripts/talkactions/god/zones.lua | 12 ++++++------ data/scripts/talkactions/player/buy_house.lua | 2 +- .../player/hidden_npc_sell_shop_items.lua | 2 +- data/scripts/talkactions/player/leave_house.lua | 2 +- src/canary_server.cpp | 2 +- src/io/iologindata.cpp | 2 +- 16 files changed, 35 insertions(+), 37 deletions(-) diff --git a/data-otservbr-global/monster/raids/fernfang.lua b/data-otservbr-global/monster/raids/fernfang.lua index 70e03ff04fb..f33b998345c 100644 --- a/data-otservbr-global/monster/raids/fernfang.lua +++ b/data-otservbr-global/monster/raids/fernfang.lua @@ -66,7 +66,7 @@ monster.summon = { monster.voices = { interval = 5000, chance = 10, - { text = "You desacrated this place!", yell = false }, + { text = "You desecrated this place!", yell = false }, { text = "Yoooohuuuu!", yell = false }, { text = "I will cleanse this isle!", yell = false }, { text = "Grrrrrrr", yell = false }, diff --git a/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/rift_invader_death.lua b/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/rift_invader_death.lua index ae000aaf097..a3d049f4581 100644 --- a/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/rift_invader_death.lua +++ b/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/rift_invader_death.lua @@ -48,12 +48,9 @@ function riftInvaderDeath.onDeath(creature, corpse, lasthitkiller, mostdamagekil end end - local tilePool = Tile(creature:getPosition()) - if tilePool then - local pool = tilePool:getItemById(2886) - if pool then - pool:remove() - end + local pool = Tile(creature:getPosition()):getItemById(2886) + if pool then + pool:remove() end local vortex = Game.createItem(config.vortex, 1, creature:getPosition()) diff --git a/data/modules/scripts/gamestore/gamestore.lua b/data/modules/scripts/gamestore/gamestore.lua index 712660e4820..afaffcb0b6a 100644 --- a/data/modules/scripts/gamestore/gamestore.lua +++ b/data/modules/scripts/gamestore/gamestore.lua @@ -1320,7 +1320,7 @@ GameStore.Categories = { icons = { "Darkfire_Devourer.png" }, name = "Darkfire Devourer", price = 1300, - id = 213, + id = 216, description = "{character}\n{speedboost}\n\nA wild, ancient creature, which had been hiding in the depths of the shadows for a very long time, has been spotted in Tibia again! The almighty Shadow Draptor has returned and only the bravest Tibians can control such a beast!", type = GameStore.OfferTypes.OFFER_TYPE_MOUNT, }, @@ -2092,7 +2092,7 @@ GameStore.Categories = { icons = { "Spirit_of_Purity.png" }, name = "Spirit of Purity", price = 1000, - id = 215, + id = 217, description = "{character}\n{speedboost}\n\nA wild, ancient creature, which had been hiding in the depths of the shadows for a very long time, has been spotted in Tibia again! The almighty Shadow Draptor has returned and only the bravest Tibians can control such a beast!", type = GameStore.OfferTypes.OFFER_TYPE_MOUNT, }, diff --git a/data/scripts/talkactions/gm/teleport_to_active_player.lua b/data/scripts/talkactions/gm/teleport_to_active_player.lua index abb71116a37..028c14c4610 100644 --- a/data/scripts/talkactions/gm/teleport_to_active_player.lua +++ b/data/scripts/talkactions/gm/teleport_to_active_player.lua @@ -19,12 +19,12 @@ function teleportToCreature.onSay(player, words, param) if #activePlayers == 0 then player:sendCancelMessage("There are no active players.") - return false + return true end local targetPlayer = activePlayers[math.random(#activePlayers)] player:teleportTo(targetPlayer:getPosition()) - return false + return true end teleportToCreature:separator(" ") diff --git a/data/scripts/talkactions/gm/teleport_to_player.lua b/data/scripts/talkactions/gm/teleport_to_player.lua index 04bcdf0dc91..1a59a0ffd12 100644 --- a/data/scripts/talkactions/gm/teleport_to_player.lua +++ b/data/scripts/talkactions/gm/teleport_to_player.lua @@ -4,7 +4,7 @@ function teleportToCreature.onSay(player, words, param) -- create log logCommand(player, words, param) - local onlyActive = param == "active" and true or false + local showAll = param == "all" and true or false local players = Game.getPlayers() local playerList = {} @@ -14,13 +14,14 @@ function teleportToCreature.onSay(player, words, param) goto continue end - if not onlyActive then + if showAll then table.insert(playerList, targetPlayer) else local isGhost = targetPlayer:isInGhostMode() local isTraining = _G.OnExerciseTraining[targetPlayer:getId()] local isIdle = targetPlayer:getIdleTime() >= 5 * 60 * 1000 - local isActive = not isGhost and not isTraining and not isIdle + local isInTrainingRoom = isInRange(targetPlayer:getPosition(), Position(1015, 1109, 7), Position(1094, 1738, 7)) + local isActive = not isGhost and not isTraining and not isIdle and not isInTrainingRoom if isActive then table.insert(playerList, targetPlayer) end @@ -30,7 +31,7 @@ function teleportToCreature.onSay(player, words, param) if #playerList == 0 then player:sendCancelMessage("There are no active players.") - return false + return true end local window = ModalWindow({ diff --git a/data/scripts/talkactions/god/add_addon.lua b/data/scripts/talkactions/god/add_addon.lua index c9f7003ee77..026336e270e 100644 --- a/data/scripts/talkactions/god/add_addon.lua +++ b/data/scripts/talkactions/god/add_addon.lua @@ -20,24 +20,24 @@ function addons.onSay(player, words, param) if not target then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Player " .. name .. " is currently not online.") - return false + return true end local looktype = tonumber(split[2]) if not looktype then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Invalid looktype.") - return false + return true end local addons = tonumber(split[3]) if not addons or addons < 0 or addons > 3 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Invalid addon.") - return false + return true end target:addOutfitAddon(looktype, addons) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Addon for looktype " .. looktype .. "a for " .. target:getName() .. " set to " .. addons .. ".") - return false + return true end addons:separator(" ") diff --git a/data/scripts/talkactions/god/add_bosstiary_kills.lua b/data/scripts/talkactions/god/add_bosstiary_kills.lua index 583b02fa8fe..4e5aecdfbd4 100644 --- a/data/scripts/talkactions/god/add_bosstiary_kills.lua +++ b/data/scripts/talkactions/god/add_bosstiary_kills.lua @@ -13,13 +13,13 @@ function talkaction.onSay(player, words, param) if not kills or kills < 1 then player:sendCancelMessage("Invalid kill count.") - return false + return true end local target = targetName ~= "" and Player(targetName) or player if not target then player:sendCancelMessage("Target player not found.") - return false + return true end local message = "Added received kills: " .. kills .. ", for boss: " .. monsterName diff --git a/data/scripts/talkactions/god/add_money.lua b/data/scripts/talkactions/god/add_money.lua index 57670abd90e..fa37aa9a8b9 100644 --- a/data/scripts/talkactions/god/add_money.lua +++ b/data/scripts/talkactions/god/add_money.lua @@ -20,7 +20,7 @@ function addMoney.onSay(player, words, param) local normalizedName = Game.getNormalizedPlayerName(name) if not normalizedName then player:sendCancelMessage("A player with name " .. name .. " does not exist.") - return false + return true end name = normalizedName @@ -32,14 +32,14 @@ function addMoney.onSay(player, words, param) -- Check if the coins is valid if amount <= 0 or amount == nil then player:sendCancelMessage("Invalid amount.") - return false + return true end if not Bank.credit(name, amount) then player:sendCancelMessage("Failed to add money to " .. name .. ".") -- Distro log logger.error("[addMoney.onSay] - Failed to add money to player") - return false + return true end player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Successfull added " .. amount .. " gold coins to " .. name .. ".") diff --git a/data/scripts/talkactions/god/goto_house.lua b/data/scripts/talkactions/god/goto_house.lua index 407649c8329..503ebd65a34 100644 --- a/data/scripts/talkactions/god/goto_house.lua +++ b/data/scripts/talkactions/god/goto_house.lua @@ -20,7 +20,7 @@ function sellHouse.onSay(player, words, param) player:teleportTo(house:getExitPosition()) end - return false + return true end sellHouse:separator(" ") diff --git a/data/scripts/talkactions/god/inbox_command.lua b/data/scripts/talkactions/god/inbox_command.lua index 59d7dbec3a8..b9834aa2384 100644 --- a/data/scripts/talkactions/god/inbox_command.lua +++ b/data/scripts/talkactions/god/inbox_command.lua @@ -28,7 +28,7 @@ function inboxCommand.onSay(player, words, param) player:sendCancelMessage("Creature not found.") end - return false + return true end inboxCommand:separator(" ") diff --git a/data/scripts/talkactions/god/zones.lua b/data/scripts/talkactions/god/zones.lua index 75f70af6507..fd2530c6ff8 100644 --- a/data/scripts/talkactions/god/zones.lua +++ b/data/scripts/talkactions/god/zones.lua @@ -5,7 +5,7 @@ function zones.onSay(player, words, param) local cmd = params[1] if not cmd then player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Command not found.") - return false + return true end if cmd == "list" then @@ -21,12 +21,12 @@ function zones.onSay(player, words, param) local zoneName = params[2]:trim() if not zoneName then player:sendTextMessage(MESSAGE_HEALED, "Zone not found.") - return false + return true end local zone = Zone.getByName(zoneName) if not zone then player:sendTextMessage(MESSAGE_HEALED, "Zone not found.") - return false + return true end return zone end @@ -36,7 +36,7 @@ function zones.onSay(player, words, param) local pos = zone:randomPosition() if not pos then player:sendTextMessage(MESSAGE_HEALED, "No position found.") - return false + return true end player:teleportTo(pos) player:sendTextMessage(MESSAGE_HEALED, "You have been teleported to " .. zone:getName() .. ".") @@ -82,11 +82,11 @@ function zones.onSay(player, words, param) local command = commands[cmd] if not command then player:sendTextMessage(MESSAGE_HEALED, "Command not found.") - return false + return true end local zone = zoneFromParam() if not zone then - return false + return true end return command(zone) end diff --git a/data/scripts/talkactions/player/buy_house.lua b/data/scripts/talkactions/player/buy_house.lua index ee0ce8da5ee..1d50956e71b 100644 --- a/data/scripts/talkactions/player/buy_house.lua +++ b/data/scripts/talkactions/player/buy_house.lua @@ -42,7 +42,7 @@ function buyHouse.onSay(player, words, param) if house:hasItemOnTile() then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You cannot buy this house, as there are items inside it. Please, contact an administrator.") - return false + return true end local price = house:getPrice() diff --git a/data/scripts/talkactions/player/hidden_npc_sell_shop_items.lua b/data/scripts/talkactions/player/hidden_npc_sell_shop_items.lua index 6812de99e47..1d7e3b2106d 100644 --- a/data/scripts/talkactions/player/hidden_npc_sell_shop_items.lua +++ b/data/scripts/talkactions/player/hidden_npc_sell_shop_items.lua @@ -10,7 +10,7 @@ function talkaction.onSay(player, words, param) player:sendTextMessage(MESSAGE_LOOK, "You activated hidden sell shop items.") elseif param == "off" then player:kv():set("npc-shop-hidden-sell-item", false) - player:sendTextMessage(MESSAGE_LOOK, "You desactivated hidden sell shop items") + player:sendTextMessage(MESSAGE_LOOK, "You deactivated hidden sell shop items") end return true end diff --git a/data/scripts/talkactions/player/leave_house.lua b/data/scripts/talkactions/player/leave_house.lua index 8743ed17a23..20ad186f2d2 100644 --- a/data/scripts/talkactions/player/leave_house.lua +++ b/data/scripts/talkactions/player/leave_house.lua @@ -19,7 +19,7 @@ function leaveHouse.onSay(player, words, param) if house:hasNewOwnership() then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You cannot leave this house. Ownership is already scheduled to be transferred upon the next server restart.") playerPosition:sendMagicEffect(CONST_ME_POFF) - return false + return true end -- Move hireling back to lamp diff --git a/src/canary_server.cpp b/src/canary_server.cpp index 25439532b8c..f60e0ab42f5 100644 --- a/src/canary_server.cpp +++ b/src/canary_server.cpp @@ -218,7 +218,7 @@ void CanaryServer::logInfos() { /** *It is preferable to keep the close button off as it closes the server without saving (this can cause the player to lose items from houses and others informations, since windows automatically closes the process in five seconds, when forcing the close) * Choose to use "CTROL + C" or "CTROL + BREAK" for security close - * To activate/desactivate window; + * To activate/deactivate window; * \param MF_GRAYED Disable the "x" (force close) button * \param MF_ENABLED Enable the "x" (force close) button */ diff --git a/src/io/iologindata.cpp b/src/io/iologindata.cpp index 8531ff0860f..3ca34026db2 100644 --- a/src/io/iologindata.cpp +++ b/src/io/iologindata.cpp @@ -86,7 +86,7 @@ void IOLoginData::updateOnlineStatus(uint32_t guid, bool login) { Database::getInstance().executeQuery(query.str()); } -// The boolean "disableIrrelevantInfo" will desactivate the loading of information that is not relevant to the preload, for example, forge, bosstiary, etc. None of this we need to access if the player is offline +// The boolean "disableIrrelevantInfo" will deactivate the loading of information that is not relevant to the preload, for example, forge, bosstiary, etc. None of this we need to access if the player is offline bool IOLoginData::loadPlayerById(std::shared_ptr player, uint32_t id, bool disableIrrelevantInfo /* = true*/) { Database &db = Database::getInstance(); std::ostringstream query; From 13ec0f24bd37d5969d2ec7d8331500e8bf3ea4c0 Mon Sep 17 00:00:00 2001 From: Luan Luciano Date: Sat, 9 Dec 2023 17:31:12 -0300 Subject: [PATCH 08/28] feat: boss mechanics Anomaly (#1983) --- data-otservbr-global/lib/core/storages.lua | 4 + .../heart_of_destruction/anomaly_lever.lua | 162 ++++-------------- .../anomaly_transform.lua | 52 +++--- .../charged_anomaly_death.lua | 23 ++- .../heart_of_destruction/vortex_anomaly.lua | 9 +- .../scripts/spells/monster/charge_vortex.lua | 51 ++---- 6 files changed, 104 insertions(+), 197 deletions(-) diff --git a/data-otservbr-global/lib/core/storages.lua b/data-otservbr-global/lib/core/storages.lua index 93e2bf9364d..34928957379 100644 --- a/data-otservbr-global/lib/core/storages.lua +++ b/data-otservbr-global/lib/core/storages.lua @@ -3069,6 +3069,10 @@ GlobalStorage = { TotalUsurperCommanders = 60171, -- Global }, }, + HeartOfDestruction = { + -- Reserved storage from 60172 - 60177 + ChargedAnomaly = 60172, + }, FuryGates = 65000, Yakchal = 65001, PitsOfInfernoLevers = 65002, diff --git a/data-otservbr-global/scripts/actions/quests/heart_of_destruction/anomaly_lever.lua b/data-otservbr-global/scripts/actions/quests/heart_of_destruction/anomaly_lever.lua index e99e126c824..3cac20d9624 100644 --- a/data-otservbr-global/scripts/actions/quests/heart_of_destruction/anomaly_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/heart_of_destruction/anomaly_lever.lua @@ -1,129 +1,39 @@ --- FUNCTIONS -local function doCheckArea() - local upConer = { x = 32258, y = 31237, z = 14 } -- upLeftCorner - local downConer = { x = 32284, y = 31262, z = 14 } -- downRightCorner - - for i = upConer.x, downConer.x do - for j = upConer.y, downConer.y do - for k = upConer.z, downConer.z do - local room = { x = i, y = j, z = k } - local tile = Tile(room) - if tile then - local creatures = tile:getCreatures() - if creatures and #creatures > 0 then - for _, creature in pairs(creatures) do - local player = Player(creature) - if player then - return true - end - end - end - end - end - end - end - return false -end - -local function clearArea() - local upConer = { x = 32258, y = 31237, z = 14 } -- upLeftCorner - local downConer = { x = 32284, y = 31262, z = 14 } -- downRightCorner - - for i = upConer.x, downConer.x do - for j = upConer.y, downConer.y do - for k = upConer.z, downConer.z do - local room = { x = i, y = j, z = k } - local tile = Tile(room) - if tile then - local creatures = tile:getCreatures() - if creatures and #creatures > 0 then - for _, creatureUid in pairs(creatures) do - local creature = Creature(creatureUid) - if creature then - if creature:isPlayer() then - creature:teleportTo({ x = 32104, y = 31329, z = 12 }) - elseif creature:isMonster() then - creature:remove() - end - end - end - end - end - end - end - end -end --- FUNCTIONS END - -local heartDestructionAnomaly = Action() -function heartDestructionAnomaly.onUse(player, item, fromPosition, itemEx, toPosition) - local config = { - playerPositions = { - Position(32245, 31245, 14), - Position(32245, 31246, 14), - Position(32245, 31247, 14), - Position(32245, 31248, 14), - Position(32245, 31249, 14), - }, - - newPos = { x = 32271, y = 31257, z = 14 }, - } - - local pushPos = { x = 32245, y = 31245, z = 14 } - - if item.actionid == 14325 then - if item.itemid == 8911 then - if player:getPosition().x == pushPos.x and player:getPosition().y == pushPos.y and player:getPosition().z == pushPos.z then - local storePlayers = {} - for i = 1, #config.playerPositions do - local tile = Tile(Position(config.playerPositions[i])) - if tile then - local playerTile = tile:getTopCreature() - if playerTile and playerTile:isPlayer() then - storePlayers[#storePlayers + 1] = playerTile - end - end - end - - if doCheckArea() == false then - clearArea() - - local players - - for i = 1, #storePlayers do - players = storePlayers[i] - config.playerPositions[i]:sendMagicEffect(CONST_ME_POFF) - players:teleportTo(config.newPos) - players:setBossCooldown("Anomaly", os.time() + configManager.getNumber(configKeys.BOSS_DEFAULT_TIME_TO_FIGHT_AGAIN)) - end - Position(config.newPos):sendMagicEffect(11) - - areaAnomaly1 = addEvent(clearArea, 15 * 60000) - - Game.setStorageValue(14322, 0) -- Anomaly Stages - - Game.createMonster("Spark of Destruction", { x = 32267, y = 31253, z = 14 }, false, true) - Game.createMonster("Spark of Destruction", { x = 32274, y = 31255, z = 14 }, false, true) - Game.createMonster("Spark of Destruction", { x = 32274, y = 31249, z = 14 }, false, true) - Game.createMonster("Spark of Destruction", { x = 32267, y = 31249, z = 14 }, false, true) - Game.createMonster("Anomaly", { x = 32271, y = 31249, z = 14 }, false, true) - - local vortex = Tile({ x = 32261, y = 31250, z = 14 }):getItemById(23482) - if vortex then - vortex:transform(23483) - vortex:setActionId(14324) - end - else - player:sendTextMessage(19, "Someone is in the area.") - end - else - return true +local config = { + boss = { + name = "Anomaly", + position = Position(32271, 31249, 14), + }, + playerPositions = { + { pos = Position(32245, 31245, 14), teleport = Position(32271, 31257, 14), effect = CONST_ME_TELEPORT }, + { pos = Position(32245, 31246, 14), teleport = Position(32271, 31257, 14), effect = CONST_ME_TELEPORT }, + { pos = Position(32245, 31247, 14), teleport = Position(32271, 31257, 14), effect = CONST_ME_TELEPORT }, + { pos = Position(32245, 31248, 14), teleport = Position(32271, 31257, 14), effect = CONST_ME_TELEPORT }, + { pos = Position(32245, 31249, 14), teleport = Position(32271, 31257, 14), effect = CONST_ME_TELEPORT }, + }, + specPos = { + from = Position(32258, 31237, 14), + to = Position(32284, 31262, 14), + }, + monsters = { + { name = "Spark of Destruction", pos = Position(32267, 31253, 14) }, + { name = "Spark of Destruction", pos = Position(32274, 31255, 14) }, + { name = "Spark of Destruction", pos = Position(32274, 31249, 14) }, + { name = "Spark of Destruction", pos = Position(32267, 31249, 14) }, + }, + onUseExtra = function() + Game.setStorageValue(GlobalStorage.HeartOfDestruction.ChargedAnomaly, 0) + local tile = Tile(Position(32261, 31250, 14)) + if tile then + local vortex = tile:getItemById(23482) + if vortex then + vortex:transform(23483) + vortex:setActionId(14324) end end - item:transform(item.itemid == 8911 and 8912 or 8911) - end - return true -end + end, + exit = Position(32182, 31250, 14), +} -heartDestructionAnomaly:aid(14325) -heartDestructionAnomaly:register() +local lever = BossLever(config) +lever:aid(14325) +lever:register() diff --git a/data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/anomaly_transform.lua b/data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/anomaly_transform.lua index 1e4b5852d9d..cc0b32fa35a 100644 --- a/data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/anomaly_transform.lua +++ b/data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/anomaly_transform.lua @@ -1,42 +1,34 @@ +local function createSpawnAnomalyRoom(valueGlobalStorage) + Game.createMonster("Spark of Destruction", Position(32267, 31253, 14), false, true) + Game.createMonster("Spark of Destruction", Position(32274, 31255, 14), false, true) + Game.createMonster("Spark of Destruction", Position(32274, 31249, 14), false, true) + Game.createMonster("Spark of Destruction", Position(32267, 31249, 14), false, true) + Game.createMonster("Charged Anomaly", Position(32271, 31249, 14), false, true) + Game.setStorageValue(GlobalStorage.HeartOfDestruction.ChargedAnomaly, valueGlobalStorage + 1) +end + local anomalyTransform = CreatureEvent("AnomalyTransform") + function anomalyTransform.onThink(creature) - if not creature or not creature:isMonster() then + if not creature then return false end - local hp = (creature:getHealth() / creature:getMaxHealth()) * 100 - if hp <= 75 and Game.getStorageValue(14322) == 0 then + local anomalyGlobalStorage = Game.getStorageValue(GlobalStorage.HeartOfDestruction.ChargedAnomaly) + local hpPercent = (creature:getHealth() / creature:getMaxHealth()) * 100 + + if hpPercent <= 75 and anomalyGlobalStorage == 0 then creature:remove() - Game.createMonster("spark of destruction", { x = 32267, y = 31253, z = 14 }, false, true) - Game.createMonster("spark of destruction", { x = 32274, y = 31255, z = 14 }, false, true) - Game.createMonster("spark of destruction", { x = 32274, y = 31249, z = 14 }, false, true) - Game.createMonster("spark of destruction", { x = 32267, y = 31249, z = 14 }, false, true) - Game.createMonster("charged anomaly", { x = 32271, y = 31249, z = 14 }, false, true) - Game.setStorageValue(14322, 1) - elseif hp <= 50 and Game.getStorageValue(14322) == 1 then + createSpawnAnomalyRoom(anomalyGlobalStorage) + elseif hpPercent <= 50 and anomalyGlobalStorage == 1 then creature:remove() - Game.createMonster("spark of destruction", { x = 32267, y = 31253, z = 14 }, false, true) - Game.createMonster("spark of destruction", { x = 32274, y = 31255, z = 14 }, false, true) - Game.createMonster("spark of destruction", { x = 32274, y = 31249, z = 14 }, false, true) - Game.createMonster("spark of destruction", { x = 32267, y = 31249, z = 14 }, false, true) - Game.createMonster("charged anomaly", { x = 32271, y = 31249, z = 14 }, false, true) - Game.setStorageValue(14322, 2) - elseif hp <= 25 and Game.getStorageValue(14322) == 2 then + createSpawnAnomalyRoom(anomalyGlobalStorage) + elseif hpPercent <= 25 and anomalyGlobalStorage == 2 then creature:remove() - Game.createMonster("spark of destruction", { x = 32267, y = 31253, z = 14 }, false, true) - Game.createMonster("spark of destruction", { x = 32274, y = 31255, z = 14 }, false, true) - Game.createMonster("spark of destruction", { x = 32274, y = 31249, z = 14 }, false, true) - Game.createMonster("spark of destruction", { x = 32267, y = 31249, z = 14 }, false, true) - Game.createMonster("charged anomaly", { x = 32271, y = 31249, z = 14 }, false, true) - Game.setStorageValue(14322, 3) - elseif hp <= 5 and Game.getStorageValue(14322) == 3 then + createSpawnAnomalyRoom(anomalyGlobalStorage) + elseif hpPercent <= 5 and anomalyGlobalStorage == 3 then creature:remove() - Game.createMonster("spark of destruction", { x = 32267, y = 31253, z = 14 }, false, true) - Game.createMonster("spark of destruction", { x = 32274, y = 31255, z = 14 }, false, true) - Game.createMonster("spark of destruction", { x = 32274, y = 31249, z = 14 }, false, true) - Game.createMonster("spark of destruction", { x = 32267, y = 31249, z = 14 }, false, true) - Game.createMonster("charged anomaly", { x = 32271, y = 31249, z = 14 }, false, true) - Game.setStorageValue(14322, 4) + createSpawnAnomalyRoom(anomalyGlobalStorage) end return true end diff --git a/data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/charged_anomaly_death.lua b/data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/charged_anomaly_death.lua index ce44a75d501..b1eba8e4fc7 100644 --- a/data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/charged_anomaly_death.lua +++ b/data-otservbr-global/scripts/creaturescripts/quests/heart_of_destruction/charged_anomaly_death.lua @@ -1,3 +1,8 @@ +local config = { + bossName = "Anomaly", + bossPosition = Position(32271, 31249, 14), +} + local monsterTable = { [1] = 72500, [2] = 145000, @@ -8,12 +13,20 @@ local monsterTable = { local chargedAnomalyDeath = CreatureEvent("ChargedAnomalyDeath") function chargedAnomalyDeath.onDeath(creature) - for storageValue, health in pairs(monsterTable) do - if Game.getStorageValue(14322) == storageValue then - local monster = Game.createMonster("anomaly", { x = 32271, y = 31249, z = 14 }, false, true) - monster:addHealth(-health) - end + if not creature then + return true + end + + local healthRemove = monsterTable[Game.getStorageValue(GlobalStorage.HeartOfDestruction.ChargedAnomaly)] + if not healthRemove then + return true end + + local boss = Game.createMonster(config.bossName, bossPosition, false, true) + if boss then + boss:addHealth(-healthRemove) + end + return true end diff --git a/data-otservbr-global/scripts/movements/quests/heart_of_destruction/vortex_anomaly.lua b/data-otservbr-global/scripts/movements/quests/heart_of_destruction/vortex_anomaly.lua index 3808d3fc98c..26c4ac34923 100644 --- a/data-otservbr-global/scripts/movements/quests/heart_of_destruction/vortex_anomaly.lua +++ b/data-otservbr-global/scripts/movements/quests/heart_of_destruction/vortex_anomaly.lua @@ -1,18 +1,23 @@ local vortexAnomaly = MoveEvent() +vortexAnomaly:type("stepin") + function vortexAnomaly.onStepIn(creature, item, position, fromPosition) + if not creature then + return true + end + if item.itemid == 22894 then if creature:isMonster() then if creature:getName():lower() == "charged anomaly" then creature:addHealth(-6000, COMBAT_DROWNDAMAGE) end - elseif isPlayer(creature) then + elseif creature:isPlayer() then creature:addHealth(-100, COMBAT_ENERGYDAMAGE) end end return true end -vortexAnomaly:type("stepin") vortexAnomaly:id(22894) vortexAnomaly:register() diff --git a/data-otservbr-global/scripts/spells/monster/charge_vortex.lua b/data-otservbr-global/scripts/spells/monster/charge_vortex.lua index 1efc07973fe..4cf96614b78 100644 --- a/data-otservbr-global/scripts/spells/monster/charge_vortex.lua +++ b/data-otservbr-global/scripts/spells/monster/charge_vortex.lua @@ -1,51 +1,34 @@ -local mathCount = 0 - -local positions = {} +local positions = { + Position(32264, 31253, 14), + Position(32269, 31258, 14), + Position(32275, 31255, 14), + Position(32280, 31253, 14), + Position(32271, 31248, 14), + Position(32264, 31245, 14), + Position(32270, 31240, 14), + Position(32269, 31253, 14), + Position(32275, 31245, 14), + Position(32276, 31250, 14), + Position(32266, 31249, 14), +} local function createVortex() - local storedPositions = { - { x = 32264, y = 31253, z = 14 }, - { x = 32269, y = 31258, z = 14 }, - { x = 32275, y = 31255, z = 14 }, - { x = 32280, y = 31253, z = 14 }, - { x = 32271, y = 31248, z = 14 }, - { x = 32264, y = 31245, z = 14 }, - { x = 32270, y = 31240, z = 14 }, - { x = 32269, y = 31253, z = 14 }, - { x = 32275, y = 31245, z = 14 }, - { x = 32276, y = 31250, z = 14 }, - { x = 32266, y = 31249, z = 14 }, - } - - if mathCount == 0 then - positions = storedPositions - end - - local r1 = math.random(#positions) - - local tile = Tile(positions[r1]) - + local tile = Tile(positions[math.random(#positions)]) if tile then local ground = tile:getGround() if ground then ground:transform(22894) - addEvent(function(pos) - local tile = Tile(pos) + addEvent(function(positionInAddEvent) + local tile = Tile(positionInAddEvent) if tile then local ground = tile:getGround() if ground then ground:transform(23049) end end - end, 10 * 1000, tile:getPosition()) -- 10*1000 = 10 SECONDS - mathCount = mathCount + 1 - table.remove(positions, r1) + end, 10 * 1000, tile:getPosition()) -- 10 seconds end end - - if mathCount == 11 then - mathCount = 0 - end end local spell = Spell("instant") From 6b187fbbc784c5d43963d4239a6164b62fc2db24 Mon Sep 17 00:00:00 2001 From: Beats Date: Sat, 9 Dec 2023 17:37:08 -0300 Subject: [PATCH 09/28] improve: connection management and error handling (#1986) ### Connection Management Refinements and Error Handling Improvements This PR implements several key changes, include: #### Enhanced Error Handling - More detailed logs for better debugging and error analysis. #### Simplification and Refactoring - Critical methods such as `Connection::close` and `Connection::accept` have been simplified and refactored for clarity. #### Precise Timeout Management - `std::chrono::milliseconds` implemented for more accurate timeout settings. #### Improved Protocol Management - Better handling of connection states and protocol management. #### Robust Socket Closure - Addition of `socket.cancel();` in `Connection::closeSocket()` ensures cancellation of pending asynchronous operations, increasing safety during socket closure. #### Safe Message Sending - State of the socket is now checked before sending messages, preventing attempts to write on closed sockets. #### Optimized Thread Safety - Utilization of `std::scoped_lock` and `std::unique_lock` optimized for safer thread handling. #### Improved IP and Timeout Handling - Enhancements in IP management and more efficient timeout handling. --- src/server/network/connection/connection.cpp | 207 +++++++++---------- src/server/network/connection/connection.hpp | 3 +- src/server/server.cpp | 2 +- 3 files changed, 104 insertions(+), 108 deletions(-) diff --git a/src/server/network/connection/connection.cpp b/src/server/network/connection/connection.cpp index 8508052c3a1..f0046f0aa3a 100644 --- a/src/server/network/connection/connection.cpp +++ b/src/server/network/connection/connection.cpp @@ -30,98 +30,93 @@ void ConnectionManager::closeAll() { try { std::error_code error; connection->socket.shutdown(asio::ip::tcp::socket::shutdown_both, error); + if (error) { + g_logger().error("[ConnectionManager::closeAll] - Failed to close connection, system error code {}", error.message()); + } } catch (const std::system_error &systemError) { - g_logger().error("[ConnectionManager::closeAll] - Failed to close connection, system error code {}", systemError.what()); + g_logger().error("[ConnectionManager::closeAll] - Exception caught: {}", systemError.what()); } }); connections.clear(); } -// Connection -// Constructor Connection::Connection(asio::io_service &initIoService, ConstServicePort_ptr initservicePort) : readTimer(initIoService), writeTimer(initIoService), service_port(std::move(initservicePort)), - socket(initIoService) { - timeConnected = time(nullptr); + socket(initIoService), + timeConnected(std::chrono::system_clock::to_time_t(std::chrono::system_clock::now())) { } -// Constructor end void Connection::close(bool force) { - // any thread ConnectionManager::getInstance().releaseConnection(shared_from_this()); - std::scoped_lock lockClass(connectionLock); + std::scoped_lock lock(connectionLock); ip = 0; + if (connectionState == CONNECTION_STATE_CLOSED) { return; } connectionState = CONNECTION_STATE_CLOSED; if (protocol) { - g_dispatcher().addEvent(std::bind_front(&Protocol::release, protocol), "Protocol::release", 1000); + g_dispatcher().addEvent(std::bind_front(&Protocol::release, protocol), "Protocol::release", std::chrono::milliseconds(1000).count()); } if (messageQueue.empty() || force) { closeSocket(); - } else { - // will be closed by the destructor or onWriteOperation } } void Connection::closeSocket() { - if (socket.is_open()) { - try { - readTimer.cancel(); - writeTimer.cancel(); - std::error_code error; - socket.shutdown(asio::ip::tcp::socket::shutdown_both, error); - socket.close(error); - } catch (const std::system_error &e) { - g_logger().error("[Connection::closeSocket] - error: {}", e.what()); - } + if (!socket.is_open()) { + return; + } + + readTimer.cancel(); + writeTimer.cancel(); + socket.cancel(); + + std::error_code error; + socket.shutdown(asio::ip::tcp::socket::shutdown_both, error); + if (error) { + g_logger().error("[Connection::closeSocket] - Failed to shutdown socket: {}", error.message()); + } + + socket.close(error); + if (error) { + g_logger().error("[Connection::closeSocket] - Failed to close socket: {}", error.message()); } } void Connection::accept(Protocol_ptr protocolPtr) { - this->connectionState = CONNECTION_STATE_IDENTIFYING; - this->protocol = protocolPtr; - g_dispatcher().addEvent(std::bind_front(&Protocol::onConnect, protocolPtr), "Protocol::onConnect", 1000); + connectionState = CONNECTION_STATE_IDENTIFYING; + protocol = std::move(protocolPtr); + g_dispatcher().addEvent(std::bind_front(&Protocol::onConnect, protocol), "Protocol::onConnect", std::chrono::milliseconds(1000).count()); - // Call second accept for not duplicate code - accept(false); + acceptInternal(false); } -void Connection::accept(bool toggleParseHeader /* = true */) { - try { - readTimer.expires_from_now(std::chrono::seconds(CONNECTION_READ_TIMEOUT)); - readTimer.async_wait(std::bind(&Connection::handleTimeout, std::weak_ptr(shared_from_this()), std::placeholders::_1)); +void Connection::acceptInternal(bool toggleParseHeader) { + readTimer.expires_from_now(std::chrono::seconds(CONNECTION_READ_TIMEOUT)); + readTimer.async_wait(std::bind(&Connection::handleTimeout, std::weak_ptr(shared_from_this()), std::placeholders::_1)); - // If toggleParseHeader is true, execute the parseHeader, if not, execute parseProxyIdentification - if (toggleParseHeader) { - // Read size of the first packet - asio::async_read(socket, asio::buffer(msg.getBuffer(), HEADER_LENGTH), std::bind(&Connection::parseHeader, shared_from_this(), std::placeholders::_1)); - } else { - // Read header bytes to identify if it is proxy identification - asio::async_read(socket, asio::buffer(msg.getBuffer(), HEADER_LENGTH), std::bind(&Connection::parseProxyIdentification, shared_from_this(), std::placeholders::_1)); - } - } catch (const std::system_error &e) { - g_logger().error("[Connection::accept] - error: {}", e.what()); - close(FORCE_CLOSE); - } + auto readCallback = toggleParseHeader ? std::bind(&Connection::parseHeader, shared_from_this(), std::placeholders::_1) + : std::bind(&Connection::parseProxyIdentification, shared_from_this(), std::placeholders::_1); + asio::async_read(socket, asio::buffer(msg.getBuffer(), HEADER_LENGTH), readCallback); } void Connection::parseProxyIdentification(const std::error_code &error) { - std::scoped_lock lockClass(connectionLock); + std::scoped_lock lock(connectionLock); readTimer.cancel(); - if (error) { + if (error || connectionState == CONNECTION_STATE_CLOSED) { + if (error) { + g_logger().error("[Connection::parseProxyIdentification] - Read error: {}", error.message()); + } close(FORCE_CLOSE); return; - } else if (connectionState == CONNECTION_STATE_CLOSED) { - return; } uint8_t* msgBuffer = msg.getBuffer(); @@ -163,23 +158,24 @@ void Connection::parseProxyIdentification(const std::error_code &error) { } } - accept(true); + acceptInternal(true); } void Connection::parseHeader(const std::error_code &error) { - std::scoped_lock lockClass(connectionLock); + std::scoped_lock lock(connectionLock); readTimer.cancel(); - if (error) { + if (error || connectionState == CONNECTION_STATE_CLOSED) { + if (error != asio::error::operation_aborted) { + g_logger().error("[Connection::parseHeader] - Read error: {}", error.message()); + } close(FORCE_CLOSE); return; - } else if (connectionState == CONNECTION_STATE_CLOSED) { - return; } uint32_t timePassed = std::max(1, (time(nullptr) - timeConnected) + 1); if ((++packetsSent / timePassed) > static_cast(g_configManager().getNumber(MAX_PACKETS_PER_SECOND, __FUNCTION__))) { - g_logger().warn("{} disconnected for exceeding packet per second limit.", convertIPToString(getIP())); + g_logger().warn("[Connection::parseHeader] - {} disconnected for exceeding packet per second limit.", convertIPToString(getIP())); close(); return; } @@ -209,14 +205,15 @@ void Connection::parseHeader(const std::error_code &error) { } void Connection::parsePacket(const std::error_code &error) { - std::scoped_lock lockClass(connectionLock); + std::scoped_lock lock(connectionLock); readTimer.cancel(); - if (error) { + if (error || connectionState == CONNECTION_STATE_CLOSED) { + if (error) { + g_logger().error("[Connection::parsePacket] - Read error: {}", error.message()); + } close(FORCE_CLOSE); return; - } else if (connectionState == CONNECTION_STATE_CLOSED) { - return; } bool skipReadingNextPacket = false; @@ -275,19 +272,14 @@ void Connection::parsePacket(const std::error_code &error) { } void Connection::resumeWork() { - std::scoped_lock lockClass(connectionLock); + readTimer.expires_from_now(std::chrono::seconds(CONNECTION_READ_TIMEOUT)); + readTimer.async_wait(std::bind(&Connection::handleTimeout, std::weak_ptr(shared_from_this()), std::placeholders::_1)); - try { - // Wait to the next packet - asio::async_read(socket, asio::buffer(msg.getBuffer(), HEADER_LENGTH), std::bind(&Connection::parseHeader, shared_from_this(), std::placeholders::_1)); - } catch (const std::system_error &e) { - g_logger().error("[Connection::resumeWork] - error: {}", e.what()); - close(FORCE_CLOSE); - } + asio::async_read(socket, asio::buffer(msg.getBuffer(), HEADER_LENGTH), std::bind(&Connection::parseHeader, shared_from_this(), std::placeholders::_1)); } void Connection::send(const OutputMessage_ptr &outputMessage) { - std::scoped_lock lockClass(connectionLock); + std::scoped_lock lock(connectionLock); if (connectionState == CONNECTION_STATE_CLOSED) { return; } @@ -295,71 +287,74 @@ void Connection::send(const OutputMessage_ptr &outputMessage) { bool noPendingWrite = messageQueue.empty(); messageQueue.emplace_back(outputMessage); if (noPendingWrite) { - // Make asio thread handle xtea encryption instead of dispatcher - try { + if (socket.is_open()) { asio::post(socket.get_executor(), std::bind(&Connection::internalWorker, shared_from_this())); - } catch (const std::system_error &e) { - g_logger().error("[Connection::send] - error: {}", e.what()); - messageQueue.clear(); + } else { + g_logger().error("[Connection::send] - Socket is not open for writing."); close(FORCE_CLOSE); } } } void Connection::internalWorker() { - std::unique_lock lockClass(connectionLock); - if (!messageQueue.empty()) { - const OutputMessage_ptr &outputMessage = messageQueue.front(); - lockClass.unlock(); - protocol->onSendMessage(outputMessage); - lockClass.lock(); - internalSend(outputMessage); - } else if (connectionState == CONNECTION_STATE_CLOSED) { - closeSocket(); + std::unique_lock lock(connectionLock); + if (messageQueue.empty()) { + if (connectionState == CONNECTION_STATE_CLOSED) { + closeSocket(); + } + return; } + + const auto &outputMessage = messageQueue.front(); + lock.unlock(); + protocol->onSendMessage(outputMessage); + lock.lock(); + + internalSend(outputMessage); } uint32_t Connection::getIP() { - if (ip != 1) { - return ip; + std::scoped_lock lock(connectionLock); + + if (ip == 1) { + std::error_code error; + asio::ip::tcp::endpoint endpoint = socket.remote_endpoint(error); + if (error) { + g_logger().error("[Connection::getIP] - Failed to get remote endpoint: {}", error.message()); + ip = 0; + } else { + ip = htonl(endpoint.address().to_v4().to_uint()); + } } - std::scoped_lock lockClass(connectionLock); - - // IP-address is expressed in network byte order - std::error_code error; - const asio::ip::tcp::endpoint endpoint = socket.remote_endpoint(error); - ip = error ? 0 : htonl(endpoint.address().to_v4().to_uint()); return ip; } void Connection::internalSend(const OutputMessage_ptr &outputMessage) { - try { - writeTimer.expires_from_now(std::chrono::seconds(CONNECTION_WRITE_TIMEOUT)); - writeTimer.async_wait(std::bind(&Connection::handleTimeout, std::weak_ptr(shared_from_this()), std::placeholders::_1)); + writeTimer.expires_from_now(std::chrono::seconds(CONNECTION_WRITE_TIMEOUT)); + writeTimer.async_wait(std::bind(&Connection::handleTimeout, std::weak_ptr(shared_from_this()), std::placeholders::_1)); - asio::async_write(socket, asio::buffer(outputMessage->getOutputBuffer(), outputMessage->getLength()), std::bind(&Connection::onWriteOperation, shared_from_this(), std::placeholders::_1)); - } catch (const std::system_error &e) { - g_logger().error("[Connection::internalSend] - error: {}", e.what()); - } + asio::async_write(socket, asio::buffer(outputMessage->getOutputBuffer(), outputMessage->getLength()), std::bind(&Connection::onWriteOperation, shared_from_this(), std::placeholders::_1)); } void Connection::onWriteOperation(const std::error_code &error) { - std::unique_lock lockClass(connectionLock); + std::unique_lock lock(connectionLock); writeTimer.cancel(); - messageQueue.pop_front(); if (error) { + g_logger().error("[Connection::onWriteOperation] - Write error: {}", error.message()); messageQueue.clear(); close(FORCE_CLOSE); return; } + messageQueue.pop_front(); + if (!messageQueue.empty()) { - const OutputMessage_ptr &outputMessage = messageQueue.front(); - lockClass.unlock(); + const auto &outputMessage = messageQueue.front(); + lock.unlock(); protocol->onSendMessage(outputMessage); - lockClass.lock(); + lock.lock(); internalSend(outputMessage); } else if (connectionState == CONNECTION_STATE_CLOSED) { closeSocket(); @@ -367,12 +362,12 @@ void Connection::onWriteOperation(const std::error_code &error) { } void Connection::handleTimeout(ConnectionWeak_ptr connectionWeak, const std::error_code &error) { - if (error == asio::error::operation_aborted) { - // The timer has been manually cancelled - return; - } - - if (auto connection = connectionWeak.lock()) { - connection->close(FORCE_CLOSE); + if (error) { + if (error != asio::error::operation_aborted) { + g_logger().warn("[Connection::handleTimeout] - Timeout or error: {}", error.message()); + if (auto connection = connectionWeak.lock()) { + connection->close(FORCE_CLOSE); + } + } } } diff --git a/src/server/network/connection/connection.hpp b/src/server/network/connection/connection.hpp index 3a80bf6ca54..d7d0f4b005f 100644 --- a/src/server/network/connection/connection.hpp +++ b/src/server/network/connection/connection.hpp @@ -61,9 +61,10 @@ class Connection : public std::enable_shared_from_this { void close(bool force = false); // Used by protocols that require server to send first void accept(Protocol_ptr protocolPtr); - void accept(bool toggleParseHeader = true); + void acceptInternal(bool toggleParseHeader = true); void resumeWork(); + void send(const OutputMessage_ptr &outputMessage); uint32_t getIP(); diff --git a/src/server/server.cpp b/src/server/server.cpp index 00f9d79e716..9a3c784c75a 100644 --- a/src/server/server.cpp +++ b/src/server/server.cpp @@ -97,7 +97,7 @@ void ServicePort::onAccept(Connection_ptr connection, const std::error_code &err if (service->is_single_socket()) { connection->accept(service->make_protocol(connection)); } else { - connection->accept(); + connection->acceptInternal(); } } else { connection->close(FORCE_CLOSE); From a6663d6aaca5ecee5cb45c395c79f8f7d5b07f80 Mon Sep 17 00:00:00 2001 From: Luan Santos Date: Sat, 9 Dec 2023 14:09:02 -0800 Subject: [PATCH 10/28] fix: create item, spell id conflicting with item and others (#1987) Co-authored-by: Eduardo Dantas --- data/scripts/talkactions/god/create_item.lua | 2 +- src/creatures/combat/spells.cpp | 10 +++++----- src/creatures/combat/spells.hpp | 10 +++++----- src/lua/functions/creatures/combat/spell_functions.cpp | 4 ++-- src/server/network/protocol/protocolgame.cpp | 8 ++++---- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/data/scripts/talkactions/god/create_item.lua b/data/scripts/talkactions/god/create_item.lua index 747e5cd4159..4fa3be3dcb9 100644 --- a/data/scripts/talkactions/god/create_item.lua +++ b/data/scripts/talkactions/god/create_item.lua @@ -20,7 +20,7 @@ function createItem.onSay(player, words, param) end local charges = itemType:getCharges() - local count = tonumber(split[2]) + local count = tonumber(split[2] or 1) if count then if itemType:isStackable() then local mainContainer = player:getSlotItem(CONST_SLOT_BACKPACK) diff --git a/src/creatures/combat/spells.cpp b/src/creatures/combat/spells.cpp index d8c71c2a93c..8460feb722b 100644 --- a/src/creatures/combat/spells.cpp +++ b/src/creatures/combat/spells.cpp @@ -143,7 +143,7 @@ std::list Spells::getSpellsByVocation(uint16_t vocationId) { if (vocSpellsIt != vocSpells.end() && vocSpellsIt->second) { - spellsList.push_back(it.second->getId()); + spellsList.push_back(it.second->getSpellId()); } } @@ -162,7 +162,7 @@ std::shared_ptr Spells::getRuneSpell(uint16_t id) { auto it = runes.find(id); if (it == runes.end()) { for (auto &rune : runes) { - if (rune.second->getId() == id) { + if (rune.second->getRuneItemId() == id) { return rune.second; } } @@ -216,7 +216,7 @@ std::shared_ptr Spells::getInstantSpell(const std::string &words) std::shared_ptr Spells::getInstantSpellById(uint16_t spellId) { for (auto &it : instants) { - if (it.second->getId() == spellId) { + if (it.second->getSpellId() == spellId) { return it.second; } } @@ -391,7 +391,7 @@ bool Spell::playerSpellCheck(std::shared_ptr player) const { return false; } - if (player->hasCondition(CONDITION_SPELLGROUPCOOLDOWN, group) || player->hasCondition(CONDITION_SPELLCOOLDOWN, spellId) || (secondaryGroup != SPELLGROUP_NONE && player->hasCondition(CONDITION_SPELLGROUPCOOLDOWN, secondaryGroup))) { + if (player->hasCondition(CONDITION_SPELLGROUPCOOLDOWN, group) || player->hasCondition(CONDITION_SPELLCOOLDOWN, m_spellId) || (secondaryGroup != SPELLGROUP_NONE && player->hasCondition(CONDITION_SPELLGROUPCOOLDOWN, secondaryGroup))) { player->sendCancelMessage(RETURNVALUE_YOUAREEXHAUSTED); if (isInstant()) { @@ -621,7 +621,7 @@ void Spell::applyCooldownConditions(std::shared_ptr player) const { spellCooldown -= getWheelOfDestinyBoost(WheelSpellBoost_t::COOLDOWN, spellGrade); } if (spellCooldown > 0) { - std::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLCOOLDOWN, spellCooldown / rateCooldown, 0, false, spellId); + std::shared_ptr condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_SPELLCOOLDOWN, spellCooldown / rateCooldown, 0, false, m_spellId); player->addCondition(condition); } } diff --git a/src/creatures/combat/spells.hpp b/src/creatures/combat/spells.hpp index f95f8aa40b3..4a237ff391d 100644 --- a/src/creatures/combat/spells.hpp +++ b/src/creatures/combat/spells.hpp @@ -128,11 +128,11 @@ class Spell : public BaseSpell { void setName(std::string n) { name = std::move(n); } - [[nodiscard]] uint16_t getId() const { - return spellId; + [[nodiscard]] uint16_t getSpellId() const { + return m_spellId; } - void setId(uint16_t id) { - spellId = id; + void setSpellId(uint16_t id) { + m_spellId = id; } void postCastSpell(std::shared_ptr player, bool finishedCast = true, bool payCost = true) const; @@ -355,7 +355,7 @@ class Spell : public BaseSpell { uint32_t magLevel = 0; int32_t range = -1; - uint16_t spellId = 0; + uint16_t m_spellId = 0; bool selfTarget = false; bool needTarget = false; diff --git a/src/lua/functions/creatures/combat/spell_functions.cpp b/src/lua/functions/creatures/combat/spell_functions.cpp index 3691645e263..c76df1163ea 100644 --- a/src/lua/functions/creatures/combat/spell_functions.cpp +++ b/src/lua/functions/creatures/combat/spell_functions.cpp @@ -179,9 +179,9 @@ int SpellFunctions::luaSpellId(lua_State* L) { return 1; } if (lua_gettop(L) == 1) { - lua_pushnumber(L, spell->getId()); + lua_pushnumber(L, spell->getSpellId()); } else { - spell->setId(getNumber(L, 2)); + spell->setSpellId(getNumber(L, 2)); pushBoolean(L, true); } } else { diff --git a/src/server/network/protocol/protocolgame.cpp b/src/server/network/protocol/protocolgame.cpp index 30153af5ac7..ad8b728ed05 100644 --- a/src/server/network/protocol/protocolgame.cpp +++ b/src/server/network/protocol/protocolgame.cpp @@ -3917,7 +3917,7 @@ void ProtocolGame::sendBasicData() { std::vector> validSpells; for (uint16_t sid : spellsList) { auto spell = g_spells().getInstantSpellById(sid); - if (spell && spell->getId() > 0) { + if (spell && spell->getSpellId() > 0) { validSpells.push_back(spell); } } @@ -3932,7 +3932,7 @@ void ProtocolGame::sendBasicData() { // Only send valid spells to old client if (oldProtocol) { - msg.addByte(spell->getId()); + msg.addByte(spell->getSpellId()); continue; } @@ -3944,10 +3944,10 @@ void ProtocolGame::sendBasicData() { if (static_cast(grade) == 0) { msg.add(0); } else { - msg.add(spell->getId()); + msg.add(spell->getSpellId()); } } else { - msg.add(spell->getId()); + msg.add(spell->getSpellId()); } } From bfe193aa5b3589cb7e44d7c7d910b202c2cfcc31 Mon Sep 17 00:00:00 2001 From: Luan Santos Date: Sat, 9 Dec 2023 14:10:53 -0800 Subject: [PATCH 11/28] feat: coryms black market monster and npcs (#1991) Thanks @Gtravisani for contributing the map and spawn locations. You can download the updated map from the 3.1.0 and 3.0.0 releases (and of course, any future releases). --- data-otservbr-global/npc/larry.lua | 68 ++++ data-otservbr-global/npc/squeekquek.lua | 74 ++++ .../world/otservbr-monster.xml | 327 ++++++++++++++++++ data-otservbr-global/world/otservbr-npc.xml | 6 + 4 files changed, 475 insertions(+) create mode 100644 data-otservbr-global/npc/larry.lua create mode 100644 data-otservbr-global/npc/squeekquek.lua diff --git a/data-otservbr-global/npc/larry.lua b/data-otservbr-global/npc/larry.lua new file mode 100644 index 00000000000..35638152be3 --- /dev/null +++ b/data-otservbr-global/npc/larry.lua @@ -0,0 +1,68 @@ +local internalNpcName = "Larry" +local npcType = Game.createNpcType(internalNpcName) +local npcConfig = {} + +npcConfig.name = internalNpcName +npcConfig.description = internalNpcName + +npcConfig.health = 100 +npcConfig.maxHealth = npcConfig.health +npcConfig.walkInterval = 2000 +npcConfig.walkRadius = 2 + +npcConfig.outfit = { + lookTypeEx = 24432, +} + +npcConfig.flags = { + floorchange = false, +} + +npcConfig.voices = { + interval = 15000, + chance = 50, +} + +npcConfig.shop = {} + +-- On buy npc shop message +npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) + npc:sellItem(player, itemId, amount, subType, 0, ignore, inBackpacks) +end +-- On sell npc shop message +npcType.onSellItem = function(npc, player, itemId, subtype, amount, ignore, name, totalCost) + player:sendTextMessage(MESSAGE_INFO_DESCR, string.format("Sold %ix %s for %i gold.", amount, name, totalCost)) +end +-- On check npc shop message (look item) +npcType.onCheckItem = function(npc, player, clientId, subType) end + +local keywordHandler = KeywordHandler:new() +local npcHandler = NpcHandler:new(keywordHandler) + +npcType.onThink = function(npc, interval) + npcHandler:onThink(npc, interval) +end + +npcType.onAppear = function(npc, creature) + npcHandler:onAppear(npc, creature) +end + +npcType.onDisappear = function(npc, creature) + npcHandler:onDisappear(npc, creature) +end + +npcType.onMove = function(npc, creature, fromPosition, toPosition) + npcHandler:onMove(npc, creature, fromPosition, toPosition) +end + +npcType.onSay = function(npc, creature, type, message) + npcHandler:onSay(npc, creature, type, message) +end + +npcType.onCloseChannel = function(npc, creature) + npcHandler:onCloseChannel(npc, creature) +end + +npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) + +npcType:register(npcConfig) diff --git a/data-otservbr-global/npc/squeekquek.lua b/data-otservbr-global/npc/squeekquek.lua new file mode 100644 index 00000000000..1d0a5e6d675 --- /dev/null +++ b/data-otservbr-global/npc/squeekquek.lua @@ -0,0 +1,74 @@ +local internalNpcName = "Squeekquek" +local npcType = Game.createNpcType(internalNpcName) +local npcConfig = {} + +npcConfig.name = internalNpcName +npcConfig.description = internalNpcName + +npcConfig.health = 100 +npcConfig.maxHealth = npcConfig.health +npcConfig.walkInterval = 2000 +npcConfig.walkRadius = 2 + +npcConfig.outfit = { + lookType = 532, + lookHead = 0, + lookBody = 113, + lookLegs = 95, + lookFeet = 0, + lookAddons = 0, + lookMount = 0, +} + +npcConfig.flags = { + floorchange = false, +} + +npcConfig.voices = { + interval = 15000, + chance = 50, +} + +npcConfig.shop = {} + +-- On buy npc shop message +npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) + npc:sellItem(player, itemId, amount, subType, 0, ignore, inBackpacks) +end +-- On sell npc shop message +npcType.onSellItem = function(npc, player, itemId, subtype, amount, ignore, name, totalCost) + player:sendTextMessage(MESSAGE_INFO_DESCR, string.format("Sold %ix %s for %i gold.", amount, name, totalCost)) +end +-- On check npc shop message (look item) +npcType.onCheckItem = function(npc, player, clientId, subType) end + +local keywordHandler = KeywordHandler:new() +local npcHandler = NpcHandler:new(keywordHandler) + +npcType.onThink = function(npc, interval) + npcHandler:onThink(npc, interval) +end + +npcType.onAppear = function(npc, creature) + npcHandler:onAppear(npc, creature) +end + +npcType.onDisappear = function(npc, creature) + npcHandler:onDisappear(npc, creature) +end + +npcType.onMove = function(npc, creature, fromPosition, toPosition) + npcHandler:onMove(npc, creature, fromPosition, toPosition) +end + +npcType.onSay = function(npc, creature, type, message) + npcHandler:onSay(npc, creature, type, message) +end + +npcType.onCloseChannel = function(npc, creature) + npcHandler:onCloseChannel(npc, creature) +end + +npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) + +npcType:register(npcConfig) diff --git a/data-otservbr-global/world/otservbr-monster.xml b/data-otservbr-global/world/otservbr-monster.xml index bc326a9fb21..d3bbc69e858 100644 --- a/data-otservbr-global/world/otservbr-monster.xml +++ b/data-otservbr-global/world/otservbr-monster.xml @@ -71337,6 +71337,12 @@ + + + + + + @@ -71412,6 +71418,9 @@ + + + @@ -71446,6 +71455,9 @@ + + + @@ -71478,6 +71490,9 @@ + + + @@ -71533,6 +71548,9 @@ + + + @@ -71576,6 +71594,9 @@ + + + @@ -71624,6 +71645,12 @@ + + + + + + @@ -71639,6 +71666,9 @@ + + + @@ -71686,6 +71716,9 @@ + + + @@ -71747,6 +71780,9 @@ + + + @@ -71765,10 +71801,16 @@ + + + + + + @@ -71879,12 +71921,21 @@ + + + + + + + + + @@ -71915,6 +71966,9 @@ + + + @@ -71929,6 +71983,12 @@ + + + + + + @@ -72002,6 +72062,9 @@ + + + @@ -95945,6 +96008,9 @@ + + + @@ -96059,6 +96125,12 @@ + + + + + + @@ -96167,6 +96239,9 @@ + + + @@ -96398,6 +96473,12 @@ + + + + + + @@ -96432,6 +96513,9 @@ + + + @@ -96570,6 +96654,9 @@ + + + @@ -96638,12 +96725,18 @@ + + + + + + @@ -96654,6 +96747,12 @@ + + + + + + @@ -118631,6 +118730,9 @@ + + + @@ -118671,6 +118773,9 @@ + + + @@ -118684,6 +118789,9 @@ + + + @@ -118736,6 +118844,9 @@ + + + @@ -118781,6 +118892,9 @@ + + + @@ -118815,6 +118929,9 @@ + + + @@ -118845,6 +118962,9 @@ + + + @@ -133977,6 +134097,9 @@ + + + @@ -134004,6 +134127,12 @@ + + + + + + @@ -134016,6 +134145,9 @@ + + + @@ -134040,12 +134172,18 @@ + + + + + + @@ -134058,6 +134196,9 @@ + + + @@ -134099,21 +134240,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -134135,6 +134303,12 @@ + + + + + + @@ -134155,6 +134329,9 @@ + + + @@ -134178,9 +134355,27 @@ + + + + + + + + + + + + + + + + + + @@ -147210,6 +147405,9 @@ + + + @@ -147221,6 +147419,9 @@ + + + @@ -147244,6 +147445,9 @@ + + + @@ -147253,9 +147457,30 @@ + + + + + + + + + + + + + + + + + + + + + @@ -147297,6 +147522,9 @@ + + + @@ -147348,15 +147576,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -147386,6 +147638,12 @@ + + + + + + @@ -147399,6 +147657,15 @@ + + + + + + + + + @@ -158821,6 +159088,9 @@ + + + @@ -158839,6 +159109,12 @@ + + + + + + @@ -158859,6 +159135,9 @@ + + + @@ -158871,6 +159150,15 @@ + + + + + + + + + @@ -158897,6 +159185,24 @@ + + + + + + + + + + + + + + + + + + @@ -158915,6 +159221,12 @@ + + + + + + @@ -158924,6 +159236,12 @@ + + + + + + @@ -158939,12 +159257,21 @@ + + + + + + + + + diff --git a/data-otservbr-global/world/otservbr-npc.xml b/data-otservbr-global/world/otservbr-npc.xml index b82ea1ad59a..305023dbfa2 100644 --- a/data-otservbr-global/world/otservbr-npc.xml +++ b/data-otservbr-global/world/otservbr-npc.xml @@ -2554,6 +2554,9 @@ + + + @@ -2626,6 +2629,9 @@ + + + From 890db681172996ae71cd6ea9c6f5c284f7d6998b Mon Sep 17 00:00:00 2001 From: Beats Date: Sat, 9 Dec 2023 19:11:35 -0300 Subject: [PATCH 12/28] fix: conditions speed (#876) --- data-canary/scripts/runes/paralyze_rune.lua | 2 +- data-canary/scripts/spells/support/charge.lua | 2 +- data-canary/scripts/spells/support/haste.lua | 2 +- .../scripts/spells/support/sharpshooter.lua | 2 +- .../scripts/spells/support/strong_haste.lua | 2 +- .../scripts/spells/runes/paralyze_rune.lua | 2 +- .../scripts/spells/support/charge.lua | 2 +- .../scripts/spells/support/haste.lua | 2 +- .../scripts/spells/support/strong_haste.lua | 2 +- src/creatures/combat/condition.cpp | 32 +++++++++++++++---- src/creatures/monsters/monsters.cpp | 6 +++- src/io/iobestiary.cpp | 6 ++-- 12 files changed, 43 insertions(+), 19 deletions(-) diff --git a/data-canary/scripts/runes/paralyze_rune.lua b/data-canary/scripts/runes/paralyze_rune.lua index a0f41ac1fb3..b0c602a159b 100644 --- a/data-canary/scripts/runes/paralyze_rune.lua +++ b/data-canary/scripts/runes/paralyze_rune.lua @@ -4,7 +4,7 @@ combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_UNDEFINEDDAMAGE) local condition = Condition(CONDITION_PARALYZE) condition:setParameter(CONDITION_PARAM_TICKS, 6000) -condition:setFormula(-1, 81, -1, 81) +condition:setFormula(-1, 0, -1, 0) combat:addCondition(condition) local rune = Spell("rune") diff --git a/data-canary/scripts/spells/support/charge.lua b/data-canary/scripts/spells/support/charge.lua index 0b0090a85b5..38ccdbb9e9a 100644 --- a/data-canary/scripts/spells/support/charge.lua +++ b/data-canary/scripts/spells/support/charge.lua @@ -4,7 +4,7 @@ combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) local condition = Condition(CONDITION_HASTE) condition:setParameter(CONDITION_PARAM_TICKS, 5000) -condition:setFormula(0.9, -72, 0.9, -72) +condition:setFormula(1.9, 40, 1.9, 40) combat:addCondition(condition) local spell = Spell("instant") diff --git a/data-canary/scripts/spells/support/haste.lua b/data-canary/scripts/spells/support/haste.lua index 9c5280c1da0..5c3f58eca36 100644 --- a/data-canary/scripts/spells/support/haste.lua +++ b/data-canary/scripts/spells/support/haste.lua @@ -4,7 +4,7 @@ combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) local condition = Condition(CONDITION_HASTE) condition:setParameter(CONDITION_PARAM_TICKS, 33000) -condition:setFormula(0.3, -24, 0.3, -24) +condition:setFormula(1.3, 40, 1.3, 40) combat:addCondition(condition) local spell = Spell("instant") diff --git a/data-canary/scripts/spells/support/sharpshooter.lua b/data-canary/scripts/spells/support/sharpshooter.lua index 4d484894213..0a419b6b07e 100644 --- a/data-canary/scripts/spells/support/sharpshooter.lua +++ b/data-canary/scripts/spells/support/sharpshooter.lua @@ -12,7 +12,7 @@ combat:addCondition(skill) local speed = Condition(CONDITION_PARALYZE) speed:setParameter(CONDITION_PARAM_TICKS, 10000) -speed:setFormula(-0.7, 56, -0.7, 56) +speed:setFormula(-0.73, 0, -0.73, 0) combat:addCondition(speed) local exhaustHealGroup = Condition(CONDITION_SPELLGROUPCOOLDOWN) diff --git a/data-canary/scripts/spells/support/strong_haste.lua b/data-canary/scripts/spells/support/strong_haste.lua index f70a8db3354..3837edf804b 100644 --- a/data-canary/scripts/spells/support/strong_haste.lua +++ b/data-canary/scripts/spells/support/strong_haste.lua @@ -4,7 +4,7 @@ combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) local condition = Condition(CONDITION_HASTE) condition:setParameter(CONDITION_PARAM_TICKS, 21000) -condition:setFormula(0.7, -0, 0.7, -0) +condition:setFormula(1.7, 40, 1.7, 40) combat:addCondition(condition) local spell = Spell("instant") diff --git a/data-otservbr-global/scripts/spells/runes/paralyze_rune.lua b/data-otservbr-global/scripts/spells/runes/paralyze_rune.lua index a0f41ac1fb3..b0c602a159b 100644 --- a/data-otservbr-global/scripts/spells/runes/paralyze_rune.lua +++ b/data-otservbr-global/scripts/spells/runes/paralyze_rune.lua @@ -4,7 +4,7 @@ combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_UNDEFINEDDAMAGE) local condition = Condition(CONDITION_PARALYZE) condition:setParameter(CONDITION_PARAM_TICKS, 6000) -condition:setFormula(-1, 81, -1, 81) +condition:setFormula(-1, 0, -1, 0) combat:addCondition(condition) local rune = Spell("rune") diff --git a/data-otservbr-global/scripts/spells/support/charge.lua b/data-otservbr-global/scripts/spells/support/charge.lua index a78780574ad..f8a0e6c02b2 100644 --- a/data-otservbr-global/scripts/spells/support/charge.lua +++ b/data-otservbr-global/scripts/spells/support/charge.lua @@ -4,7 +4,7 @@ combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) local condition = Condition(CONDITION_HASTE) condition:setParameter(CONDITION_PARAM_TICKS, 5000) -condition:setFormula(0.9, -0, 0.9, -0) +condition:setFormula(1.9, 40, 1.9, 40) combat:addCondition(condition) local spell = Spell("instant") diff --git a/data-otservbr-global/scripts/spells/support/haste.lua b/data-otservbr-global/scripts/spells/support/haste.lua index ee783e9fcca..2766d3e792f 100644 --- a/data-otservbr-global/scripts/spells/support/haste.lua +++ b/data-otservbr-global/scripts/spells/support/haste.lua @@ -4,7 +4,7 @@ combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) local condition = Condition(CONDITION_HASTE) condition:setParameter(CONDITION_PARAM_TICKS, 30000) -condition:setFormula(0.3, -0, 0.3, -0) +condition:setFormula(1.3, 40, 1.3, 40) combat:addCondition(condition) local spell = Spell("instant") diff --git a/data-otservbr-global/scripts/spells/support/strong_haste.lua b/data-otservbr-global/scripts/spells/support/strong_haste.lua index 6cef310e91a..11118f3e9e9 100644 --- a/data-otservbr-global/scripts/spells/support/strong_haste.lua +++ b/data-otservbr-global/scripts/spells/support/strong_haste.lua @@ -4,7 +4,7 @@ combat:setParameter(COMBAT_PARAM_AGGRESSIVE, 0) local condition = Condition(CONDITION_HASTE) condition:setParameter(CONDITION_PARAM_TICKS, 22000) -condition:setFormula(0.7, -56, 0.7, -56) +condition:setFormula(1.7, 40, 1.7, 40) combat:addCondition(condition) local spell = Spell("instant") diff --git a/src/creatures/combat/condition.cpp b/src/creatures/combat/condition.cpp index 1c4c636ba38..2320ad99ee3 100644 --- a/src/creatures/combat/condition.cpp +++ b/src/creatures/combat/condition.cpp @@ -2085,8 +2085,9 @@ void ConditionSpeed::setFormulaVars(float NewMina, float NewMinb, float NewMaxa, } void ConditionSpeed::getFormulaValues(int32_t var, int32_t &min, int32_t &max) const { - min = (var * mina) + minb; - max = (var * maxa) + maxb; + int32_t difference = var - 40; + min = mina * difference + minb; + max = maxa * difference + maxb; } bool ConditionSpeed::setParam(ConditionParam_t param, int32_t value) { @@ -2145,9 +2146,19 @@ bool ConditionSpeed::startCondition(std::shared_ptr creature) { } if (speedDelta == 0) { - int32_t min, max; - getFormulaValues(creature->getBaseSpeed(), min, max); + int32_t min; + int32_t max; + auto baseSpeed = creature->getBaseSpeed(); + getFormulaValues(baseSpeed, min, max); speedDelta = uniform_random(min, max); + + if (conditionType == CONDITION_HASTE) { + speedDelta = speedDelta - baseSpeed; + } + + if (conditionType == CONDITION_PARALYZE && speedDelta < baseSpeed - 40) { + speedDelta = 40 - baseSpeed; + } } g_game().changeSpeed(creature, speedDelta); @@ -2173,7 +2184,7 @@ void ConditionSpeed::addCondition(std::shared_ptr creature, const std: setTicks(addCondition->getTicks()); - const std::shared_ptr &conditionSpeed = addCondition->static_self_cast(); + const auto &conditionSpeed = addCondition->static_self_cast(); int32_t oldSpeedDelta = speedDelta; speedDelta = conditionSpeed->speedDelta; mina = conditionSpeed->mina; @@ -2184,8 +2195,17 @@ void ConditionSpeed::addCondition(std::shared_ptr creature, const std: if (speedDelta == 0) { int32_t min; int32_t max; - getFormulaValues(creature->getBaseSpeed(), min, max); + auto baseSpeed = creature->getBaseSpeed(); + getFormulaValues(baseSpeed, min, max); speedDelta = uniform_random(min, max); + + if (conditionType == CONDITION_HASTE) { + speedDelta = speedDelta - baseSpeed; + } + + if (conditionType == CONDITION_PARALYZE && speedDelta < baseSpeed - 40) { + speedDelta = 40 - baseSpeed; + } } int32_t newSpeedChange = (speedDelta - oldSpeedDelta); diff --git a/src/creatures/monsters/monsters.cpp b/src/creatures/monsters/monsters.cpp index ba05f5293d5..9230d6bde58 100644 --- a/src/creatures/monsters/monsters.cpp +++ b/src/creatures/monsters/monsters.cpp @@ -121,6 +121,8 @@ bool Monsters::deserializeSpell(const std::shared_ptr spell, spell combatPtr->setParam(COMBAT_PARAM_TYPE, spell->combatType); } else if (spellName == "speed") { int32_t speedChange = 0; + int32_t speedChangeValue = 0; + int32_t speedChangeRange = 0; int32_t duration = 10000; if (spell->duration != 0) { @@ -144,7 +146,9 @@ bool Monsters::deserializeSpell(const std::shared_ptr spell, spell } std::shared_ptr condition = Condition::createCondition(CONDITIONID_COMBAT, conditionType, duration, 0)->static_self_cast(); - condition->setFormulaVars(speedChange / 1000.0, 0, speedChange / 1000.0, 0); + speedChangeRange = speedChange / 2; + speedChangeValue = uniform_random(speedChangeRange, speedChange); + condition->setFormulaVars(speedChangeValue / 1000.0, 40, speedChangeValue / 1000.0, 40); combatPtr->addCondition(condition); } else if (spellName == "outfit") { int32_t duration = 10000; diff --git a/src/io/iobestiary.cpp b/src/io/iobestiary.cpp index a84d3091a3d..a16c6164a93 100644 --- a/src/io/iobestiary.cpp +++ b/src/io/iobestiary.cpp @@ -27,7 +27,7 @@ bool IOBestiary::parseCharmCombat(const std::shared_ptr charm, std::share if (charm->type == CHARM_OFFENSIVE) { if (charm->id == CHARM_CRIPPLE) { std::shared_ptr cripple = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_PARALYZE, 10000, 0)->static_self_cast(); - cripple->setFormulaVars(-1, 81, -1, 81); + cripple->setFormulaVars(-1, 0, -1, 0); target->addCondition(cripple); player->sendCancelMessage(charm->cancelMsg); return false; @@ -71,14 +71,14 @@ bool IOBestiary::parseCharmCombat(const std::shared_ptr charm, std::share } case CHARM_ADRENALINE: { std::shared_ptr adrenaline = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_HASTE, 10000, 0)->static_self_cast(); - adrenaline->setFormulaVars(1.5, -0, 1.5, -0); + adrenaline->setFormulaVars(2.5, 40, 2.5, 40); player->addCondition(adrenaline); player->sendCancelMessage(charm->cancelMsg); return false; } case CHARM_NUMB: { std::shared_ptr numb = Condition::createCondition(CONDITIONID_COMBAT, CONDITION_PARALYZE, 10000, 0)->static_self_cast(); - numb->setFormulaVars(-1, 81, -1, 81); + numb->setFormulaVars(-1, 0, -1, 0); target->addCondition(numb); player->sendCancelMessage(charm->cancelMsg); return false; From c778b8edbce3f134033f410846f7dcd2183a1398 Mon Sep 17 00:00:00 2001 From: Luan Santos Date: Sat, 9 Dec 2023 15:00:00 -0800 Subject: [PATCH 13/28] feat: weighted random spawns (#1848) Rework of #1802 to fix issues with boss spawns and adding a "weight" to enable users to balance things. Credits to @Schiffers for the original PR and idea. --- config.lua.dist | 2 + src/config/config_definitions.hpp | 1 + src/config/configmanager.cpp | 1 + .../monsters/spawns/spawn_monster.cpp | 260 ++++++++++++------ .../monsters/spawns/spawn_monster.hpp | 19 +- src/game/scheduling/task.hpp | 1 + src/pch.hpp | 1 + 7 files changed, 199 insertions(+), 86 deletions(-) diff --git a/config.lua.dist b/config.lua.dist index 57257748195..e7dabfcccaa 100644 --- a/config.lua.dist +++ b/config.lua.dist @@ -207,6 +207,7 @@ onlyPremiumAccount = false -- NOTE: buyBlessCommandFee will add fee when player buy bless by command (!bless), active changing value between 1 and 100 (fee percent. ex: 3 = 3%, 30 = 30%) -- NOTE: teleportPlayerToVocationRoom will enable oressa to teleport player to his/her room vocation -- 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 weatherRain = false thunderEffect = false allConsoleLog = false @@ -222,6 +223,7 @@ buyAolCommandFee = 0 buyBlessCommandFee = 0 teleportPlayerToVocationRoom = true toggleReceiveReward = false +randomMonsterSpawn = false -- Teleport summon -- Set to true will never remove the summon diff --git a/src/config/config_definitions.hpp b/src/config/config_definitions.hpp index 700f5bfdb0c..582531a3afd 100644 --- a/src/config/config_definitions.hpp +++ b/src/config/config_definitions.hpp @@ -173,6 +173,7 @@ enum ConfigKey_t : uint16_t { PVP_RATE_DAMAGE_REDUCTION_PER_LEVEL, PVP_RATE_DAMAGE_TAKEN_PER_LEVEL, PZ_LOCKED, + RANDOM_MONSTER_SPAWN, RATE_ATTACK_SPEED, RATE_BOSS_ATTACK, RATE_BOSS_DEFENSE, diff --git a/src/config/configmanager.cpp b/src/config/configmanager.cpp index d90c89f0e26..fb2f11d3dea 100644 --- a/src/config/configmanager.cpp +++ b/src/config/configmanager.cpp @@ -44,6 +44,7 @@ bool ConfigManager::load() { 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"); diff --git a/src/creatures/monsters/spawns/spawn_monster.cpp b/src/creatures/monsters/spawns/spawn_monster.cpp index 9549ae5930e..05435d6b4a8 100644 --- a/src/creatures/monsters/spawns/spawn_monster.cpp +++ b/src/creatures/monsters/spawns/spawn_monster.cpp @@ -95,17 +95,13 @@ bool SpawnsMonster::loadFromXML(const std::string &filemonstername) { boostedrate = 2; } - uint32_t interval = pugi::cast(childMonsterNode.attribute("spawntime").value()) * 1000 * 100 / std::max((uint32_t)1, (g_configManager().getNumber(RATE_SPAWN, __FUNCTION__) * boostedrate * eventschedule)); - if (interval >= MONSTER_MINSPAWN_INTERVAL && interval <= MONSTER_MAXSPAWN_INTERVAL) { - spawnMonster.addMonster(nameAttribute.as_string(), pos, dir, static_cast(interval)); - } else { - if (interval <= MONSTER_MINSPAWN_INTERVAL) { - g_logger().warn("[SpawnsMonster::loadFromXml] - {} {} spawntime cannot be less than {} seconds, set to {} by default.", nameAttribute.as_string(), pos.toString(), MONSTER_MINSPAWN_INTERVAL / 1000, MONSTER_MINSPAWN_INTERVAL / 1000); - spawnMonster.addMonster(nameAttribute.as_string(), pos, dir, MONSTER_MINSPAWN_INTERVAL); - } else { - g_logger().warn("[SpawnsMonster::loadFromXml] - {} {} spawntime can not be more than {} seconds", nameAttribute.as_string(), pos.toString(), MONSTER_MAXSPAWN_INTERVAL / 1000); - } + pugi::xml_attribute weightAttribute = childMonsterNode.attribute("weight"); + uint32_t weight = 1; + if (weightAttribute) { + weight = pugi::cast(weightAttribute.value()); } + + spawnMonster.addMonster(nameAttribute.as_string(), pos, dir, pugi::cast(childMonsterNode.attribute("spawntime").value()) * 1000, weight); } } } @@ -150,8 +146,7 @@ void SpawnMonster::startSpawnMonsterCheck() { } SpawnMonster::~SpawnMonster() { - for (const auto &it : spawnedMonsterMap) { - std::shared_ptr monster = it.second; + for (const auto &[_, monster] : spawnedMonsterMap) { monster->setSpawnMonster(nullptr); } } @@ -170,72 +165,100 @@ bool SpawnMonster::isInSpawnMonsterZone(const Position &pos) { return SpawnsMonster::isInZone(centerPos, radius, pos); } -bool SpawnMonster::spawnMonster(uint32_t spawnMonsterId, const std::shared_ptr monsterType, const Position &pos, Direction dir, bool startup /*= false*/) { +bool SpawnMonster::spawnMonster(uint32_t spawnMonsterId, spawnBlock_t &sb, const std::shared_ptr monsterType, bool startup /*= false*/) { + if (spawnedMonsterMap.contains(spawnMonsterId)) { + return false; + } auto monster = std::make_shared(monsterType); if (startup) { // No need to send out events to the surrounding since there is no one out there to listen! - if (!g_game().internalPlaceCreature(monster, pos, true)) { + if (!g_game().internalPlaceCreature(monster, sb.pos, true)) { return false; } } else { - if (!g_game().placeCreature(monster, pos, false, true)) { + if (!g_game().placeCreature(monster, sb.pos, false, true)) { return false; } } - monster->setDirection(dir); + monster->setDirection(sb.direction); monster->setSpawnMonster(this); - monster->setMasterPos(pos); + monster->setMasterPos(sb.pos); - spawnedMonsterMap.insert(spawned_pair(spawnMonsterId, monster)); - spawnMonsterMap[spawnMonsterId].lastSpawn = OTSYS_TIME(); - g_events().eventMonsterOnSpawn(monster, pos); - g_callbacks().executeCallback(EventCallback_t::monsterOnSpawn, &EventCallback::monsterOnSpawn, monster, pos); + spawnedMonsterMap[spawnMonsterId] = monster; + sb.lastSpawn = OTSYS_TIME(); + g_events().eventMonsterOnSpawn(monster, sb.pos); + g_callbacks().executeCallback(EventCallback_t::monsterOnSpawn, &EventCallback::monsterOnSpawn, monster, sb.pos); return true; } -void SpawnMonster::startup() { - for (const auto &it : spawnMonsterMap) { - uint32_t spawnMonsterId = it.first; - const spawnBlock_t &sb = it.second; - spawnMonster(spawnMonsterId, sb.monsterType, sb.pos, sb.direction, true); +void SpawnMonster::startup(bool delayed) { + if (g_configManager().getBoolean(RANDOM_MONSTER_SPAWN, __FUNCTION__)) { + for (auto it = spawnMonsterMap.begin(); it != spawnMonsterMap.end(); ++it) { + auto &[spawnMonsterId, sb] = *it; + for (auto &[monsterType, weight] : sb.monsterTypes) { + if (monsterType->isBoss()) { + continue; + } + for (auto otherIt = std::next(it); otherIt != spawnMonsterMap.end(); ++otherIt) { + auto &[id, otherSb] = *otherIt; + if (id == spawnMonsterId) { + continue; + } + if (otherSb.hasBoss()) { + continue; + } + if (otherSb.monsterTypes.contains(monsterType)) { + weight += otherSb.monsterTypes[monsterType]; + } + otherSb.monsterTypes.emplace(monsterType, weight); + sb.monsterTypes.emplace(monsterType, weight); + } + } + } + } + for (auto &[spawnMonsterId, sb] : spawnMonsterMap) { + const auto &mType = sb.getMonsterType(); + if (!mType) { + continue; + } + if (delayed) { + g_dispatcher().addEvent(std::bind(&SpawnMonster::scheduleSpawn, this, spawnMonsterId, sb, mType, 0, true), "SpawnMonster::startup"); + } else { + scheduleSpawn(spawnMonsterId, sb, mType, 0, true); + } } } void SpawnMonster::checkSpawnMonster() { - checkSpawnMonsterEvent = 0; + if (checkSpawnMonsterEvent == 0) { + return; + } + checkSpawnMonsterEvent = 0; cleanup(); - uint32_t spawnMonsterCount = 0; - - for (auto &it : spawnMonsterMap) { - uint32_t spawnMonsterId = it.first; - if (spawnedMonsterMap.find(spawnMonsterId) != spawnedMonsterMap.end()) { + for (auto &[spawnMonsterId, sb] : spawnMonsterMap) { + if (spawnedMonsterMap.contains(spawnMonsterId)) { continue; } - spawnBlock_t &sb = it.second; - if (!sb.monsterType->canSpawn(sb.pos)) { + const auto &mType = sb.getMonsterType(); + if (!mType) { + continue; + } + if (!mType->canSpawn(sb.pos) || (mType->info.isBlockable && findPlayer(sb.pos))) { sb.lastSpawn = OTSYS_TIME(); continue; } + if (OTSYS_TIME() < sb.lastSpawn + sb.interval) { + continue; + } - if (OTSYS_TIME() >= sb.lastSpawn + sb.interval) { - if (sb.monsterType->info.isBlockable && findPlayer(sb.pos)) { - sb.lastSpawn = OTSYS_TIME(); - continue; - } - - if (sb.monsterType->info.isBlockable) { - spawnMonster(spawnMonsterId, sb.monsterType, sb.pos, sb.direction); - } else { - scheduleSpawn(spawnMonsterId, sb, 3 * NONBLOCKABLE_SPAWN_MONSTER_INTERVAL); - } - - if (++spawnMonsterCount >= static_cast(g_configManager().getNumber(RATE_SPAWN, __FUNCTION__))) { - break; - } + if (mType->info.isBlockable) { + spawnMonster(spawnMonsterId, sb, mType, true); + } else { + scheduleSpawn(spawnMonsterId, sb, mType, 3 * NONBLOCKABLE_SPAWN_MONSTER_INTERVAL); } } @@ -244,30 +267,29 @@ void SpawnMonster::checkSpawnMonster() { } } -void SpawnMonster::scheduleSpawn(uint32_t spawnMonsterId, spawnBlock_t &sb, uint16_t interval) { +void SpawnMonster::scheduleSpawn(uint32_t spawnMonsterId, spawnBlock_t &sb, const std::shared_ptr mType, uint16_t interval, bool startup /*= false*/) { if (interval <= 0) { - spawnMonster(spawnMonsterId, sb.monsterType, sb.pos, sb.direction); + spawnMonster(spawnMonsterId, sb, mType, startup); } else { g_game().addMagicEffect(sb.pos, CONST_ME_TELEPORT); - g_dispatcher().scheduleEvent(1400, std::bind(&SpawnMonster::scheduleSpawn, this, spawnMonsterId, sb, interval - NONBLOCKABLE_SPAWN_MONSTER_INTERVAL), "SpawnMonster::scheduleSpawn"); + g_dispatcher().scheduleEvent(NONBLOCKABLE_SPAWN_MONSTER_INTERVAL, std::bind(&SpawnMonster::scheduleSpawn, this, spawnMonsterId, sb, mType, interval - NONBLOCKABLE_SPAWN_MONSTER_INTERVAL, startup), "SpawnMonster::scheduleSpawn"); } } void SpawnMonster::cleanup() { - auto it = spawnedMonsterMap.begin(); - while (it != spawnedMonsterMap.end()) { - uint32_t spawnMonsterId = it->first; - std::shared_ptr monster = it->second; - if (!monster || monster->isRemoved()) { - spawnMonsterMap[spawnMonsterId].lastSpawn = OTSYS_TIME(); - it = spawnedMonsterMap.erase(it); - } else { - ++it; + std::vector removeList; + for (const auto &[spawnMonsterId, monster] : spawnedMonsterMap) { + if (monster == nullptr || monster->isRemoved()) { + removeList.push_back(spawnMonsterId); } } + for (const auto &spawnMonsterId : removeList) { + spawnMonsterMap[spawnMonsterId].lastSpawn = OTSYS_TIME(); + spawnedMonsterMap.erase(spawnMonsterId); + } } -bool SpawnMonster::addMonster(const std::string &name, const Position &pos, Direction dir, uint32_t scheduleInterval) { +bool SpawnMonster::addMonster(const std::string &name, const Position &pos, Direction dir, uint32_t scheduleInterval, uint32_t weight /*= 1*/) { std::string variant = ""; for (const auto &zone : Zone::getZones(pos)) { if (!zone->getMonsterVariant().empty()) { @@ -281,34 +303,77 @@ bool SpawnMonster::addMonster(const std::string &name, const Position &pos, Dire return false; } - this->interval = std::min(this->interval, scheduleInterval); - - spawnBlock_t sb; - sb.monsterType = monsterType; - sb.pos = pos; - sb.direction = dir; - sb.interval = scheduleInterval; - sb.lastSpawn = 0; + uint32_t eventschedule = g_eventsScheduler().getSpawnMonsterSchedule(); + std::string boostedMonster = g_game().getBoostedMonsterName(); + int32_t boostedrate = 1; + if (name == boostedMonster) { + boostedrate = 2; + } + // eventschedule is a whole percentage, so we need to multiply by 100 to match the order of magnitude of the other values + scheduleInterval = scheduleInterval * 100 / std::max((uint32_t)1, (g_configManager().getNumber(RATE_SPAWN, __FUNCTION__) * boostedrate * eventschedule)); + if (scheduleInterval < MONSTER_MINSPAWN_INTERVAL) { + g_logger().warn("[SpawnsMonster::addMonster] - {} {} spawntime cannot be less than {} seconds, set to {} by default.", name, pos.toString(), MONSTER_MINSPAWN_INTERVAL / 1000, MONSTER_MINSPAWN_INTERVAL / 1000); + scheduleInterval = MONSTER_MINSPAWN_INTERVAL; + } else if (scheduleInterval > MONSTER_MAXSPAWN_INTERVAL) { + g_logger().warn("[SpawnsMonster::addMonster] - {} {} spawntime can not be more than {} seconds, set to {} by default", name, pos.toString(), MONSTER_MAXSPAWN_INTERVAL / 1000, MONSTER_MAXSPAWN_INTERVAL / 1000); + scheduleInterval = MONSTER_MAXSPAWN_INTERVAL; + } + this->interval = std::gcd(this->interval, scheduleInterval); + spawnBlock_t* sb = nullptr; uint32_t spawnMonsterId = spawnMonsterMap.size() + 1; - spawnMonsterMap[spawnMonsterId] = sb; + for (auto &[id, maybeSb] : spawnMonsterMap) { + if (maybeSb.pos == pos) { + sb = &maybeSb; + spawnMonsterId = id; + break; + } + } + if (sb) { + if (sb->monsterTypes.contains(monsterType)) { + g_logger().error("[SpawnMonster] Monster {} already exists in spawn block at {}", name, pos.toString()); + return false; + } + if (monsterType->isBoss() && sb->monsterTypes.size() > 0) { + g_logger().error("[SpawnMonster] Boss monster {} has been added to spawn block with other monsters. This is not allowed.", name); + return false; + } + if (sb->hasBoss()) { + g_logger().error("[SpawnMonster] Monster {} has been added to spawn block with a boss. This is not allowed.", name); + return false; + } + } + if (!sb) { + sb = &spawnMonsterMap.emplace(spawnMonsterId, spawnBlock_t()).first->second; + } + sb->monsterTypes.emplace(monsterType, weight); + sb->pos = pos; + sb->direction = dir; + sb->interval = scheduleInterval; + sb->lastSpawn = 0; return true; } void SpawnMonster::removeMonster(std::shared_ptr monster) { - for (auto it = spawnedMonsterMap.begin(), end = spawnedMonsterMap.end(); it != end; ++it) { - if (it->second == monster) { - spawnedMonsterMap.erase(it); + uint32_t spawnMonsterId = 0; + for (const auto &[id, m] : spawnedMonsterMap) { + if (m == monster) { + spawnMonsterId = id; break; } } + spawnedMonsterMap.erase(spawnMonsterId); } void SpawnMonster::setMonsterVariant(const std::string &variant) { for (auto &it : spawnMonsterMap) { - auto variantName = variant + it.second.monsterType->typeName; - auto variantType = g_monsters().getMonsterType(variantName, false); - it.second.monsterType = variantType ? variantType : it.second.monsterType; + std::unordered_map, uint32_t> monsterTypes; + for (const auto &[monsterType, weight] : it.second.monsterTypes) { + auto variantName = variant + monsterType->typeName; + auto variantType = g_monsters().getMonsterType(variantName, false); + monsterTypes.emplace(variantType, weight); + } + it.second.monsterTypes = monsterTypes; } } @@ -318,3 +383,44 @@ void SpawnMonster::stopEvent() { checkSpawnMonsterEvent = 0; } } + +std::shared_ptr spawnBlock_t::getMonsterType() const { + if (monsterTypes.empty()) { + return nullptr; + } + uint32_t totalWeight = 0; + for (const auto &[mType, weight] : monsterTypes) { + if (!mType) { + continue; + } + if (mType->isBoss()) { + if (monsterTypes.size() > 1) { + g_logger().warn("[SpawnMonster] Boss monster {} has been added to spawn block with other monsters. This is not allowed.", mType->name); + } + return mType; + } + totalWeight += weight; + } + uint32_t randomWeight = uniform_random(0, totalWeight - 1); + // order monsters by weight DESC + std::vector, uint32_t>> orderedMonsterTypes(monsterTypes.begin(), monsterTypes.end()); + std::sort(orderedMonsterTypes.begin(), orderedMonsterTypes.end(), [](const auto &a, const auto &b) { + return a.second > b.second; + }); + for (const auto &[mType, weight] : orderedMonsterTypes) { + if (randomWeight < weight) { + return mType; + } + randomWeight -= weight; + } + return nullptr; +} + +bool spawnBlock_t::hasBoss() const { + for (const auto &[monsterType, weight] : monsterTypes) { + if (monsterType->isBoss()) { + return true; + } + } + return false; +} diff --git a/src/creatures/monsters/spawns/spawn_monster.hpp b/src/creatures/monsters/spawns/spawn_monster.hpp index 749856525d9..9ea29e4f317 100644 --- a/src/creatures/monsters/spawns/spawn_monster.hpp +++ b/src/creatures/monsters/spawns/spawn_monster.hpp @@ -17,10 +17,13 @@ class MonsterType; struct spawnBlock_t { Position pos; - std::shared_ptr monsterType; + std::unordered_map, uint32_t> monsterTypes; int64_t lastSpawn; uint32_t interval; Direction direction; + + std::shared_ptr getMonsterType() const; + bool hasBoss() const; }; class SpawnMonster { @@ -33,13 +36,13 @@ class SpawnMonster { SpawnMonster(const SpawnMonster &) = delete; SpawnMonster &operator=(const SpawnMonster &) = delete; - bool addMonster(const std::string &name, const Position &pos, Direction dir, uint32_t interval); + bool addMonster(const std::string &name, const Position &pos, Direction dir, uint32_t interval, uint32_t weight = 1); void removeMonster(std::shared_ptr monster); uint32_t getInterval() const { return interval; } - void startup(); + void startup(bool delayed = false); void startSpawnMonsterCheck(); void stopEvent(); @@ -55,12 +58,10 @@ class SpawnMonster { private: // map of the spawned creatures - using SpawnedMap = std::multimap>; - using spawned_pair = SpawnedMap::value_type; - SpawnedMap spawnedMonsterMap; + phmap::parallel_flat_hash_map_m> spawnedMonsterMap; // map of creatures in the spawn - std::map spawnMonsterMap; + phmap::parallel_flat_hash_map_m spawnMonsterMap; Position centerPos; int32_t radius; @@ -69,9 +70,9 @@ class SpawnMonster { uint32_t checkSpawnMonsterEvent = 0; static bool findPlayer(const Position &pos); - bool spawnMonster(uint32_t spawnMonsterId, const std::shared_ptr monsterType, const Position &pos, Direction dir, bool startup = false); + bool spawnMonster(uint32_t spawnMonsterId, spawnBlock_t &sb, const std::shared_ptr monsterType, bool startup = false); void checkSpawnMonster(); - void scheduleSpawn(uint32_t spawnMonsterId, spawnBlock_t &sb, uint16_t interval); + void scheduleSpawn(uint32_t spawnMonsterId, spawnBlock_t &sb, const std::shared_ptr monsterType, uint16_t interval, bool startup = false); }; class SpawnsMonster { diff --git a/src/game/scheduling/task.hpp b/src/game/scheduling/task.hpp index 480072f427b..e02a1ce4056 100644 --- a/src/game/scheduling/task.hpp +++ b/src/game/scheduling/task.hpp @@ -96,6 +96,7 @@ class Task { "Raids::checkRaids", "SpawnMonster::checkSpawnMonster", "SpawnMonster::scheduleSpawn", + "SpawnMonster::startup", "SpawnNpc::checkSpawnNpc", "Webhook::run", "Protocol::sendRecvMessageCallback", diff --git a/src/pch.hpp b/src/pch.hpp index 04f692a0bf1..ea0233ee1a8 100644 --- a/src/pch.hpp +++ b/src/pch.hpp @@ -41,6 +41,7 @@ #include #include #include +#include // -------------------- // System Includes From 5ebad34bb63353f5029fd6e9392b4f1400327ee4 Mon Sep 17 00:00:00 2001 From: Luan Santos Date: Sun, 10 Dec 2023 10:36:39 -0800 Subject: [PATCH 14/28] feat: kv: remove key and list prefix (#1994) Adds a much needed `:remove()` method to the KV lua interface as well as a `:keys` method to list every key from a prefix. Fixes #1992 Related #1979 --- src/kv/kv.cpp | 21 ++++++++-- src/kv/kv.hpp | 10 ++++- src/kv/kv_sql.cpp | 20 +++++++++- src/kv/kv_sql.hpp | 1 + src/kv/value_wrapper.cpp | 17 +++++---- src/lua/functions/core/libs/kv_functions.cpp | 40 +++++++++++++++++++- src/lua/functions/core/libs/kv_functions.hpp | 6 +++ tests/fixture/kv/in_memory_kv.hpp | 3 ++ 8 files changed, 104 insertions(+), 14 deletions(-) diff --git a/src/kv/kv.cpp b/src/kv/kv.cpp index 0e2f4b2f836..f3133dec9ca 100644 --- a/src/kv/kv.cpp +++ b/src/kv/kv.cpp @@ -32,7 +32,7 @@ void KVStore::set(const std::string &key, const ValueWrapper &value) { } void KVStore::setLocked(const std::string &key, const ValueWrapper &value) { - logger.debug("KVStore::set({})", key); + logger.trace("KVStore::set({})", key); auto it = store_.find(key); if (it != store_.end()) { it->second.first = value; @@ -53,7 +53,7 @@ void KVStore::setLocked(const std::string &key, const ValueWrapper &value) { } std::optional KVStore::get(const std::string &key, bool forceLoad /*= false */) { - logger.debug("KVStore::get({})", key); + logger.trace("KVStore::get({})", key); std::scoped_lock lock(mutex_); if (forceLoad || !store_.contains(key)) { auto value = load(key); @@ -72,11 +72,26 @@ std::optional KVStore::get(const std::string &key, bool forceLoad return value; } +std::unordered_set KVStore::keys(const std::string &prefix /*= ""*/) { + std::scoped_lock lock(mutex_); + std::unordered_set keys; + for (const auto &[key, value] : store_) { + if (key.find(prefix) == 0) { + std::string suffix = key.substr(prefix.size()); + keys.insert(suffix); + } + } + for (const auto &key : loadPrefix(prefix)) { + keys.insert(key); + } + return keys; +} + void KV::remove(const std::string &key) { set(key, ValueWrapper::deleted()); } std::shared_ptr KVStore::scoped(const std::string &scope) { - logger.debug("KVStore::scoped({})", scope); + logger.trace("KVStore::scoped({})", scope); return std::make_shared(logger, *this, scope); } diff --git a/src/kv/kv.hpp b/src/kv/kv.hpp index 40fe449834f..99bc1f695a6 100644 --- a/src/kv/kv.hpp +++ b/src/kv/kv.hpp @@ -32,6 +32,8 @@ class KV : public std::enable_shared_from_this { virtual std::shared_ptr scoped(const std::string &scope) = 0; + virtual std::unordered_set keys(const std::string &prefix = "") = 0; + void remove(const std::string &key); virtual void flush() { @@ -60,6 +62,7 @@ class KVStore : public KV { } std::shared_ptr scoped(const std::string &scope) override final; + std::unordered_set keys(const std::string &prefix = ""); protected: phmap::parallel_flat_hash_map::iterator>> getStore() { @@ -76,6 +79,7 @@ class KVStore : public KV { virtual std::optional load(const std::string &key) = 0; virtual bool save(const std::string &key, const ValueWrapper &value) = 0; + virtual std::vector loadPrefix(const std::string &prefix = "") = 0; private: void setLocked(const std::string &key, const ValueWrapper &value); @@ -118,10 +122,14 @@ class ScopedKV final : public KV { } std::shared_ptr scoped(const std::string &scope) override final { - logger.debug("ScopedKV::scoped({})", buildKey(scope)); + logger.trace("ScopedKV::scoped({})", buildKey(scope)); return std::make_shared(logger, rootKV_, buildKey(scope)); } + std::unordered_set keys(const std::string &prefix = "") override { + return rootKV_.keys(buildKey(prefix)); + } + private: std::string buildKey(const std::string &key) const { return fmt::format("{}.{}", prefix_, key); diff --git a/src/kv/kv_sql.cpp b/src/kv/kv_sql.cpp index a0f1623ed2c..4784efa5c9e 100644 --- a/src/kv/kv_sql.cpp +++ b/src/kv/kv_sql.cpp @@ -41,6 +41,24 @@ std::optional KVSQL::load(const std::string &key) { return std::nullopt; } +std::vector KVSQL::loadPrefix(const std::string &prefix /* = ""*/) { + std::vector keys; + std::string keySearch = db.escapeString(prefix + "%"); + auto query = fmt::format("SELECT `key_name` FROM `kv_store` WHERE `key_name` LIKE {}", keySearch); + auto result = db.storeQuery(query); + if (result == nullptr) { + return keys; + } + + do { + std::string key = result->getString("key_name"); + replaceString(key, prefix, ""); + keys.push_back(key); + } while (result->next()); + + return keys; +} + bool KVSQL::save(const std::string &key, const ValueWrapper &value) { auto update = dbUpdate(); prepareSave(key, value, update); @@ -58,7 +76,7 @@ bool KVSQL::prepareSave(const std::string &key, const ValueWrapper &value, DBIns return db.executeQuery(query); } - update.addRow(fmt::format("{}, {}, {}", db.escapeString(key), getTimeMsNow(), db.escapeString(data))); + update.addRow(fmt::format("{}, {}, {}", db.escapeString(key), value.getTimestamp(), db.escapeString(data))); return true; } diff --git a/src/kv/kv_sql.hpp b/src/kv/kv_sql.hpp index 8cb4dce89f7..fd181b1cef7 100644 --- a/src/kv/kv_sql.hpp +++ b/src/kv/kv_sql.hpp @@ -25,6 +25,7 @@ class KVSQL final : public KVStore { bool saveAll() override; private: + std::vector loadPrefix(const std::string &prefix = "") override; std::optional load(const std::string &key) override; bool save(const std::string &key, const ValueWrapper &value) override; bool prepareSave(const std::string &key, const ValueWrapper &value, DBInsert &update); diff --git a/src/kv/value_wrapper.cpp b/src/kv/value_wrapper.cpp index 023beba1595..af304eeacad 100644 --- a/src/kv/value_wrapper.cpp +++ b/src/kv/value_wrapper.cpp @@ -1,30 +1,31 @@ #include "kv/value_wrapper.hpp" +#include "utils/tools.hpp" ValueWrapper::ValueWrapper(uint64_t timestamp) : - timestamp_(timestamp) { } + timestamp_(timestamp == 0 ? getTimeMsNow() : timestamp) { } ValueWrapper::ValueWrapper(const ValueVariant &value, uint64_t timestamp) : - data_(value), timestamp_(timestamp) { } + data_(value), timestamp_(timestamp == 0 ? getTimeMsNow() : timestamp) { } ValueWrapper::ValueWrapper(const std::string &value, uint64_t timestamp) : - data_(value), timestamp_(timestamp) { } + data_(value), timestamp_(timestamp == 0 ? getTimeMsNow() : timestamp) { } ValueWrapper::ValueWrapper(bool value, uint64_t timestamp) : - data_(value), timestamp_(timestamp) { } + data_(value), timestamp_(timestamp == 0 ? getTimeMsNow() : timestamp) { } ValueWrapper::ValueWrapper(int value, uint64_t timestamp) : - data_(value), timestamp_(timestamp) { } + data_(value), timestamp_(timestamp == 0 ? getTimeMsNow() : timestamp) { } ValueWrapper::ValueWrapper(double value, uint64_t timestamp) : - data_(value), timestamp_(timestamp) { } + data_(value), timestamp_(timestamp == 0 ? getTimeMsNow() : timestamp) { } ValueWrapper::ValueWrapper(const phmap::flat_hash_map &value, uint64_t timestamp) : data_(createMapFromRange(value.begin(), value.end(), timestamp)), - timestamp_(timestamp) { } + timestamp_(timestamp == 0 ? getTimeMsNow() : timestamp) { } ValueWrapper::ValueWrapper(const std::initializer_list> &init_list, uint64_t timestamp) : data_(createMapFromRange(init_list.begin(), init_list.end(), timestamp)), - timestamp_(timestamp) { } + timestamp_(timestamp == 0 ? getTimeMsNow() : timestamp) { } std::optional ValueWrapper::get(const std::string &key) const { auto pval = std::get_if(&data_); diff --git a/src/lua/functions/core/libs/kv_functions.cpp b/src/lua/functions/core/libs/kv_functions.cpp index 769c20bff8a..dbef916364d 100644 --- a/src/lua/functions/core/libs/kv_functions.cpp +++ b/src/lua/functions/core/libs/kv_functions.cpp @@ -72,7 +72,7 @@ int KVFunctions::luaKVGet(lua_State* L) { valueWrapper = g_kv().get(key, forceLoad); } - if (valueWrapper) { + if (valueWrapper.has_value()) { pushValueWrapper(L, *valueWrapper); } else { lua_pushnil(L); @@ -80,6 +80,44 @@ int KVFunctions::luaKVGet(lua_State* L) { return 1; } +int KVFunctions::luaKVRemove(lua_State* L) { + // KV.remove(key) | scopedKV:remove(key) + auto key = getString(L, -1); + if (isUserdata(L, 1)) { + auto scopedKV = getUserdataShared(L, 1); + scopedKV->remove(key); + } else { + g_kv().remove(key); + } + lua_pushnil(L); + return 1; +} + +int KVFunctions::luaKVKeys(lua_State* L) { + // KV.keys([prefix = ""]) | scopedKV:keys([prefix = ""]) + std::unordered_set keys; + std::string prefix = ""; + + if (isString(L, -1)) { + prefix = getString(L, -1); + } + + if (isUserdata(L, 1)) { + auto scopedKV = getUserdataShared(L, 1); + keys = scopedKV->keys(); + } else { + keys = g_kv().keys(prefix); + } + + int index = 0; + lua_createtable(L, static_cast(keys.size()), 0); + for (const auto &key : keys) { + pushString(L, key); + lua_rawseti(L, -2, ++index); + } + return 1; +} + std::optional KVFunctions::getValueWrapper(lua_State* L) { if (isBoolean(L, -1)) { return ValueWrapper(getBoolean(L, -1)); diff --git a/src/lua/functions/core/libs/kv_functions.hpp b/src/lua/functions/core/libs/kv_functions.hpp index 243a0ed36e3..3abddfb0b53 100644 --- a/src/lua/functions/core/libs/kv_functions.hpp +++ b/src/lua/functions/core/libs/kv_functions.hpp @@ -18,17 +18,23 @@ class KVFunctions final : LuaScriptInterface { registerMethod(L, "kv", "scoped", KVFunctions::luaKVScoped); registerMethod(L, "kv", "set", KVFunctions::luaKVSet); registerMethod(L, "kv", "get", KVFunctions::luaKVGet); + registerMethod(L, "kv", "keys", KVFunctions::luaKVKeys); + registerMethod(L, "kv", "remove", KVFunctions::luaKVRemove); registerClass(L, "KV", ""); registerMethod(L, "KV", "scoped", KVFunctions::luaKVScoped); registerMethod(L, "KV", "set", KVFunctions::luaKVSet); registerMethod(L, "KV", "get", KVFunctions::luaKVGet); + registerMethod(L, "KV", "keys", KVFunctions::luaKVKeys); + registerMethod(L, "KV", "remove", KVFunctions::luaKVRemove); } private: static int luaKVScoped(lua_State* L); static int luaKVSet(lua_State* L); static int luaKVGet(lua_State* L); + static int luaKVKeys(lua_State* L); + static int luaKVRemove(lua_State* L); static std::optional getValueWrapper(lua_State* L); static void pushStringValue(lua_State* L, const StringType &value); diff --git a/tests/fixture/kv/in_memory_kv.hpp b/tests/fixture/kv/in_memory_kv.hpp index b738a98470a..84a84ba8dff 100644 --- a/tests/fixture/kv/in_memory_kv.hpp +++ b/tests/fixture/kv/in_memory_kv.hpp @@ -35,6 +35,9 @@ class KVMemory final : public KVStore { } protected: + std::vector loadPrefix(const std::string &prefix = "") override { + return {}; + } std::optional load(const std::string &key) override { return std::nullopt; } From ad5c0c1114be31fd37b69c05a791b8d7af61b64e Mon Sep 17 00:00:00 2001 From: Luan Santos Date: Sun, 10 Dec 2023 15:09:21 -0800 Subject: [PATCH 15/28] fix: monster haste (#2011) --- src/creatures/monsters/monsters.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/creatures/monsters/monsters.cpp b/src/creatures/monsters/monsters.cpp index 9230d6bde58..463238e913a 100644 --- a/src/creatures/monsters/monsters.cpp +++ b/src/creatures/monsters/monsters.cpp @@ -121,8 +121,6 @@ bool Monsters::deserializeSpell(const std::shared_ptr spell, spell combatPtr->setParam(COMBAT_PARAM_TYPE, spell->combatType); } else if (spellName == "speed") { int32_t speedChange = 0; - int32_t speedChangeValue = 0; - int32_t speedChangeRange = 0; int32_t duration = 10000; if (spell->duration != 0) { @@ -146,9 +144,8 @@ bool Monsters::deserializeSpell(const std::shared_ptr spell, spell } std::shared_ptr condition = Condition::createCondition(CONDITIONID_COMBAT, conditionType, duration, 0)->static_self_cast(); - speedChangeRange = speedChange / 2; - speedChangeValue = uniform_random(speedChangeRange, speedChange); - condition->setFormulaVars(speedChangeValue / 1000.0, 40, speedChangeValue / 1000.0, 40); + float multiplier = 1.0f + static_cast(speedChange) / 1000.0f; + condition->setFormulaVars(multiplier / 2, 40, multiplier, 40); combatPtr->addCondition(condition); } else if (spellName == "outfit") { int32_t duration = 10000; From f0fcd2c39b175427ca5b77134ad595191f79271d Mon Sep 17 00:00:00 2001 From: Luan Santos Date: Sun, 10 Dec 2023 15:11:27 -0800 Subject: [PATCH 16/28] improve: datapack cleanup/refactor (#2008) - Fixes #1840 - Adds some missing achievements - Adds some missing mounts - Adds some missing outfits --- data-otservbr-global/lib/compat/compat.lua | 12 - data-otservbr-global/lib/core/storages.lua | 1 + .../lib/quests/the_primal_ordeal.lua | 3 + data-otservbr-global/npc/gnomadness.lua | 9 +- data-otservbr-global/npc/oberon's_bile.lua | 31 +- data-otservbr-global/npc/oberon's_hate.lua | 31 +- data-otservbr-global/npc/oberon's_ire.lua | 32 +- data-otservbr-global/npc/oberon's_spite.lua | 31 +- data-otservbr-global/npc/the_lootmonger.lua | 1341 +------------- data-otservbr-global/npc/undal.lua | 116 ++ data-otservbr-global/npc/vanys.lua | 116 ++ .../scripts/actions/addons/addons.lua | 3 + .../adventurers_guild/adventurers_stone.lua | 8 +- .../scripts/actions/farmine/oberon_lever.lua | 6 - .../actions/object/moonlight_crystals.lua | 18 +- .../scripts/actions/object/rope_down.lua | 19 +- .../scripts/actions/other/bag_you_covet.lua | 2 +- .../scripts/actions/other/dolls.lua | 6 + .../scripts/actions/other/music.lua | 4 +- .../scripts/actions/other/surprise_bag.lua | 2 +- .../scripts/actions/other/watch.lua | 2 +- .../iksupan_entrance.lua | 2 +- .../adventures_of_galthen/iksupan_exit.lua | 1 + .../lord_of_elements_lever.lua | 4 +- .../quests/elemental_spheres/machine2.lua | 2 +- .../quests/elemental_spheres/soils2.lua | 2 +- .../quests/ferumbras_ascendant/bone_flute.lua | 2 +- .../flower_puzzle_lever.lua | 6 +- .../ferumbras_ascendant/ragiaz_lever.lua | 29 +- .../quests/ferumbras_ascendant/sacrifice.lua | 2 +- .../ferumbras_ascendant/teleportation_rod.lua | 14 +- .../ferumbras_ascendant/zamulosh_lever.lua | 16 +- .../creaturescripts/customs/freequests.lua | 4 + .../customs/reward_exercise.lua | 4 +- .../creaturescripts/others/login_events.lua | 1 - .../quests/cults_of_tibia/leiden_heal.lua | 18 +- .../ferumbras_ascendant/bosses_kill.lua | 2 +- .../rift_invader_death.lua | 2 +- .../the_shatterer_kill.lua | 2 +- .../in_service_of_yalahar/azerus_kill.lua | 5 +- .../the_primal_ordeal/magma_bubble_death.lua | 17 +- .../globalevents/quests/demon_oak_voices.lua | 2 +- .../scripts/lib/register_actions.lua | 6 +- .../scripts/lib/register_spells.lua | 12 + data-otservbr-global/scripts/lib/shops.lua | 1604 +++++++++++++++++ .../scripts/movements/others/closing_door.lua | 5 +- .../the_gravedigger_of_drefia/teleport.lua | 10 +- .../magma_bubble_fight.lua | 6 +- .../the_primal_manace_lever.lua | 1 + .../quests/the_new_frontier/action-beaver.lua | 8 +- .../action-bounac_entrance.lua | 3 + data-otservbr-global/startup/tables/item.lua | 5 + data-otservbr-global/world/otservbr-npc.xml | 12 + data/events/scripts/player.lua | 10 +- data/global.lua | 11 +- data/items/items.xml | 2 + data/libs/achievements_lib.lua | 10 + data/libs/exercise_training.lua | 2 +- data/libs/functions/bosslever.lua | 19 +- data/libs/functions/creature.lua | 13 +- data/libs/functions/functions.lua | 4 - data/libs/functions/load.lua | 1 + data/libs/functions/party.lua | 55 + data/libs/functions/player.lua | 56 + data/libs/functions/queue.lua | 73 + data/libs/functions/string.lua | 13 + data/libs/functions/teleport.lua | 6 +- data/libs/hireling_lib.lua | 12 - data/libs/reward_boss/reward_boss.lua | 3 + data/modules/scripts/blessings/blessings.lua | 4 + data/npclib/npc.lua | 4 +- data/npclib/npc_system/modules.lua | 15 +- data/npclib/npc_system/npc_handler.lua | 19 +- .../monster/ondroploot__base.lua | 6 +- .../monster/ondroploot_boosted.lua | 13 +- .../monster/ondroploot_hazard.lua | 12 +- .../monster/ondroploot_prey.lua | 12 +- .../monster/ondroploot_wealth_duplex.lua | 12 +- .../monster/postdroploot_analyzer.lua | 5 +- .../talkactions/gm/teleport_to_player.lua | 2 +- data/scripts/talkactions/god/manage_kv.lua | 14 +- data/scripts/talkactions/god/zones.lua | 7 + data/scripts/talkactions/player/buy_house.lua | 4 + 83 files changed, 2355 insertions(+), 1666 deletions(-) create mode 100644 data-otservbr-global/scripts/lib/shops.lua create mode 100644 data/libs/functions/queue.lua diff --git a/data-otservbr-global/lib/compat/compat.lua b/data-otservbr-global/lib/compat/compat.lua index 1de91b5ab8a..5691dacdb75 100644 --- a/data-otservbr-global/lib/compat/compat.lua +++ b/data-otservbr-global/lib/compat/compat.lua @@ -788,18 +788,6 @@ function doSendAnimatedText() return true end -function doPlayerAddExp(cid, exp, useMult, ...) - local player = Player(cid) - if player == nil then - return false - end - - if useMult then - exp = exp * getRateFromTable(experienceStages, player:getLevel(), configManager.getNumber(configKeys.RATE_EXPERIENCE)) - end - return player:addExperience(exp, ...) -end - function doPlayerAddManaSpent(cid, mana) local p = Player(cid) return p and p:addManaSpent(mana) or false diff --git a/data-otservbr-global/lib/core/storages.lua b/data-otservbr-global/lib/core/storages.lua index 34928957379..12a7cdd33d1 100644 --- a/data-otservbr-global/lib/core/storages.lua +++ b/data-otservbr-global/lib/core/storages.lua @@ -2957,6 +2957,7 @@ GlobalStorage = { ZamuloshSummon = 60030, FerumbrasEssence = 60031, DesperateSoul = 60032, + FlowerPuzzleTimer = 60033, Crystals = { Crystal1 = 60040, Crystal2 = 60041, diff --git a/data-otservbr-global/lib/quests/the_primal_ordeal.lua b/data-otservbr-global/lib/quests/the_primal_ordeal.lua index 4b1dfdae2e3..de708ee4de2 100644 --- a/data-otservbr-global/lib/quests/the_primal_ordeal.lua +++ b/data-otservbr-global/lib/quests/the_primal_ordeal.lua @@ -7,8 +7,11 @@ function RegisterPrimalPackBeast(template) primalMonster.name = "Primal Pack Beast" primalMonster.description = "a primal pack beast" + primalMonster.health = primalMonster.health + primalMonster.maxHealth = primalMonster.maxHealth primalMonster.raceId = nil primalMonster.Bestiary = nil + primalMonster.corpse = 0 primal:register(primalMonster) end diff --git a/data-otservbr-global/npc/gnomadness.lua b/data-otservbr-global/npc/gnomadness.lua index f3dc522c51b..cedc37c2a2a 100644 --- a/data-otservbr-global/npc/gnomadness.lua +++ b/data-otservbr-global/npc/gnomadness.lua @@ -78,11 +78,18 @@ local function creatureSayCallback(npc, creature, type, message) local desiredLevel = getMoneyCount(message) if desiredLevel <= 0 then npcHandler:say("I'm sorry, I don't understand. What hazard level would you like to set?", npc, creature) - npcHandler:setTopic(playerId, 0) + npcHandler:setTopic(playerId, 2) return true end if hazard:setPlayerCurrentLevel(player, desiredLevel) then npcHandler:say("Your hazard level has been set to " .. desiredLevel .. ". Good luck!", npc, creature) + if desiredLevel >= hazard.maxLevel and not player:kv():scoped("primal-ordeal"):get("received-prize") then + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Congratulations you received the Noxious Ripptor mount.") + player:addMount(202) + npcHandler:say("You've achived the maximum hazard level. As a reward, you've received the Noxious Ripptor mount and a primal bag.", npc, creature) + player:addItem(PrimalBagId, 1) + player:kv():scoped("primal-ordeal"):set("received-prize", true) + end else npcHandler:say("You can't set your hazard level higher than your maximum unlocked level.", npc, creature) end diff --git a/data-otservbr-global/npc/oberon's_bile.lua b/data-otservbr-global/npc/oberon's_bile.lua index 6b3cf53ff97..c8750410753 100644 --- a/data-otservbr-global/npc/oberon's_bile.lua +++ b/data-otservbr-global/npc/oberon's_bile.lua @@ -11,41 +11,12 @@ npcConfig.walkInterval = 0 npcConfig.walkRadius = 2 npcConfig.outfit = { - lookTypeEx = 23991, + lookTypeEx = 10980, } npcConfig.flags = { floorchange = false, } -local keywordHandler = KeywordHandler:new() -local npcHandler = NpcHandler:new(keywordHandler) - -npcType.onThink = function(npc, interval) - npcHandler:onThink(npc, interval) -end - -npcType.onAppear = function(npc, creature) - npcHandler:onAppear(npc, creature) -end - -npcType.onDisappear = function(npc, creature) - npcHandler:onDisappear(npc, creature) -end - -npcType.onMove = function(npc, creature, fromPosition, toPosition) - npcHandler:onMove(npc, creature, fromPosition, toPosition) -end - -npcType.onSay = function(npc, creature, type, message) - npcHandler:onSay(npc, creature, type, message) -end - -npcType.onCloseChannel = function(npc, creature) - npcHandler:onCloseChannel(npc, creature) -end - -npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) - -- npcType registering the npcConfig table npcType:register(npcConfig) diff --git a/data-otservbr-global/npc/oberon's_hate.lua b/data-otservbr-global/npc/oberon's_hate.lua index e9d8858e00f..16ab2f35897 100644 --- a/data-otservbr-global/npc/oberon's_hate.lua +++ b/data-otservbr-global/npc/oberon's_hate.lua @@ -11,41 +11,12 @@ npcConfig.walkInterval = 0 npcConfig.walkRadius = 2 npcConfig.outfit = { - lookTypeEx = 23991, + lookTypeEx = 10980, } npcConfig.flags = { floorchange = false, } -local keywordHandler = KeywordHandler:new() -local npcHandler = NpcHandler:new(keywordHandler) - -npcType.onThink = function(npc, interval) - npcHandler:onThink(npc, interval) -end - -npcType.onAppear = function(npc, creature) - npcHandler:onAppear(npc, creature) -end - -npcType.onDisappear = function(npc, creature) - npcHandler:onDisappear(npc, creature) -end - -npcType.onMove = function(npc, creature, fromPosition, toPosition) - npcHandler:onMove(npc, creature, fromPosition, toPosition) -end - -npcType.onSay = function(npc, creature, type, message) - npcHandler:onSay(npc, creature, type, message) -end - -npcType.onCloseChannel = function(npc, creature) - npcHandler:onCloseChannel(npc, creature) -end - -npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) - -- npcType registering the npcConfig table npcType:register(npcConfig) diff --git a/data-otservbr-global/npc/oberon's_ire.lua b/data-otservbr-global/npc/oberon's_ire.lua index 4b0e1346684..8789977559d 100644 --- a/data-otservbr-global/npc/oberon's_ire.lua +++ b/data-otservbr-global/npc/oberon's_ire.lua @@ -11,41 +11,11 @@ npcConfig.walkInterval = 0 npcConfig.walkRadius = 2 npcConfig.outfit = { - lookTypeEx = 23991, + lookTypeEx = 11211, } npcConfig.flags = { floorchange = false, } -local keywordHandler = KeywordHandler:new() -local npcHandler = NpcHandler:new(keywordHandler) - -npcType.onThink = function(npc, interval) - npcHandler:onThink(npc, interval) -end - -npcType.onAppear = function(npc, creature) - npcHandler:onAppear(npc, creature) -end - -npcType.onDisappear = function(npc, creature) - npcHandler:onDisappear(npc, creature) -end - -npcType.onMove = function(npc, creature, fromPosition, toPosition) - npcHandler:onMove(npc, creature, fromPosition, toPosition) -end - -npcType.onSay = function(npc, creature, type, message) - npcHandler:onSay(npc, creature, type, message) -end - -npcType.onCloseChannel = function(npc, creature) - npcHandler:onCloseChannel(npc, creature) -end - -npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) - --- npcType registering the npcConfig table npcType:register(npcConfig) diff --git a/data-otservbr-global/npc/oberon's_spite.lua b/data-otservbr-global/npc/oberon's_spite.lua index 04198674f19..36e28d9b738 100644 --- a/data-otservbr-global/npc/oberon's_spite.lua +++ b/data-otservbr-global/npc/oberon's_spite.lua @@ -11,41 +11,12 @@ npcConfig.walkInterval = 0 npcConfig.walkRadius = 2 npcConfig.outfit = { - lookTypeEx = 23991, + lookTypeEx = 11212, } npcConfig.flags = { floorchange = false, } -local keywordHandler = KeywordHandler:new() -local npcHandler = NpcHandler:new(keywordHandler) - -npcType.onThink = function(npc, interval) - npcHandler:onThink(npc, interval) -end - -npcType.onAppear = function(npc, creature) - npcHandler:onAppear(npc, creature) -end - -npcType.onDisappear = function(npc, creature) - npcHandler:onDisappear(npc, creature) -end - -npcType.onMove = function(npc, creature, fromPosition, toPosition) - npcHandler:onMove(npc, creature, fromPosition, toPosition) -end - -npcType.onSay = function(npc, creature, type, message) - npcHandler:onSay(npc, creature, type, message) -end - -npcType.onCloseChannel = function(npc, creature) - npcHandler:onCloseChannel(npc, creature) -end - -npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) - -- npcType registering the npcConfig table npcType:register(npcConfig) diff --git a/data-otservbr-global/npc/the_lootmonger.lua b/data-otservbr-global/npc/the_lootmonger.lua index 7374b7645c2..cee60e6850f 100644 --- a/data-otservbr-global/npc/the_lootmonger.lua +++ b/data-otservbr-global/npc/the_lootmonger.lua @@ -52,1329 +52,26 @@ end npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) -npcConfig.shop = { - { itemName = "abomination's eye", clientId = 36792, sell = 650000 }, - { itemName = "abomination's tail", clientId = 36791, sell = 700000 }, - { itemName = "abomination's tongue", clientId = 36793, sell = 950000 }, - { itemName = "abyss hammer", clientId = 7414, sell = 20000 }, - { itemName = "acorn", clientId = 10296, sell = 10 }, - { itemName = "afflicted strider head", clientId = 36789, sell = 900 }, - { itemName = "afflicted strider worms", clientId = 36790, sell = 500 }, - { itemName = "albino plate", clientId = 19358, sell = 1500 }, - { itemName = "alloy legs", clientId = 21168, sell = 11000 }, - { itemName = "alptramun's toothbrush", clientId = 29943, sell = 270000 }, - { itemName = "amber staff", clientId = 7426, sell = 8000 }, - { itemName = "amber with a bug", clientId = 32624, sell = 41000 }, - { itemName = "amber with a dragonfly", clientId = 32625, sell = 56000 }, - { itemName = "amber", clientId = 32626, sell = 20000 }, - { itemName = "amulet of loss", clientId = 3057, sell = 45000 }, - { itemName = "ancient amulet", clientId = 3025, sell = 200 }, - { itemName = "ancient belt buckle", clientId = 24384, sell = 260 }, - { itemName = "ancient coin", clientId = 24390, sell = 350 }, - { itemName = "ancient liche bone", clientId = 31588, sell = 28000 }, - { itemName = "ancient shield", clientId = 3432, sell = 900 }, - { itemName = "ancient stone", clientId = 9632, sell = 200 }, - { itemName = "angel figurine", clientId = 32589, sell = 36000 }, - { itemName = "angelic axe", clientId = 7436, sell = 5000 }, - { itemName = "ankh", clientId = 3077, sell = 100 }, - { itemName = "antlers", clientId = 10297, sell = 50 }, - { itemName = "ape fur", clientId = 5883, sell = 120 }, - { itemName = "apron", clientId = 33933, sell = 1300 }, - { itemName = "arbalest", clientId = 5803, sell = 42000 }, - { itemName = "arcane staff", clientId = 3341, sell = 42000 }, - { itemName = "assassin dagger", clientId = 7404, sell = 20000 }, - { itemName = "axe ring", clientId = 3092, sell = 100 }, - { itemName = "axe", clientId = 3274, sell = 7 }, - { itemName = "baby seal doll", clientId = 7183, sell = 20000 }, - { itemName = "badger boots", clientId = 22086, sell = 7500 }, - { itemName = "badger fur", clientId = 903, sell = 15 }, - { itemName = "bamboo stick", clientId = 11445, sell = 30 }, - { itemName = "banana sash", clientId = 11511, sell = 55 }, - { itemName = "bandana", clientId = 5917, sell = 150 }, - { itemName = "bar of gold", clientId = 14112, sell = 10000 }, - { itemName = "basalt fetish", clientId = 17856, sell = 210 }, - { itemName = "basalt figurine", clientId = 17857, sell = 160 }, - { itemName = "bashmu fang", clientId = 36820, sell = 600 }, - { itemName = "bashmu feather", clientId = 36823, sell = 350 }, - { itemName = "bashmu tongue", clientId = 36821, sell = 400 }, - { itemName = "bat decoration", clientId = 6491, sell = 2000 }, - { itemName = "bat wing", clientId = 5894, sell = 50 }, - { itemName = "battle axe", clientId = 3266, sell = 80 }, - { itemName = "battle hammer", clientId = 3305, sell = 120 }, - { itemName = "battle shield", clientId = 3413, sell = 95 }, - { itemName = "battle stone", clientId = 11447, sell = 290 }, - { itemName = "batwing hat", clientId = 9103, sell = 8000 }, - { itemName = "bear paw", clientId = 5896, sell = 100 }, - { itemName = "beast's nightmare-cushion", clientId = 29946, sell = 630000 }, - { itemName = "beastslayer axe", clientId = 3344, sell = 1500 }, - { itemName = "bed of nails", clientId = 25743, sell = 500 }, - { itemName = "beer tap", clientId = 32114, sell = 50 }, - { itemName = "beetle carapace", clientId = 24381, sell = 200 }, - { itemName = "beetle necklace", clientId = 10457, sell = 1500 }, - { itemName = "behemoth claw", clientId = 5930, sell = 2000 }, - { itemName = "behemoth trophy", clientId = 7396, sell = 20000 }, - { itemName = "bejeweled ship's telescope", clientId = 9616, sell = 20000 }, - { itemName = "belted cape", clientId = 8044, sell = 500 }, - { itemName = "berserk potion", clientId = 7439, sell = 500 }, - { itemName = "berserker", clientId = 7403, sell = 40000 }, - { itemName = "black hood", clientId = 9645, sell = 190 }, - { itemName = "black pearl", clientId = 3027, sell = 280 }, - { itemName = "black shield", clientId = 3429, sell = 800 }, - { itemName = "black skull", clientId = 9056, sell = 4000 }, - { itemName = "black wool", clientId = 11448, sell = 300 }, - { itemName = "blacksteel sword", clientId = 7406, sell = 6000 }, - { itemName = "blade of corruption", clientId = 11693, sell = 60000 }, - { itemName = "blazing bone", clientId = 16131, sell = 610 }, - { itemName = "blemished spawn abdomen", clientId = 36779, sell = 550 }, - { itemName = "blemished spawn head", clientId = 36778, sell = 800 }, - { itemName = "blemished spawn tail", clientId = 36780, sell = 1000 }, - { itemName = "blessed sceptre", clientId = 7429, sell = 40000 }, - { itemName = "blood goblet", clientId = 8531, sell = 10000 }, - { itemName = "blood herb", clientId = 3734, sell = 500 }, - { itemName = "blood preservation", clientId = 11449, sell = 320 }, - { itemName = "blood tincture in a vial", clientId = 18928, sell = 360 }, - { itemName = "bloody dwarven beard", clientId = 17827, sell = 110 }, - { itemName = "bloody edge", clientId = 7416, sell = 30000 }, - { itemName = "bloody pincers", clientId = 9633, sell = 100 }, - { itemName = "bloody tears", clientId = 32594, sell = 70000 }, - { itemName = "blue crystal shard", clientId = 16119, sell = 1500 }, - { itemName = "blue crystal splinter", clientId = 16124, sell = 400 }, - { itemName = "blue gem", clientId = 3041, sell = 5000 }, - { itemName = "blue glass plate", clientId = 29345, sell = 60 }, - { itemName = "blue goanna scale", clientId = 31559, sell = 230 }, - { itemName = "blue legs", clientId = 645, sell = 15000 }, - { itemName = "blue piece of cloth", clientId = 5912, sell = 200 }, - { itemName = "blue robe", clientId = 3567, sell = 10000 }, - { itemName = "blue rose", clientId = 3659, sell = 250 }, - { itemName = "boar man hoof", clientId = 40584, sell = 600 }, - { itemName = "boggy dreads", clientId = 9667, sell = 200 }, - { itemName = "bola", clientId = 17809, sell = 35 }, - { itemName = "bone club", clientId = 3337, sell = 5 }, - { itemName = "bone fetish", clientId = 17831, sell = 150 }, - { itemName = "bone shield", clientId = 3441, sell = 80 }, - { itemName = "bone shoulderplate", clientId = 10404, sell = 150 }, - { itemName = "bone sword", clientId = 3338, sell = 20 }, - { itemName = "bone toothpick", clientId = 24380, sell = 150 }, - { itemName = "bonebeast trophy", clientId = 10244, sell = 6000 }, - { itemName = "bonebreaker", clientId = 7428, sell = 10000 }, - { itemName = "bonecarving knife", clientId = 17830, sell = 190 }, - { itemName = "bonelord eye", clientId = 5898, sell = 80 }, - { itemName = "bonelord helmet", clientId = 3408, sell = 7500 }, - { itemName = "bonelord shield", clientId = 3418, sell = 1200 }, - { itemName = "bones of zorvorax", clientId = 24942, sell = 10000 }, - { itemName = "bony tail", clientId = 10277, sell = 210 }, - { itemName = "book of necromantic rituals", clientId = 10320, sell = 180 }, - { itemName = "book of prayers", clientId = 9646, sell = 120 }, - { itemName = "book page", clientId = 28569, sell = 640 }, - { itemName = "boots of haste", clientId = 3079, sell = 30000 }, - { itemName = "bowl of terror sweat", clientId = 20204, sell = 500 }, - { itemName = "brain head's giant neuron", clientId = 32578, sell = 100000 }, - { itemName = "brain head's left hemisphere", clientId = 32579, sell = 90000 }, - { itemName = "brain head's right hemisphere", clientId = 32580, sell = 50000 }, - { itemName = "brainstealer's brain", clientId = 36795, sell = 300000 }, - { itemName = "brainstealer's brainwave", clientId = 36796, sell = 440000 }, - { itemName = "brainstealer's tissue", clientId = 36794, sell = 240000 }, - { itemName = "brass armor", clientId = 3359, sell = 150 }, - { itemName = "brass helmet", clientId = 3354, sell = 30 }, - { itemName = "brass legs", clientId = 3372, sell = 49 }, - { itemName = "brass shield", clientId = 3411, sell = 25 }, - { itemName = "bright bell", clientId = 30324, sell = 220 }, - { itemName = "bright sword", clientId = 3295, sell = 6000 }, - { itemName = "brimstone fangs", clientId = 11702, sell = 380 }, - { itemName = "brimstone shell", clientId = 11703, sell = 210 }, - { itemName = "broadsword", clientId = 3301, sell = 500 }, - { itemName = "broken bell", clientId = 30185, sell = 150 }, - { itemName = "broken crossbow", clientId = 11451, sell = 30 }, - { itemName = "broken draken mail", clientId = 11660, sell = 340 }, - { itemName = "broken gladiator shield", clientId = 9656, sell = 190 }, - { itemName = "broken halberd", clientId = 10418, sell = 100 }, - { itemName = "broken helmet", clientId = 11453, sell = 20 }, - { itemName = "broken iks cuirass", clientId = 40533, sell = 640 }, - { itemName = "broken iks faulds", clientId = 40531, sell = 530 }, - { itemName = "broken iks headpiece", clientId = 40532, sell = 560 }, - { itemName = "broken iks sandals", clientId = 40534, sell = 440 }, - { itemName = "broken key ring", clientId = 11652, sell = 8000 }, - { itemName = "broken longbow", clientId = 34161, sell = 130 }, - { itemName = "broken macuahuitl", clientId = 40530, sell = 1000 }, - { itemName = "broken ring of ending", clientId = 12737, sell = 4000 }, - { itemName = "broken shamanic staff", clientId = 11452, sell = 35 }, - { itemName = "broken slicer", clientId = 11661, sell = 120 }, - { itemName = "broken throwing axe", clientId = 17851, sell = 230 }, - { itemName = "broken visor", clientId = 20184, sell = 1900 }, - { itemName = "bronze amulet", clientId = 3056, sell = 50, count = 200 }, - { itemName = "brooch of embracement", clientId = 34023, sell = 14000 }, - { itemName = "brown crystal splinter", clientId = 16123, sell = 400 }, - { itemName = "brown giant shimmering pearl", clientId = 282, sell = 3000 }, - { itemName = "brown piece of cloth", clientId = 5913, sell = 100 }, - { itemName = "brutetamer's staff", clientId = 7379, sell = 1500 }, - { itemName = "buckle", clientId = 17829, sell = 7000 }, - { itemName = "bullseye potion", clientId = 7443, sell = 500 }, - { itemName = "bunch of ripe rice", clientId = 10328, sell = 75 }, - { itemName = "bunch of troll hair", clientId = 9689, sell = 30 }, - { itemName = "bundle of cursed straw", clientId = 9688, sell = 800 }, - { itemName = "butcher's axe", clientId = 7412, sell = 18000 }, - { itemName = "butterfly ring", clientId = 25698, sell = 2000 }, - { itemName = "calopteryx cape", clientId = 14086, sell = 15000 }, - { itemName = "capricious heart", clientId = 34138, sell = 2100 }, - { itemName = "capricious robe", clientId = 34145, sell = 1200 }, - { itemName = "carapace shield", clientId = 14088, sell = 32000 }, - { itemName = "carlin sword", clientId = 3283, sell = 118 }, - { itemName = "carniphila seeds", clientId = 10300, sell = 50 }, - { itemName = "carnisylvan bark", clientId = 36806, sell = 230 }, - { itemName = "carnisylvan finger", clientId = 36805, sell = 250 }, - { itemName = "carnivostrich feathers", clientId = 40586, sell = 550 }, - { itemName = "carrion worm fang", clientId = 10275, sell = 35 }, - { itemName = "castle shield", clientId = 3435, sell = 5000 }, - { itemName = "cat's paw", clientId = 5479, sell = 2000 }, - { itemName = "cave chimera head", clientId = 36787, sell = 1200 }, - { itemName = "cave chimera leg", clientId = 36788, sell = 650 }, - { itemName = "cave devourer eyes", clientId = 27599, sell = 550 }, - { itemName = "cave devourer legs", clientId = 27601, sell = 350 }, - { itemName = "cave devourer maw", clientId = 27600, sell = 600 }, - { itemName = "cavebear skull", clientId = 12316, sell = 550 }, - { itemName = "centipede leg", clientId = 10301, sell = 28 }, - { itemName = "ceremonial ankh", clientId = 6561, sell = 20000 }, - { itemName = "chain armor", clientId = 3358, sell = 70 }, - { itemName = "chain bolter", clientId = 8022, sell = 40000 }, - { itemName = "chain helmet", clientId = 3352, sell = 17 }, - { itemName = "chain legs", clientId = 3558, sell = 25 }, - { itemName = "chaos mace", clientId = 7427, sell = 9000 }, - { itemName = "chasm spawn abdomen", clientId = 27603, sell = 240 }, - { itemName = "chasm spawn head", clientId = 27602, sell = 850 }, - { itemName = "chasm spawn tail", clientId = 27604, sell = 120 }, - { itemName = "cheese cutter", clientId = 17817, sell = 50 }, - { itemName = "cheesy figurine", clientId = 17818, sell = 150 }, - { itemName = "cheesy membership card", clientId = 35614, sell = 120000 }, - { itemName = "chicken feather", clientId = 5890, sell = 30 }, - { itemName = "chitinous mouth", clientId = 27626, sell = 10000 }, - { itemName = "chitinous mouth", clientId = 27622, sell = 10000 }, - { itemName = "claw of 'the noxious spawn'", clientId = 9392, sell = 15000 }, - { itemName = "cliff strider claw", clientId = 16134, sell = 800 }, - { itemName = "closed trap", clientId = 3481, sell = 75 }, - { itemName = "club ring", clientId = 3093, sell = 100 }, - { itemName = "club", clientId = 3270, sell = 1 }, - { itemName = "cluster of solace", clientId = 20062, sell = 500 }, - { itemName = "coal", clientId = 12600, sell = 20 }, - { itemName = "coat", clientId = 3562, sell = 1 }, - { itemName = "cobra crest", clientId = 31678, sell = 650 }, - { itemName = "cobra crown", clientId = 11674, sell = 50000 }, - { itemName = "cobra tongue", clientId = 9634, sell = 15 }, - { itemName = "coconut shoes", clientId = 9017, sell = 500 }, - { itemName = "collar of blue plasma", clientId = 23542, sell = 6000 }, - { itemName = "collar of green plasma", clientId = 23543, sell = 6000 }, - { itemName = "collar of red plasma", clientId = 23544, sell = 6000 }, - { itemName = "colourful feather", clientId = 11514, sell = 110 }, - { itemName = "colourful feathers", clientId = 25089, sell = 400 }, - { itemName = "colourful snail shell", clientId = 25696, sell = 250 }, - { itemName = "compass", clientId = 10302, sell = 45 }, - { itemName = "composite hornbow", clientId = 8027, sell = 25000 }, - { itemName = "compound eye", clientId = 14083, sell = 150 }, - { itemName = "condensed energy", clientId = 23501, sell = 260 }, - { itemName = "copper shield", clientId = 3430, sell = 50 }, - { itemName = "coral branch", clientId = 39406, sell = 360 }, - { itemName = "coral brooch", clientId = 24391, sell = 750 }, - { itemName = "corrupt naga scales", clientId = 39415, sell = 570 }, - { itemName = "corrupted flag", clientId = 10409, sell = 700 }, - { itemName = "countess sorrow's frozen tear", clientId = 6536, sell = 50000 }, - { itemName = "cow bell", clientId = 32012, sell = 120 }, - { itemName = "cowbell", clientId = 21204, sell = 210 }, - { itemName = "cowtana", clientId = 21177, sell = 2500 }, - { itemName = "crab man claw", clientId = 40582, sell = 550 }, - { itemName = "crab pincers", clientId = 10272, sell = 35 }, - { itemName = "cracked alabaster vase", clientId = 24385, sell = 180 }, - { itemName = "cranial basher", clientId = 7415, sell = 30000 }, - { itemName = "crawler head plating", clientId = 14079, sell = 210 }, - { itemName = "crawler's essence", clientId = 33982, sell = 3700 }, - { itemName = "crest of the deep seas", clientId = 21892, sell = 10000 }, - { itemName = "crocodile boots", clientId = 3556, sell = 1000 }, - { itemName = "crowbar", clientId = 3304, sell = 50 }, - { itemName = "crown armor", clientId = 3381, sell = 12000 }, - { itemName = "crown helmet", clientId = 3385, sell = 2500 }, - { itemName = "crown legs", clientId = 3382, sell = 12000 }, - { itemName = "crown shield", clientId = 3419, sell = 8000 }, - { itemName = "crown", clientId = 33935, sell = 2700 }, - { itemName = "cruelty's chest", clientId = 33923, sell = 720000 }, - { itemName = "cruelty's claw", clientId = 33922, sell = 640000 }, - { itemName = "crunor idol", clientId = 30055, sell = 30000 }, - { itemName = "crusader helmet", clientId = 3391, sell = 6000 }, - { itemName = "cry-stal", clientId = 39394, sell = 3200 }, - { itemName = "crystal ball", clientId = 3076, sell = 190 }, - { itemName = "crystal bone", clientId = 23521, sell = 250 }, - { itemName = "crystal crossbow", clientId = 16163, sell = 35000 }, - { itemName = "crystal mace", clientId = 3333, sell = 12000 }, - { itemName = "crystal necklace", clientId = 3008, sell = 400 }, - { itemName = "crystal of balance", clientId = 9028, sell = 1000 }, - { itemName = "crystal of focus", clientId = 9027, sell = 2000 }, - { itemName = "crystal of power", clientId = 9067, sell = 3000 }, - { itemName = "crystal pedestal", clientId = 9063, sell = 500 }, - { itemName = "crystal ring", clientId = 3007, sell = 250 }, - { itemName = "crystal sword", clientId = 7449, sell = 600 }, - { itemName = "crystal wand", clientId = 3068, sell = 10000 }, - { itemName = "crystalline armor", clientId = 8050, sell = 16000 }, - { itemName = "crystalline spikes", clientId = 16138, sell = 440 }, - { itemName = "crystalline sword", clientId = 16160, sell = 2000 }, - { itemName = "crystallized anger", clientId = 23507, sell = 400 }, - { itemName = "cultish mask", clientId = 9638, sell = 280 }, - { itemName = "cultish robe", clientId = 9639, sell = 150 }, - { itemName = "cultish symbol", clientId = 11455, sell = 500 }, - { itemName = "curious matter", clientId = 23511, sell = 430 }, - { itemName = "curl of hair", clientId = 36809, sell = 320000 }, - { itemName = "cursed bone", clientId = 32774, sell = 6000 }, - { itemName = "cursed shoulder spikes", clientId = 10410, sell = 320 }, - { itemName = "cyan crystal fragment", clientId = 16125, sell = 800 }, - { itemName = "cyclops toe", clientId = 9657, sell = 55 }, - { itemName = "cyclops trophy", clientId = 7398, sell = 500 }, - { itemName = "daedal chisel", clientId = 40522, sell = 480 }, - { itemName = "dagger", clientId = 3267, sell = 2 }, - { itemName = "damaged armor plates", clientId = 28822, sell = 280 }, - { itemName = "damaged worm head", clientId = 27620, sell = 8000 }, - { itemName = "damselfly eye", clientId = 17463, sell = 25 }, - { itemName = "damselfly wing", clientId = 17458, sell = 20 }, - { itemName = "dandelion seeds", clientId = 25695, sell = 200 }, - { itemName = "dangerous proto matter", clientId = 23515, sell = 300 }, - { itemName = "daramian mace", clientId = 3327, sell = 110 }, - { itemName = "daramian waraxe", clientId = 3328, sell = 1000 }, - { itemName = "dark armor", clientId = 3383, sell = 400 }, - { itemName = "dark bell", clientId = 32596, sell = 310000 }, - { itemName = "dark bell", clientId = 30325, sell = 250 }, - { itemName = "dark helmet", clientId = 3384, sell = 250 }, - { itemName = "dark mushroom", clientId = 3728, sell = 100 }, - { itemName = "dark rosary", clientId = 10303, sell = 48 }, - { itemName = "dark shield", clientId = 3421, sell = 400 }, - { itemName = "dead weight", clientId = 20202, sell = 450 }, - { itemName = "death ring", clientId = 6299, sell = 1000 }, - { itemName = "death toll", clientId = 32703, sell = 1000 }, - { itemName = "deepling axe", clientId = 13991, sell = 40000 }, - { itemName = "deepling breaktime snack", clientId = 14011, sell = 90 }, - { itemName = "deepling claw", clientId = 14044, sell = 430 }, - { itemName = "deepling guard belt buckle", clientId = 14010, sell = 230 }, - { itemName = "deepling ridge", clientId = 14041, sell = 360 }, - { itemName = "deepling scales", clientId = 14017, sell = 80 }, - { itemName = "deepling squelcher", clientId = 14250, sell = 7000 }, - { itemName = "deepling staff", clientId = 13987, sell = 4000 }, - { itemName = "deepling warts", clientId = 14012, sell = 180 }, - { itemName = "deeptags", clientId = 14013, sell = 290 }, - { itemName = "deepworm jaws", clientId = 27594, sell = 500 }, - { itemName = "deepworm spike roots", clientId = 27593, sell = 650 }, - { itemName = "deepworm spikes", clientId = 27592, sell = 800 }, - { itemName = "deer trophy", clientId = 7397, sell = 3000 }, - { itemName = "demon dust", clientId = 5526, sell = 300 }, - { itemName = "demon dust", clientId = 5906, sell = 300 }, - { itemName = "demon helmet", clientId = 3387, sell = 40000 }, - { itemName = "demon horn", clientId = 5954, sell = 1000 }, - { itemName = "demon shield", clientId = 3420, sell = 30000 }, - { itemName = "demon trophy", clientId = 7393, sell = 40000 }, - { itemName = "demonbone amulet", clientId = 3019, sell = 32000 }, - { itemName = "demonic essence", clientId = 6499, sell = 1000 }, - { itemName = "demonic finger", clientId = 12541, sell = 1000 }, - { itemName = "demonic skeletal hand", clientId = 9647, sell = 80 }, - { itemName = "demonrage sword", clientId = 7382, sell = 36000 }, - { itemName = "depth calcei", clientId = 13997, sell = 25000 }, - { itemName = "depth galea", clientId = 13995, sell = 35000 }, - { itemName = "depth lorica", clientId = 13994, sell = 30000 }, - { itemName = "depth ocrea", clientId = 13996, sell = 16000 }, - { itemName = "depth scutum", clientId = 13998, sell = 36000 }, - { itemName = "devil helmet", clientId = 3356, sell = 1000 }, - { itemName = "diabolic skull", clientId = 34025, sell = 19000 }, - { itemName = "diamond sceptre", clientId = 7387, sell = 3000 }, - { itemName = "diamond", clientId = 32770, sell = 15000 }, - { itemName = "diremaw brainpan", clientId = 27597, sell = 350 }, - { itemName = "diremaw legs", clientId = 27598, sell = 270 }, - { itemName = "dirty turban", clientId = 11456, sell = 120 }, - { itemName = "disgusting trophy", clientId = 10421, sell = 3000 }, - { itemName = "distorted heart", clientId = 34142, sell = 2100 }, - { itemName = "distorted robe", clientId = 34149, sell = 1200 }, - { itemName = "divine plate", clientId = 8057, sell = 55000 }, - { itemName = "djinn blade", clientId = 3339, sell = 15000 }, - { itemName = "doll", clientId = 2991, sell = 200 }, - { itemName = "double axe", clientId = 3275, sell = 260 }, - { itemName = "doublet", clientId = 3379, sell = 3 }, - { itemName = "downy feather", clientId = 11684, sell = 20 }, - { itemName = "dowser", clientId = 19110, sell = 35 }, - { itemName = "drachaku", clientId = 10391, sell = 10000 }, - { itemName = "dracola's eye", clientId = 6546, sell = 50000 }, - { itemName = "dracoyle statue", clientId = 9034, sell = 5000 }, - { itemName = "dragon blood", clientId = 24937, sell = 700 }, - { itemName = "dragon claw", clientId = 5919, sell = 8000 }, - { itemName = "dragon figurine", clientId = 30053, sell = 45000 }, - { itemName = "dragon hammer", clientId = 3322, sell = 2000 }, - { itemName = "dragon lance", clientId = 3302, sell = 9000 }, - { itemName = "dragon lord trophy", clientId = 7399, sell = 10000 }, - { itemName = "dragon necklace", clientId = 3085, sell = 100, count = 200 }, - { itemName = "dragon priest's wandtip", clientId = 10444, sell = 175 }, - { itemName = "dragon robe", clientId = 8039, sell = 50000 }, - { itemName = "dragon scale mail", clientId = 3386, sell = 40000 }, - { itemName = "dragon shield", clientId = 3416, sell = 4000 }, - { itemName = "dragon slayer", clientId = 7402, sell = 15000 }, - { itemName = "dragon tongue", clientId = 24938, sell = 550 }, - { itemName = "dragon's tail", clientId = 11457, sell = 100 }, - { itemName = "dragonbone staff", clientId = 7430, sell = 3000 }, - { itemName = "draken boots", clientId = 4033, sell = 40000 }, - { itemName = "draken sulphur", clientId = 11658, sell = 550 }, - { itemName = "draken trophy", clientId = 10398, sell = 15000 }, - { itemName = "draken wristbands", clientId = 11659, sell = 430 }, - { itemName = "drakinata", clientId = 10388, sell = 10000 }, - { itemName = "draptor scales", clientId = 12309, sell = 800 }, - { itemName = "dreaded cleaver", clientId = 7419, sell = 15000 }, - { itemName = "dream blossom staff", clientId = 25700, sell = 5000 }, - { itemName = "dream essence egg", clientId = 30005, sell = 205 }, - { itemName = "dung ball", clientId = 14225, sell = 130 }, - { itemName = "dwarven armor", clientId = 3397, sell = 30000 }, - { itemName = "dwarven axe", clientId = 3323, sell = 1500 }, - { itemName = "dwarven legs", clientId = 3398, sell = 40000 }, - { itemName = "dwarven ring", clientId = 3097, sell = 100 }, - { itemName = "dwarven shield", clientId = 3425, sell = 100 }, - { itemName = "earflap", clientId = 17819, sell = 40 }, - { itemName = "ectoplasmic sushi", clientId = 11681, sell = 300 }, - { itemName = "egg of the many", clientId = 9606, sell = 15000 }, - { itemName = "elder bonelord tentacle", clientId = 10276, sell = 150 }, - { itemName = "eldritch crystal", clientId = 36835, sell = 48000 }, - { itemName = "elite draken mail", clientId = 11651, sell = 50000 }, - { itemName = "elven amulet", clientId = 3082, sell = 100, count = 50 }, - { itemName = "elven astral observer", clientId = 11465, sell = 90 }, - { itemName = "elven hoof", clientId = 18994, sell = 115 }, - { itemName = "elven scouting glass", clientId = 11464, sell = 50 }, - { itemName = "elvish bow", clientId = 7438, sell = 2000 }, - { itemName = "elvish talisman", clientId = 9635, sell = 45 }, - { itemName = "emerald bangle", clientId = 3010, sell = 800 }, - { itemName = "emerald tortoise shell", clientId = 39379, sell = 2150 }, - { itemName = "empty honey glass", clientId = 31331, sell = 270 }, - { itemName = "empty potion flask", clientId = 283, sell = 5 }, - { itemName = "empty potion flask", clientId = 284, sell = 5 }, - { itemName = "empty potion flask", clientId = 285, sell = 5 }, - { itemName = "enchanted chicken wing", clientId = 5891, sell = 20000 }, - { itemName = "energy ball", clientId = 23523, sell = 300 }, - { itemName = "energy ring", clientId = 3051, sell = 100 }, - { itemName = "energy soil", clientId = 945, sell = 2000 }, - { itemName = "energy vein", clientId = 23508, sell = 270 }, - { itemName = "enigmatic voodoo skull", clientId = 5669, sell = 4000 }, - { itemName = "ensouled essence", clientId = 32698, sell = 820 }, - { itemName = "epee", clientId = 3326, sell = 8000 }, - { itemName = "essence of a bad dream", clientId = 10306, sell = 360 }, - { itemName = "ethno coat", clientId = 8064, sell = 200 }, - { itemName = "eternal flames", clientId = 946, sell = 5000 }, - { itemName = "execowtioner axe", clientId = 21176, sell = 12000 }, - { itemName = "execowtioner mask", clientId = 21201, sell = 240 }, - { itemName = "executioner", clientId = 7453, sell = 55000 }, - { itemName = "explorer brooch", clientId = 4871, sell = 50 }, - { itemName = "eye of a deepling", clientId = 12730, sell = 150 }, - { itemName = "eye of a weeper", clientId = 16132, sell = 650 }, - { itemName = "eye of corruption", clientId = 11671, sell = 390 }, - { itemName = "eyeless devourer legs", clientId = 36776, sell = 650 }, - { itemName = "eyeless devourer maw", clientId = 36775, sell = 420 }, - { itemName = "eyeless devourer tongue", clientId = 36777, sell = 900 }, - { itemName = "fafnar symbol", clientId = 31443, sell = 950 }, - { itemName = "fairy wings", clientId = 25694, sell = 200 }, - { itemName = "falcon crest", clientId = 28823, sell = 650 }, - { itemName = "fern", clientId = 3737, sell = 20 }, - { itemName = "fiery heart", clientId = 9636, sell = 375 }, - { itemName = "fiery tear", clientId = 39040, sell = 1070000 }, - { itemName = "fig leaf", clientId = 25742, sell = 200 }, - { itemName = "figurine of cruelty", clientId = 34019, sell = 3100000 }, - { itemName = "figurine of greed", clientId = 34021, sell = 2900000 }, - { itemName = "figurine of hatred", clientId = 34020, sell = 2700000 }, - { itemName = "figurine of malice", clientId = 34018, sell = 2800000 }, - { itemName = "figurine of megalomania", clientId = 33953, sell = 5000000 }, - { itemName = "figurine of spite", clientId = 33952, sell = 3000000 }, - { itemName = "fir cone", clientId = 19111, sell = 25 }, - { itemName = "fire axe", clientId = 3320, sell = 8000 }, - { itemName = "fire mushroom", clientId = 3731, sell = 200 }, - { itemName = "fire sword", clientId = 3280, sell = 4000 }, - { itemName = "first verse of the hymn", clientId = 6087, sell = 100 }, - { itemName = "fish fin", clientId = 5895, sell = 150 }, - { itemName = "fishing rod", clientId = 3483, sell = 40 }, - { itemName = "flask of embalming fluid", clientId = 11466, sell = 30 }, - { itemName = "flask of warrior's sweat", clientId = 5885, sell = 10000 }, - { itemName = "flawless ice crystal", clientId = 942, sell = 5000 }, - { itemName = "flintstone", clientId = 12806, sell = 800 }, - { itemName = "flotsam", clientId = 39407, sell = 330 }, - { itemName = "flower dress", clientId = 9015, sell = 1000 }, - { itemName = "flower wreath", clientId = 9013, sell = 500 }, - { itemName = "focus cape", clientId = 8043, sell = 6000 }, - { itemName = "fourth verse of the hymn", clientId = 6090, sell = 800 }, - { itemName = "fox paw", clientId = 27462, sell = 100 }, - { itemName = "frazzle skin", clientId = 20199, sell = 400 }, - { itemName = "frazzle tongue", clientId = 20198, sell = 700 }, - { itemName = "frost giant pelt", clientId = 9658, sell = 160 }, - { itemName = "frosty ear of a troll", clientId = 9648, sell = 30 }, - { itemName = "frosty heart", clientId = 9661, sell = 280 }, - { itemName = "frozen lightning", clientId = 23519, sell = 270 }, - { itemName = "frozen starlight", clientId = 3249, sell = 20000 }, - { itemName = "fur armor", clientId = 22085, sell = 5000 }, - { itemName = "fur boots", clientId = 7457, sell = 2000 }, - { itemName = "fur shred", clientId = 34164, sell = 200 }, - { itemName = "furry club", clientId = 7432, sell = 1000 }, - { itemName = "garlic necklace", clientId = 3083, sell = 50 }, - { itemName = "gauze bandage", clientId = 9649, sell = 90 }, - { itemName = "gear crystal", clientId = 9655, sell = 200 }, - { itemName = "gear wheel", clientId = 8775, sell = 500 }, - { itemName = "gearwheel chain", clientId = 21170, sell = 5000 }, - { itemName = "gemmed figurine", clientId = 24392, sell = 3500 }, - { itemName = "geomancer's robe", clientId = 11458, sell = 80 }, - { itemName = "geomancer's staff", clientId = 11463, sell = 120 }, - { itemName = "ghastly dragon head", clientId = 10449, sell = 700 }, - { itemName = "ghostly tissue", clientId = 9690, sell = 90 }, - { itemName = "ghoul snack", clientId = 11467, sell = 60 }, - { itemName = "giant amethyst", clientId = 32622, sell = 60000 }, - { itemName = "giant crab pincer", clientId = 12317, sell = 950 }, - { itemName = "giant emerald", clientId = 30060, sell = 90000 }, - { itemName = "giant eye", clientId = 10280, sell = 380 }, - { itemName = "giant pacifier", clientId = 21199, sell = 170 }, - { itemName = "giant ruby", clientId = 30059, sell = 70000 }, - { itemName = "giant sapphire", clientId = 30061, sell = 50000 }, - { itemName = "giant sword", clientId = 3281, sell = 17000 }, - { itemName = "giant tentacle", clientId = 27619, sell = 10000 }, - { itemName = "giant topaz", clientId = 32623, sell = 80000 }, - { itemName = "girlish hair decoration", clientId = 11443, sell = 30 }, - { itemName = "girtablilu warrior carapace", clientId = 36971, sell = 520 }, - { itemName = "glacial rod", clientId = 16118, sell = 6500 }, - { itemName = "glacier amulet", clientId = 815, sell = 1500 }, - { itemName = "glacier kilt", clientId = 823, sell = 11000 }, - { itemName = "glacier mask", clientId = 829, sell = 2500 }, - { itemName = "glacier robe", clientId = 824, sell = 11000 }, - { itemName = "glacier shoes", clientId = 819, sell = 2500 }, - { itemName = "gland", clientId = 8143, sell = 500 }, - { itemName = "glistening bone", clientId = 23522, sell = 250 }, - { itemName = "glob of acid slime", clientId = 9054, sell = 25 }, - { itemName = "glob of glooth", clientId = 21182, sell = 125 }, - { itemName = "glob of mercury", clientId = 9053, sell = 20 }, - { itemName = "glob of tar", clientId = 9055, sell = 30 }, - { itemName = "gloom wolf fur", clientId = 22007, sell = 70 }, - { itemName = "glooth amulet", clientId = 21183, sell = 2000 }, - { itemName = "glooth axe", clientId = 21180, sell = 1500 }, - { itemName = "glooth blade", clientId = 21179, sell = 1500 }, - { itemName = "glooth cap", clientId = 21164, sell = 7000 }, - { itemName = "glooth club", clientId = 21178, sell = 1500 }, - { itemName = "glooth injection tube", clientId = 21103, sell = 350 }, - { itemName = "glooth whip", clientId = 21172, sell = 2500 }, - { itemName = "glorious axe", clientId = 7454, sell = 3000 }, - { itemName = "glowing rune", clientId = 28570, sell = 350 }, - { itemName = "goanna claw", clientId = 31561, sell = 260 }, - { itemName = "goanna meat", clientId = 31560, sell = 190 }, - { itemName = "goat grass", clientId = 3674, sell = 50 }, - { itemName = "goblet of gloom", clientId = 34022, sell = 12000 }, - { itemName = "goblin ear", clientId = 11539, sell = 20 }, - { itemName = "gold ingot", clientId = 9058, sell = 5000 }, - { itemName = "gold nugget", clientId = 3040, sell = 850 }, - { itemName = "gold ring", clientId = 3063, sell = 8000 }, - { itemName = "gold-brocaded cloth", clientId = 40529, sell = 175 }, - { itemName = "golden amulet", clientId = 3013, sell = 2000 }, - { itemName = "golden armor", clientId = 3360, sell = 20000 }, - { itemName = "golden brush", clientId = 25689, sell = 250 }, - { itemName = "golden cheese wedge", clientId = 35581, sell = 6000 }, - { itemName = "golden dustbin", clientId = 35579, sell = 7000 }, - { itemName = "golden fafnar trophy", clientId = 9626, sell = 10000 }, - { itemName = "golden figurine", clientId = 5799, sell = 3000 }, - { itemName = "golden legs", clientId = 3364, sell = 30000 }, - { itemName = "golden lotus brooch", clientId = 21974, sell = 270 }, - { itemName = "golden mask", clientId = 31324, sell = 38000 }, - { itemName = "golden mug", clientId = 2903, sell = 250 }, - { itemName = "golden sickle", clientId = 3306, sell = 1000 }, - { itemName = "golden skull", clientId = 35580, sell = 9000 }, - { itemName = "goo shell", clientId = 19372, sell = 4000 }, - { itemName = "goosebump leather", clientId = 20205, sell = 650 }, - { itemName = "gore horn", clientId = 39377, sell = 2900 }, - { itemName = "gorerilla mane", clientId = 39392, sell = 2750 }, - { itemName = "gorerilla tail", clientId = 39393, sell = 2650 }, - { itemName = "grant of arms", clientId = 28824, sell = 950 }, - { itemName = "grappling hook", clientId = 35588, sell = 150 }, - { itemName = "grasshopper legs", clientId = 14087, sell = 15000 }, - { itemName = "grave flower", clientId = 3661, sell = 25 }, - { itemName = "greed's arm", clientId = 33924, sell = 950000 }, - { itemName = "green bandage", clientId = 25697, sell = 180 }, - { itemName = "green crystal fragment", clientId = 16127, sell = 800 }, - { itemName = "green crystal shard", clientId = 16121, sell = 1500 }, - { itemName = "green crystal splinter", clientId = 16122, sell = 400 }, - { itemName = "green dragon leather", clientId = 5877, sell = 100 }, - { itemName = "green dragon scale", clientId = 5920, sell = 100 }, - { itemName = "green gem", clientId = 3038, sell = 5000 }, - { itemName = "green giant shimmering pearl", clientId = 281, sell = 3000 }, - { itemName = "green glass plate", clientId = 29346, sell = 180 }, - { itemName = "green mushroom", clientId = 3732, sell = 100 }, - { itemName = "green piece of cloth", clientId = 5910, sell = 200 }, - { itemName = "greenwood coat", clientId = 8041, sell = 50000 }, - { itemName = "griffin shield", clientId = 3433, sell = 3000 }, - { itemName = "grimace", clientId = 32593, sell = 120000 }, - { itemName = "gruesome fan", clientId = 34024, sell = 15000 }, - { itemName = "guardian axe", clientId = 14043, sell = 9000 }, - { itemName = "guardian boots", clientId = 10323, sell = 35000 }, - { itemName = "guardian halberd", clientId = 3315, sell = 11000 }, - { itemName = "guardian shield", clientId = 3415, sell = 2000 }, - { itemName = "guidebook", clientId = 25745, sell = 200 }, - { itemName = "hailstorm rod", clientId = 3067, sell = 3000 }, - { itemName = "hair of a banshee", clientId = 11446, sell = 350 }, - { itemName = "halberd", clientId = 3269, sell = 400 }, - { itemName = "half-digested piece of meat", clientId = 10283, sell = 55 }, - { itemName = "half-digested stones", clientId = 27369, sell = 40 }, - { itemName = "half-eaten brain", clientId = 9659, sell = 85 }, - { itemName = "hammer of wrath", clientId = 3332, sell = 30000 }, - { itemName = "hand axe", clientId = 3268, sell = 4 }, - { itemName = "hand", clientId = 33936, sell = 1450 }, - { itemName = "hardened bone", clientId = 5925, sell = 70 }, - { itemName = "harpoon of a giant snail", clientId = 27625, sell = 15000 }, - { itemName = "harpy feathers", clientId = 40585, sell = 730 }, - { itemName = "hatched rorc egg", clientId = 18997, sell = 30 }, - { itemName = "hatchet", clientId = 3276, sell = 25 }, - { itemName = "haunted blade", clientId = 7407, sell = 8000 }, - { itemName = "haunted piece of wood", clientId = 9683, sell = 115 }, - { itemName = "hazardous heart", clientId = 34140, sell = 5000 }, - { itemName = "hazardous robe", clientId = 34147, sell = 3000 }, - { itemName = "head", clientId = 33937, sell = 3200 }, - { itemName = "head", clientId = 33932, sell = 3500 }, - { itemName = "headchopper", clientId = 7380, sell = 6000 }, - { itemName = "headpecker beak", clientId = 39387, sell = 2998 }, - { itemName = "headpecker feather", clientId = 39388, sell = 1300 }, - { itemName = "heat core", clientId = 21167, sell = 10000 }, - { itemName = "heaven blossom", clientId = 3657, sell = 50 }, - { itemName = "heaven blossom", clientId = 5921, sell = 50 }, - { itemName = "heavy mace", clientId = 3340, sell = 50000 }, - { itemName = "heavy machete", clientId = 3330, sell = 90 }, - { itemName = "heavy old tome", clientId = 23986, sell = 30 }, - { itemName = "heavy trident", clientId = 12683, sell = 2000 }, - { itemName = "hellhound slobber", clientId = 9637, sell = 500 }, - { itemName = "hellspawn tail", clientId = 10304, sell = 475 }, - { itemName = "helmet of the lost", clientId = 17852, sell = 2000 }, - { itemName = "hemp rope", clientId = 20206, sell = 350 }, - { itemName = "heroic axe", clientId = 7389, sell = 30000 }, - { itemName = "hexagonal ruby", clientId = 30180, sell = 30000 }, - { itemName = "hibiscus dress", clientId = 8045, sell = 3000 }, - { itemName = "hideous chunk", clientId = 16140, sell = 510 }, - { itemName = "hieroglyph banner", clientId = 12482, sell = 500 }, - { itemName = "high guard flag", clientId = 10415, sell = 550 }, - { itemName = "high guard shoulderplates", clientId = 10416, sell = 130 }, - { itemName = "hive bow", clientId = 14246, sell = 28000 }, - { itemName = "hive scythe", clientId = 14089, sell = 17000 }, - { itemName = "hollow stampor hoof", clientId = 12314, sell = 400 }, - { itemName = "holy ash", clientId = 17850, sell = 160 }, - { itemName = "holy orchid", clientId = 5922, sell = 90 }, - { itemName = "honeycomb", clientId = 5902, sell = 40 }, - { itemName = "horn of kalyassa", clientId = 24941, sell = 10000 }, - { itemName = "horn", clientId = 19359, sell = 300 }, - { itemName = "horoscope", clientId = 18926, sell = 40 }, - { itemName = "huge chunk of crude iron", clientId = 5892, sell = 15000 }, - { itemName = "huge shell", clientId = 27621, sell = 15000 }, - { itemName = "huge spiky snail shell", clientId = 27627, sell = 8000 }, - { itemName = "humongous chunk", clientId = 16139, sell = 540 }, - { itemName = "hunter's quiver", clientId = 11469, sell = 80 }, - { itemName = "hydra egg", clientId = 4839, sell = 500 }, - { itemName = "hydra head", clientId = 10282, sell = 600 }, - { itemName = "hydrophytes", clientId = 39410, sell = 220 }, - { itemName = "ice flower", clientId = 30058, sell = 370 }, - { itemName = "ice rapier", clientId = 3284, sell = 1000 }, - { itemName = "iced soil", clientId = 944, sell = 2000 }, - { itemName = "incantation notes", clientId = 18929, sell = 90 }, - { itemName = "infernal heart", clientId = 34139, sell = 2100 }, - { itemName = "infernal robe", clientId = 34146, sell = 1200 }, - { itemName = "inkwell", clientId = 28568, sell = 720 }, - { itemName = "instable proto matter", clientId = 23516, sell = 300 }, - { itemName = "iron helmet", clientId = 3353, sell = 150 }, - { itemName = "iron ore", clientId = 5880, sell = 500 }, - { itemName = "ivory carving", clientId = 33945, sell = 300 }, - { itemName = "ivory comb", clientId = 32773, sell = 8000 }, - { itemName = "izcandar's snow globe", clientId = 29944, sell = 180000 }, - { itemName = "izcandar's sundial", clientId = 29945, sell = 225000 }, - { itemName = "jacket", clientId = 3561, sell = 1 }, - { itemName = "jade hammer", clientId = 7422, sell = 25000 }, - { itemName = "jade hat", clientId = 10451, sell = 9000 }, - { itemName = "jagged sickle", clientId = 32595, sell = 150000 }, - { itemName = "jaws", clientId = 34014, sell = 3900 }, - { itemName = "jewelled belt", clientId = 11470, sell = 180 }, - { itemName = "jungle moa claw", clientId = 39404, sell = 160 }, - { itemName = "jungle moa egg", clientId = 39405, sell = 250 }, - { itemName = "jungle moa feather", clientId = 39403, sell = 140 }, - { itemName = "katana", clientId = 3300, sell = 35 }, - { itemName = "katex' blood", clientId = 34100, sell = 210 }, - { itemName = "key to the drowned library", clientId = 14009, sell = 330 }, - { itemName = "knight armor", clientId = 3370, sell = 5000 }, - { itemName = "knight axe", clientId = 3318, sell = 2000 }, - { itemName = "knight legs", clientId = 3371, sell = 5000 }, - { itemName = "kollos shell", clientId = 14077, sell = 420 }, - { itemName = "kongra's shoulderpad", clientId = 11471, sell = 100 }, - { itemName = "krimhorn helmet", clientId = 7461, sell = 200 }, - { itemName = "lamassu hoof", clientId = 31441, sell = 330 }, - { itemName = "lamassu horn", clientId = 31442, sell = 240 }, - { itemName = "lancer beetle shell", clientId = 10455, sell = 80 }, - { itemName = "lancet", clientId = 18925, sell = 90 }, - { itemName = "lava fungus head", clientId = 36785, sell = 900 }, - { itemName = "lava fungus ring", clientId = 36786, sell = 390 }, - { itemName = "lavaworm jaws", clientId = 36771, sell = 1100 }, - { itemName = "lavaworm spike roots", clientId = 36769, sell = 600 }, - { itemName = "lavaworm spikes", clientId = 36770, sell = 750 }, - { itemName = "lavos armor", clientId = 8049, sell = 16000 }, - { itemName = "leaf legs", clientId = 9014, sell = 500 }, - { itemName = "leaf star", clientId = 25735, sell = 50 }, - { itemName = "leather armor", clientId = 3361, sell = 12 }, - { itemName = "leather boots", clientId = 3552, sell = 2 }, - { itemName = "leather helmet", clientId = 3355, sell = 4 }, - { itemName = "leather legs", clientId = 3559, sell = 9 }, - { itemName = "legion helmet", clientId = 3374, sell = 22 }, - { itemName = "legionnaire flags", clientId = 10417, sell = 500 }, - { itemName = "leopard armor", clientId = 3404, sell = 1000 }, - { itemName = "leviathan's amulet", clientId = 9303, sell = 3000 }, - { itemName = "life crystal", clientId = 3061, sell = 85 }, - { itemName = "life preserver", clientId = 17813, sell = 300 }, - { itemName = "life ring", clientId = 3052, sell = 50 }, - { itemName = "light shovel", clientId = 5710, sell = 300 }, - { itemName = "lightning boots", clientId = 820, sell = 2500 }, - { itemName = "lightning headband", clientId = 828, sell = 2500 }, - { itemName = "lightning legs", clientId = 822, sell = 11000 }, - { itemName = "lightning pendant", clientId = 816, sell = 1500 }, - { itemName = "lightning robe", clientId = 825, sell = 11000 }, - { itemName = "liodile fang", clientId = 40583, sell = 480 }, - { itemName = "lion cloak patch", clientId = 34162, sell = 190 }, - { itemName = "lion crest", clientId = 34160, sell = 270 }, - { itemName = "lion figurine", clientId = 33781, sell = 10000 }, - { itemName = "lion seal", clientId = 34163, sell = 210 }, - { itemName = "lion trophy", clientId = 7400, sell = 3000 }, - { itemName = "lion's mane", clientId = 9691, sell = 60 }, - { itemName = "little bowl of myrrh", clientId = 25702, sell = 500 }, - { itemName = "lizard essence", clientId = 11680, sell = 300 }, - { itemName = "lizard heart", clientId = 31340, sell = 530 }, - { itemName = "lizard leather", clientId = 5876, sell = 150 }, - { itemName = "lizard scale", clientId = 5881, sell = 120 }, - { itemName = "lizard trophy", clientId = 10419, sell = 8000 }, - { itemName = "longing eyes", clientId = 27624, sell = 8000 }, - { itemName = "longsword", clientId = 3285, sell = 51 }, - { itemName = "lost basher's spike", clientId = 17826, sell = 280 }, - { itemName = "lost bracers", clientId = 17853, sell = 140 }, - { itemName = "lost husher's staff", clientId = 17848, sell = 250 }, - { itemName = "lost soul", clientId = 32227, sell = 120 }, - { itemName = "luminescent crystal pickaxe", clientId = 32711, sell = 50 }, - { itemName = "luminous orb", clientId = 11454, sell = 1000 }, - { itemName = "lump of dirt", clientId = 9692, sell = 10 }, - { itemName = "lump of earth", clientId = 10305, sell = 130 }, - { itemName = "lunar staff", clientId = 7424, sell = 5000 }, - { itemName = "mace", clientId = 3286, sell = 30 }, - { itemName = "machete", clientId = 3308, sell = 6 }, - { itemName = "mad froth", clientId = 17854, sell = 80 }, - { itemName = "magic light wand", clientId = 3046, sell = 35 }, - { itemName = "magic plate armor", clientId = 3366, sell = 90000 }, - { itemName = "magic sulphur", clientId = 5904, sell = 8000 }, - { itemName = "magma amulet", clientId = 817, sell = 1500 }, - { itemName = "magma boots", clientId = 818, sell = 2500 }, - { itemName = "magma clump", clientId = 16130, sell = 570 }, - { itemName = "magma coat", clientId = 826, sell = 11000 }, - { itemName = "magma legs", clientId = 821, sell = 11000 }, - { itemName = "magma monocle", clientId = 827, sell = 2500 }, - { itemName = "makara fin", clientId = 39401, sell = 350 }, - { itemName = "makara tongue", clientId = 39402, sell = 320 }, - { itemName = "malice's horn", clientId = 33920, sell = 620000 }, - { itemName = "malice's spine", clientId = 33921, sell = 850000 }, - { itemName = "malofur's lunchbox", clientId = 30088, sell = 240000 }, - { itemName = "mammoth fur cape", clientId = 7463, sell = 6000 }, - { itemName = "mammoth fur shorts", clientId = 7464, sell = 850 }, - { itemName = "mammoth tusk", clientId = 10321, sell = 100 }, - { itemName = "mammoth whopper", clientId = 7381, sell = 300 }, - { itemName = "mandrake", clientId = 5014, sell = 5000 }, - { itemName = "mantassin tail", clientId = 11489, sell = 280 }, - { itemName = "manticore ear", clientId = 31440, sell = 310 }, - { itemName = "manticore tail", clientId = 31439, sell = 220 }, - { itemName = "mantosaurus jaw", clientId = 39386, sell = 2998 }, - { itemName = "marlin trophy", clientId = 902, sell = 5000 }, - { itemName = "marsh stalker beak", clientId = 17461, sell = 65 }, - { itemName = "marsh stalker feather", clientId = 17462, sell = 50 }, - { itemName = "mastermind potion", clientId = 7440, sell = 500 }, - { itemName = "mastermind shield", clientId = 3414, sell = 50000 }, - { itemName = "maxilla", clientId = 12315, sell = 250 }, - { itemName = "maxxenius head", clientId = 29942, sell = 500000 }, - { itemName = "meat hammer", clientId = 32093, sell = 60 }, - { itemName = "medal of valiance", clientId = 31591, sell = 410000 }, - { itemName = "medusa shield", clientId = 3436, sell = 9000 }, - { itemName = "megalomania's essence", clientId = 33928, sell = 1900000 }, - { itemName = "megalomania's skull", clientId = 33925, sell = 1500000 }, - { itemName = "mercenary sword", clientId = 7386, sell = 12000 }, - { itemName = "mercurial wing", clientId = 39395, sell = 2500 }, - { itemName = "metal bat", clientId = 21171, sell = 9000 }, - { itemName = "metal jaw", clientId = 21193, sell = 260 }, - { itemName = "metal spats", clientId = 21169, sell = 2000 }, - { itemName = "metal spike", clientId = 10298, sell = 320 }, - { itemName = "metal toe", clientId = 21198, sell = 430 }, - { itemName = "might ring", clientId = 3048, sell = 250, count = 20 }, - { itemName = "milk churn", clientId = 32011, sell = 100 }, - { itemName = "mind stone", clientId = 3062, sell = 100 }, - { itemName = "mino lance", clientId = 21174, sell = 7000 }, - { itemName = "mino shield", clientId = 21175, sell = 3000 }, - { itemName = "minotaur horn", clientId = 11472, sell = 75 }, - { itemName = "minotaur leather", clientId = 5878, sell = 80 }, - { itemName = "minotaur trophy", clientId = 7401, sell = 500 }, - { itemName = "miraculum", clientId = 11474, sell = 60 }, - { itemName = "model ship", clientId = 2994, sell = 1000 }, - { itemName = "modified crossbow", clientId = 8021, sell = 10000 }, - { itemName = "mooh'tah plate", clientId = 21166, sell = 6000 }, - { itemName = "mooh'tah shell", clientId = 21202, sell = 110 }, - { itemName = "moohtant cudgel", clientId = 21173, sell = 14000 }, - { itemName = "moohtant horn", clientId = 21200, sell = 140 }, - { itemName = "moonlight rod", clientId = 3070, sell = 200 }, - { itemName = "moonstone", clientId = 32771, sell = 13000 }, - { itemName = "morbid tapestry", clientId = 34170, sell = 30000 }, - { itemName = "morgaroth's heart", clientId = 5943, sell = 15000 }, - { itemName = "morshabaal's brain", clientId = 37613, sell = 15000 }, - { itemName = "morshabaal's extract", clientId = 37810, sell = 3250000 }, - { itemName = "morning star", clientId = 3282, sell = 100 }, - { itemName = "mother soil", clientId = 947, sell = 5000 }, - { itemName = "mould heart", clientId = 34141, sell = 2100 }, - { itemName = "mould robe", clientId = 34148, sell = 1200 }, - { itemName = "mouldy powder", clientId = 35596, sell = 200 }, - { itemName = "mr. punish's handcuffs", clientId = 6537, sell = 50000 }, - { itemName = "muck rod", clientId = 16117, sell = 6000 }, - { itemName = "mucus plug", clientId = 16102, sell = 500 }, - { itemName = "mutated bat ear", clientId = 9662, sell = 420 }, - { itemName = "mutated flesh", clientId = 10308, sell = 50 }, - { itemName = "mutated rat tail", clientId = 9668, sell = 150 }, - { itemName = "mycological bow", clientId = 16164, sell = 35000 }, - { itemName = "mysterious fetish", clientId = 3078, sell = 50 }, - { itemName = "mysterious voodoo skull", clientId = 5668, sell = 4000 }, - { itemName = "mystic blade", clientId = 7384, sell = 30000 }, - { itemName = "mystic turban", clientId = 3574, sell = 150 }, - { itemName = "mystical hourglass", clientId = 9660, sell = 700 }, - { itemName = "naga archer scales", clientId = 39413, sell = 340 }, - { itemName = "naga armring", clientId = 39411, sell = 390 }, - { itemName = "naga earring", clientId = 39412, sell = 380 }, - { itemName = "naga warrior scales", clientId = 39414, sell = 340 }, - { itemName = "naginata", clientId = 3314, sell = 2000 }, - { itemName = "natural soil", clientId = 940, sell = 2000 }, - { itemName = "necklace of the deep", clientId = 13990, sell = 3000 }, - { itemName = "necromantic robe", clientId = 11475, sell = 250 }, - { itemName = "necromantic rust", clientId = 21196, sell = 390 }, - { itemName = "necrotic rod", clientId = 3069, sell = 1000 }, - { itemName = "nettle blossom", clientId = 10314, sell = 75 }, - { itemName = "nettle spit", clientId = 11476, sell = 25 }, - { itemName = "neutral matter", clientId = 954, sell = 5000 }, - { itemName = "nighthunter wing", clientId = 39381, sell = 2000 }, - { itemName = "nightmare blade", clientId = 7418, sell = 35000 }, - { itemName = "noble amulet", clientId = 31595, sell = 430000 }, - { itemName = "noble armor", clientId = 3380, sell = 900 }, - { itemName = "noble axe", clientId = 7456, sell = 10000 }, - { itemName = "noble cape", clientId = 31593, sell = 425000 }, - { itemName = "noble turban", clientId = 11486, sell = 430 }, - { itemName = "norse shield", clientId = 7460, sell = 1500 }, - { itemName = "northwind rod", clientId = 8083, sell = 1500 }, - { itemName = "nose ring", clientId = 5804, sell = 2000 }, - { itemName = "obsidian lance", clientId = 3313, sell = 500 }, - { itemName = "odd organ", clientId = 23510, sell = 410 }, - { itemName = "ogre ear stud", clientId = 22188, sell = 180 }, - { itemName = "ogre nose ring", clientId = 22189, sell = 210 }, - { itemName = "old parchment", clientId = 4831, sell = 500 }, - { itemName = "old girtablilu carapace", clientId = 36972, sell = 570 }, - { itemName = "one of timira's many heads", clientId = 39399, sell = 215000 }, - { itemName = "onyx chip", clientId = 22193, sell = 500 }, - { itemName = "onyx flail", clientId = 7421, sell = 22000 }, - { itemName = "onyx pendant", clientId = 22195, sell = 3500 }, - { itemName = "opal", clientId = 22194, sell = 500 }, - { itemName = "orange mushroom", clientId = 3726, sell = 150 }, - { itemName = "orb", clientId = 3060, sell = 750 }, - { itemName = "orc leather", clientId = 11479, sell = 30 }, - { itemName = "orc tooth", clientId = 10196, sell = 150 }, - { itemName = "orc trophy", clientId = 7395, sell = 1000 }, - { itemName = "orc tusk", clientId = 7786, sell = 700 }, - { itemName = "orcish axe", clientId = 3316, sell = 350 }, - { itemName = "orcish gear", clientId = 11477, sell = 85 }, - { itemName = "orcish maul", clientId = 7392, sell = 6000 }, - { itemName = "orichalcum pearl", clientId = 5021, sell = 40 }, - { itemName = "oriental shoes", clientId = 21981, sell = 15000 }, - { itemName = "ornamented axe", clientId = 7411, sell = 20000 }, - { itemName = "ornamented shield", clientId = 3424, sell = 1500 }, - { itemName = "ornate chestplate", clientId = 13993, sell = 60000 }, - { itemName = "ornate crossbow", clientId = 14247, sell = 12000 }, - { itemName = "ornate legs", clientId = 13999, sell = 40000 }, - { itemName = "ornate locket", clientId = 30056, sell = 18000 }, - { itemName = "ornate mace", clientId = 14001, sell = 42000 }, - { itemName = "ornate shield", clientId = 14000, sell = 42000 }, - { itemName = "orshabaal's brain", clientId = 5808, sell = 12000 }, - { itemName = "pair of hellflayer horns", clientId = 22729, sell = 1300 }, - { itemName = "pair of iron fists", clientId = 17828, sell = 4000 }, - { itemName = "pair of old bracers", clientId = 32705, sell = 500 }, - { itemName = "paladin armor", clientId = 8063, sell = 15000 }, - { itemName = "pale worm's scalp", clientId = 32598, sell = 489000 }, - { itemName = "panda teddy", clientId = 5080, sell = 30000 }, - { itemName = "panpipes", clientId = 2953, sell = 150 }, - { itemName = "panther head", clientId = 12039, sell = 750 }, - { itemName = "panther paw", clientId = 12040, sell = 300 }, - { itemName = "parder fur", clientId = 39418, sell = 150 }, - { itemName = "parder tooth", clientId = 39417, sell = 150 }, - { itemName = "patch of fine cloth", clientId = 28821, sell = 1350 }, - { itemName = "patched boots", clientId = 3550, sell = 2000 }, - { itemName = "peacock feather fan", clientId = 21975, sell = 350 }, - { itemName = "pelvis bone", clientId = 11481, sell = 30 }, - { itemName = "percht horns", clientId = 30186, sell = 200 }, - { itemName = "perfect behemoth fang", clientId = 5893, sell = 250 }, - { itemName = "pet pig", clientId = 16165, sell = 1500 }, - { itemName = "petrified scream", clientId = 10420, sell = 250 }, - { itemName = "phantasmal hair", clientId = 32704, sell = 500 }, - { itemName = "pharaoh banner", clientId = 12483, sell = 1000 }, - { itemName = "pharaoh sword", clientId = 3334, sell = 23000 }, - { itemName = "phoenix shield", clientId = 3439, sell = 16000 }, - { itemName = "pick", clientId = 3456, sell = 15 }, - { itemName = "piece of archer armor", clientId = 11483, sell = 20 }, - { itemName = "piece of crocodile leather", clientId = 10279, sell = 15 }, - { itemName = "piece of dead brain", clientId = 9663, sell = 420 }, - { itemName = "piece of draconian steel", clientId = 5889, sell = 3000 }, - { itemName = "piece of hell steel", clientId = 5888, sell = 500 }, - { itemName = "piece of hellfire armor", clientId = 9664, sell = 550 }, - { itemName = "piece of massacre's shell", clientId = 6540, sell = 50000 }, - { itemName = "piece of royal steel", clientId = 5887, sell = 10000 }, - { itemName = "piece of scarab shell", clientId = 9641, sell = 45 }, - { itemName = "piece of swampling wood", clientId = 17823, sell = 30 }, - { itemName = "piece of timira's sensors", clientId = 39400, sell = 150000 }, - { itemName = "piece of warrior armor", clientId = 11482, sell = 50 }, - { itemName = "pieces of magic chalk", clientId = 18930, sell = 210 }, - { itemName = "pig foot", clientId = 9693, sell = 10 }, - { itemName = "pile of grave earth", clientId = 11484, sell = 25 }, - { itemName = "pirat's tail", clientId = 35573, sell = 180 }, - { itemName = "pirate boots", clientId = 5461, sell = 3000 }, - { itemName = "pirate coin", clientId = 35572, sell = 110 }, - { itemName = "pirate hat", clientId = 6096, sell = 1000 }, - { itemName = "pirate knee breeches", clientId = 5918, sell = 200 }, - { itemName = "pirate shirt", clientId = 6095, sell = 500 }, - { itemName = "pirate voodoo doll", clientId = 5810, sell = 500 }, - { itemName = "plagueroot offshoot", clientId = 30087, sell = 280000 }, - { itemName = "plasma pearls", clientId = 23506, sell = 250 }, - { itemName = "plasmatic lightning", clientId = 23520, sell = 270 }, - { itemName = "plate armor", clientId = 3357, sell = 400 }, - { itemName = "plate legs", clientId = 3557, sell = 115 }, - { itemName = "plate shield", clientId = 3410, sell = 45 }, - { itemName = "platinum amulet", clientId = 3055, sell = 2500 }, - { itemName = "poison dagger", clientId = 3299, sell = 50 }, - { itemName = "poison gland", clientId = 29348, sell = 210 }, - { itemName = "poison spider shell", clientId = 11485, sell = 10 }, - { itemName = "poisoned fang", clientId = 21195, sell = 130 }, - { itemName = "poisonous slime", clientId = 9640, sell = 50 }, - { itemName = "polar bear paw", clientId = 9650, sell = 30 }, - { itemName = "pool of chitinous glue", clientId = 20207, sell = 480 }, - { itemName = "porcelain mask", clientId = 25088, sell = 2000 }, - { itemName = "powder herb", clientId = 3739, sell = 10 }, - { itemName = "power ring", clientId = 3050, sell = 50 }, - { itemName = "prehemoth claw", clientId = 39383, sell = 2300 }, - { itemName = "prehemoth horns", clientId = 39382, sell = 3000 }, - { itemName = "prismatic quartz", clientId = 24962, sell = 450 }, - { itemName = "pristine worm head", clientId = 27618, sell = 15000 }, - { itemName = "protection amulet", clientId = 3084, sell = 100, count = 250 }, - { itemName = "protective charm", clientId = 11444, sell = 60 }, - { itemName = "pulverized ore", clientId = 16133, sell = 400 }, - { itemName = "purified soul", clientId = 32228, sell = 260 }, - { itemName = "purple robe", clientId = 11473, sell = 110 }, - { itemName = "purple tome", clientId = 2848, sell = 2000 }, - { itemName = "quara bone", clientId = 11491, sell = 500 }, - { itemName = "quara eye", clientId = 11488, sell = 350 }, - { itemName = "quara pincers", clientId = 11490, sell = 410 }, - { itemName = "quara tentacle", clientId = 11487, sell = 140 }, - { itemName = "queen's sceptre", clientId = 7410, sell = 20000 }, - { itemName = "quill", clientId = 28567, sell = 1100 }, - { itemName = "rabbit's foot", clientId = 12172, sell = 50 }, - { itemName = "ragnir helmet", clientId = 7462, sell = 400 }, - { itemName = "rainbow quartz", clientId = 25737, sell = 800 }, - { itemName = "rapier", clientId = 3272, sell = 5 }, - { itemName = "rare earth", clientId = 27301, sell = 80 }, - { itemName = "ratana", clientId = 17812, sell = 500 }, - { itemName = "ratmiral's hat", clientId = 35613, sell = 150000 }, - { itemName = "ravenous circlet", clientId = 32597, sell = 220000 }, - { itemName = "red crystal fragment", clientId = 16126, sell = 800 }, - { itemName = "red dragon leather", clientId = 5948, sell = 200 }, - { itemName = "red dragon scale", clientId = 5882, sell = 200 }, - { itemName = "red gem", clientId = 3039, sell = 1000 }, - { itemName = "red goanna scale", clientId = 31558, sell = 270 }, - { itemName = "red hair dye", clientId = 17855, sell = 40 }, - { itemName = "red lantern", clientId = 10289, sell = 250 }, - { itemName = "red piece of cloth", clientId = 5911, sell = 300 }, - { itemName = "red tome", clientId = 2852, sell = 2000 }, - { itemName = "relic sword", clientId = 7383, sell = 25000 }, - { itemName = "rhindeer antlers", clientId = 40587, sell = 680 }, - { itemName = "rhino hide", clientId = 24388, sell = 175 }, - { itemName = "rhino horn carving", clientId = 24386, sell = 300 }, - { itemName = "rhino horn", clientId = 24389, sell = 265 }, - { itemName = "rift bow", clientId = 22866, sell = 45000 }, - { itemName = "rift crossbow", clientId = 22867, sell = 45000 }, - { itemName = "rift lance", clientId = 22727, sell = 30000 }, - { itemName = "rift shield", clientId = 22726, sell = 50000 }, - { itemName = "ring of blue plasma", clientId = 23529, sell = 8000 }, - { itemName = "ring of green plasma", clientId = 23531, sell = 8000 }, - { itemName = "ring of healing", clientId = 3098, sell = 100 }, - { itemName = "ring of red plasma", clientId = 23533, sell = 8000 }, - { itemName = "ring of the sky", clientId = 3006, sell = 30000 }, - { itemName = "ripptor claw", clientId = 39389, sell = 2000 }, - { itemName = "ripptor scales", clientId = 39391, sell = 1200 }, - { itemName = "ritual tooth", clientId = 40528, sell = 135 }, - { itemName = "rod", clientId = 33929, sell = 2200 }, - { itemName = "rogue naga scales", clientId = 39416, sell = 570 }, - { itemName = "roots", clientId = 33938, sell = 1200 }, - { itemName = "rope belt", clientId = 11492, sell = 66 }, - { itemName = "rope", clientId = 3003, sell = 15 }, - { itemName = "rorc egg", clientId = 18996, sell = 120 }, - { itemName = "rorc feather", clientId = 18993, sell = 70 }, - { itemName = "rotten feather", clientId = 40527, sell = 120 }, - { itemName = "rotten heart", clientId = 31589, sell = 74000 }, - { itemName = "rotten piece of cloth", clientId = 10291, sell = 30 }, - { itemName = "royal almandine", clientId = 39038, sell = 460000 }, - { itemName = "royal axe", clientId = 7434, sell = 40000 }, - { itemName = "royal helmet", clientId = 3392, sell = 30000 }, - { itemName = "rubber cap", clientId = 21165, sell = 11000 }, - { itemName = "ruby necklace", clientId = 3016, sell = 2000 }, - { itemName = "runed sword", clientId = 7417, sell = 45000 }, - { itemName = "ruthless axe", clientId = 6553, sell = 45000 }, - { itemName = "sabre", clientId = 3273, sell = 12 }, - { itemName = "sabretooth fur", clientId = 39378, sell = 2500 }, - { itemName = "sabretooth", clientId = 10311, sell = 400 }, - { itemName = "sacred tree amulet", clientId = 9302, sell = 3000 }, - { itemName = "safety pin", clientId = 11493, sell = 120 }, - { itemName = "sai", clientId = 10389, sell = 16500 }, - { itemName = "sample of monster blood", clientId = 27874, sell = 250 }, - { itemName = "sandcrawler shell", clientId = 10456, sell = 20 }, - { itemName = "sapphire hammer", clientId = 7437, sell = 7000 }, - { itemName = "scale armor", clientId = 3377, sell = 75 }, - { itemName = "scale of corruption", clientId = 11673, sell = 680 }, - { itemName = "scale of gelidrazah", clientId = 24939, sell = 10000 }, - { itemName = "scarab amulet", clientId = 3018, sell = 200 }, - { itemName = "scarab coin", clientId = 3042, sell = 100 }, - { itemName = "scarab pincers", clientId = 9631, sell = 280 }, - { itemName = "scarab shield", clientId = 3440, sell = 2000 }, - { itemName = "scimitar", clientId = 3307, sell = 150 }, - { itemName = "scorpion charm", clientId = 36822, sell = 620 }, - { itemName = "scorpion tail", clientId = 9651, sell = 25 }, - { itemName = "scroll of heroic deeds", clientId = 11510, sell = 230 }, - { itemName = "scythe leg", clientId = 10312, sell = 450 }, - { itemName = "scythe", clientId = 3453, sell = 10 }, - { itemName = "sea horse figurine", clientId = 31323, sell = 42000 }, - { itemName = "sea serpent scale", clientId = 9666, sell = 520 }, - { itemName = "sea serpent trophy", clientId = 9613, sell = 10000 }, - { itemName = "seacrest hair", clientId = 21801, sell = 260 }, - { itemName = "seacrest pearl", clientId = 21747, sell = 400 }, - { itemName = "seacrest scale", clientId = 21800, sell = 150 }, - { itemName = "second verse of the hymn", clientId = 6088, sell = 250 }, - { itemName = "seeds", clientId = 647, sell = 150 }, - { itemName = "serpent sword", clientId = 3297, sell = 900 }, - { itemName = "shadow herb", clientId = 3740, sell = 20 }, - { itemName = "shadow sceptre", clientId = 7451, sell = 10000 }, - { itemName = "shaggy tail", clientId = 10407, sell = 25 }, - { itemName = "shamanic hood", clientId = 11478, sell = 45 }, - { itemName = "shamanic talisman", clientId = 22184, sell = 200 }, - { itemName = "shard", clientId = 7290, sell = 2000 }, - { itemName = "shark fins", clientId = 35574, sell = 250 }, - { itemName = "shimmering beetles", clientId = 25693, sell = 150 }, - { itemName = "shiny stone", clientId = 10310, sell = 500 }, - { itemName = "shockwave amulet", clientId = 9304, sell = 3000 }, - { itemName = "short sword", clientId = 3294, sell = 10 }, - { itemName = "shovel", clientId = 3457, sell = 8 }, - { itemName = "sickle", clientId = 3293, sell = 3 }, - { itemName = "sight of surrender's eye", clientId = 20183, sell = 3000 }, - { itemName = "signet ring", clientId = 31592, sell = 480000 }, - { itemName = "silencer claws", clientId = 20200, sell = 390 }, - { itemName = "silencer resonating chamber", clientId = 20201, sell = 600 }, - { itemName = "silken bookmark", clientId = 28566, sell = 1300 }, - { itemName = "silkweaver bow", clientId = 8029, sell = 12000 }, - { itemName = "silky fur", clientId = 10292, sell = 35 }, - { itemName = "silver amulet", clientId = 3054, sell = 50, count = 200 }, - { itemName = "silver brooch", clientId = 3017, sell = 150 }, - { itemName = "silver dagger", clientId = 3290, sell = 500 }, - { itemName = "silver fafnar trophy", clientId = 9627, sell = 1000 }, - { itemName = "silver hand mirror", clientId = 32772, sell = 10000 }, - { itemName = "silver rune emblem explosion", clientId = 11607, sell = 5000 }, - { itemName = "silver rune emblem heavy magic missile", clientId = 11605, sell = 5000 }, - { itemName = "silver rune emblem sudden death", clientId = 11609, sell = 5000 }, - { itemName = "silver rune emblem ultimate healing", clientId = 11603, sell = 5000 }, - { itemName = "single human eye", clientId = 25701, sell = 1000 }, - { itemName = "skeleton decoration", clientId = 6525, sell = 3000 }, - { itemName = "skull belt", clientId = 11480, sell = 80 }, - { itemName = "skull coin", clientId = 32583, sell = 12000 }, - { itemName = "skull fetish", clientId = 22191, sell = 250 }, - { itemName = "skull helmet", clientId = 5741, sell = 40000 }, - { itemName = "skull shatterer", clientId = 17849, sell = 170 }, - { itemName = "skull staff", clientId = 3324, sell = 6000 }, - { itemName = "skullcracker armor", clientId = 8061, sell = 18000 }, - { itemName = "skunk tail", clientId = 10274, sell = 50 }, - { itemName = "slime heart", clientId = 21194, sell = 160 }, - { itemName = "slime mould", clientId = 12601, sell = 175 }, - { itemName = "slimy leaf tentacle", clientId = 21197, sell = 320 }, - { itemName = "slimy leg", clientId = 27623, sell = 4500 }, - { itemName = "sling herb", clientId = 3738, sell = 10 }, - { itemName = "small amethyst", clientId = 3033, sell = 200 }, - { itemName = "small axe", clientId = 3462, sell = 5 }, - { itemName = "small diamond", clientId = 3028, sell = 300 }, - { itemName = "small emerald", clientId = 3032, sell = 250 }, - { itemName = "small enchanted amethyst", clientId = 678, sell = 200 }, - { itemName = "small enchanted emerald", clientId = 677, sell = 250 }, - { itemName = "small enchanted ruby", clientId = 676, sell = 250 }, - { itemName = "small enchanted sapphire", clientId = 675, sell = 250 }, - { itemName = "small energy ball", clientId = 23524, sell = 250 }, - { itemName = "small flask of eyedrops", clientId = 11512, sell = 95 }, - { itemName = "small notebook", clientId = 11450, sell = 480 }, - { itemName = "small oil lamp", clientId = 2933, sell = 150 }, - { itemName = "small pitchfork", clientId = 11513, sell = 70 }, - { itemName = "small ruby", clientId = 3030, sell = 250 }, - { itemName = "small sapphire", clientId = 3029, sell = 250 }, - { itemName = "small topaz", clientId = 9057, sell = 200 }, - { itemName = "small treasure chest", clientId = 35571, sell = 500 }, - { itemName = "small tropical fish", clientId = 39408, sell = 380 }, - { itemName = "smoldering eye", clientId = 39543, sell = 470000 }, - { itemName = "snake skin", clientId = 9694, sell = 400 }, - { itemName = "snakebite rod", clientId = 3066, sell = 100 }, - { itemName = "sniper gloves", clientId = 5875, sell = 2000 }, - { itemName = "soldier helmet", clientId = 3375, sell = 16 }, - { itemName = "solid rage", clientId = 23517, sell = 310 }, - { itemName = "some grimeleech wings", clientId = 22730, sell = 1200 }, - { itemName = "soul stone", clientId = 5809, sell = 6000 }, - { itemName = "souleater trophy", clientId = 11679, sell = 7500 }, - { itemName = "sparkion claw", clientId = 23502, sell = 290 }, - { itemName = "sparkion legs", clientId = 23504, sell = 310 }, - { itemName = "spark sphere", clientId = 23518, sell = 350 }, - { itemName = "sparkion stings", clientId = 23505, sell = 280 }, - { itemName = "sparkion tail", clientId = 23503, sell = 300 }, - { itemName = "spectral gold nugget", clientId = 32724, sell = 500 }, - { itemName = "spectral silver nugget", clientId = 32725, sell = 250 }, - { itemName = "spectral stone", clientId = 4840, sell = 50 }, - { itemName = "spellbook of enlightenment", clientId = 8072, sell = 4000 }, - { itemName = "spellbook of lost souls", clientId = 8075, sell = 19000 }, - { itemName = "spellbook of mind control", clientId = 8074, sell = 13000 }, - { itemName = "spellbook of warding", clientId = 8073, sell = 8000 }, - { itemName = "spellsinger's seal", clientId = 14008, sell = 280 }, - { itemName = "spellwand", clientId = 651, sell = 299 }, - { itemName = "spellweaver's robe", clientId = 10438, sell = 12000 }, - { itemName = "sphinx feather", clientId = 31437, sell = 470 }, - { itemName = "sphinx tiara", clientId = 31438, sell = 360 }, - { itemName = "spider fangs", clientId = 8031, sell = 10 }, - { itemName = "spider silk", clientId = 5879, sell = 100 }, - { itemName = "spidris mandible", clientId = 14082, sell = 450 }, - { itemName = "spike shield", clientId = 17810, sell = 250 }, - { itemName = "spike sword", clientId = 3271, sell = 1000 }, - { itemName = "spiked iron ball", clientId = 10408, sell = 100 }, - { itemName = "spiked squelcher", clientId = 7452, sell = 5000 }, - { itemName = "spiky club", clientId = 17859, sell = 300 }, - { itemName = "spirit cloak", clientId = 8042, sell = 350 }, - { itemName = "spirit container", clientId = 5884, sell = 40000 }, - { itemName = "spite's spirit", clientId = 33926, sell = 840000 }, - { itemName = "spitter nose", clientId = 14078, sell = 340 }, - { itemName = "spooky blue eye", clientId = 9642, sell = 95 }, - { itemName = "springsprout rod", clientId = 8084, sell = 3600 }, - { itemName = "srezz' eye", clientId = 34103, sell = 300 }, - { itemName = "spool of yarn", clientId = 5886, sell = 1000 }, - { itemName = "stalking seeds", clientId = 39384, sell = 1800 }, - { itemName = "stampor horn", clientId = 12312, sell = 280 }, - { itemName = "stampor talons", clientId = 12313, sell = 150 }, - { itemName = "star amulet", clientId = 3014, sell = 500 }, - { itemName = "star herb", clientId = 3736, sell = 15 }, - { itemName = "statue of abyssador", clientId = 16232, sell = 4000 }, - { itemName = "statue of deathstrike", clientId = 16236, sell = 3000 }, - { itemName = "statue of devovorga", clientId = 4065, sell = 1500 }, - { itemName = "statue of gnomevil", clientId = 16240, sell = 2000 }, - { itemName = "stealth ring", clientId = 3049, sell = 200 }, - { itemName = "steel boots", clientId = 3554, sell = 30000 }, - { itemName = "steel helmet", clientId = 3351, sell = 293 }, - { itemName = "steel shield", clientId = 3409, sell = 80 }, - { itemName = "stone herb", clientId = 3735, sell = 20 }, - { itemName = "stone nose", clientId = 16137, sell = 590 }, - { itemName = "stone skin amulet", clientId = 3081, sell = 500, count = 5 }, - { itemName = "stone wing", clientId = 10278, sell = 120 }, - { itemName = "stonerefiner's skull", clientId = 27606, sell = 100 }, - { itemName = "strand of medusa hair", clientId = 10309, sell = 600 }, - { itemName = "strange helmet", clientId = 3373, sell = 500 }, - { itemName = "strange proto matter", clientId = 23513, sell = 300 }, - { itemName = "strange symbol", clientId = 3058, sell = 200 }, - { itemName = "strange talisman", clientId = 3045, sell = 30, count = 200 }, - { itemName = "streaked devourer eyes", clientId = 36772, sell = 500 }, - { itemName = "streaked devourer legs", clientId = 36774, sell = 600 }, - { itemName = "streaked devourer maw", clientId = 36773, sell = 400 }, - { itemName = "striped fur", clientId = 10293, sell = 50 }, - { itemName = "studded armor", clientId = 3378, sell = 25 }, - { itemName = "studded club", clientId = 3336, sell = 10 }, - { itemName = "studded helmet", clientId = 3376, sell = 20 }, - { itemName = "studded legs", clientId = 3362, sell = 15 }, - { itemName = "studded shield", clientId = 3426, sell = 16 }, - { itemName = "stuffed dragon", clientId = 5791, sell = 6000 }, - { itemName = "sulphider shell", clientId = 39375, sell = 2200 }, - { itemName = "sulphur powder", clientId = 39376, sell = 1900 }, - { itemName = "sulphurous stone", clientId = 10315, sell = 100 }, - { itemName = "summer dress", clientId = 8046, sell = 1500 }, - { itemName = "swamp grass", clientId = 9686, sell = 20 }, - { itemName = "swamplair armor", clientId = 8052, sell = 16000 }, - { itemName = "swampling club", clientId = 17824, sell = 40 }, - { itemName = "swampling moss", clientId = 17822, sell = 20 }, - { itemName = "swarmer antenna", clientId = 14076, sell = 130 }, - { itemName = "sword ring", clientId = 3091, sell = 100 }, - { itemName = "sword", clientId = 3264, sell = 25 }, - { itemName = "tail of corruption", clientId = 11672, sell = 240 }, - { itemName = "talon", clientId = 3034, sell = 320 }, - { itemName = "tarantula egg", clientId = 10281, sell = 80 }, - { itemName = "tarnished rhino figurine", clientId = 24387, sell = 320 }, - { itemName = "tattered piece of robe", clientId = 9684, sell = 120 }, - { itemName = "taurus mace", clientId = 7425, sell = 500 }, - { itemName = "telescope eye", clientId = 33934, sell = 1600 }, - { itemName = "tempest shield", clientId = 3442, sell = 35000 }, - { itemName = "tentacle of tentugly", clientId = 35611, sell = 27000 }, - { itemName = "tentacle piece", clientId = 11666, sell = 5000 }, - { itemName = "tentugly's eye", clientId = 35610, sell = 52000 }, - { itemName = "tentugly's jaws", clientId = 35612, sell = 80000 }, - { itemName = "terra amulet", clientId = 814, sell = 1500 }, - { itemName = "terra boots", clientId = 813, sell = 2500 }, - { itemName = "terra hood", clientId = 830, sell = 2500 }, - { itemName = "terra legs", clientId = 812, sell = 11000 }, - { itemName = "terra mantle", clientId = 811, sell = 11000 }, - { itemName = "terra rod", clientId = 3065, sell = 2000 }, - { itemName = "terramite eggs", clientId = 10453, sell = 50 }, - { itemName = "terramite legs", clientId = 10454, sell = 60 }, - { itemName = "terramite shell", clientId = 10452, sell = 170 }, - { itemName = "terrorbird beak", clientId = 10273, sell = 95 }, - { itemName = "thaian sword", clientId = 7391, sell = 16000 }, - { itemName = "the avenger", clientId = 6527, sell = 42000 }, - { itemName = "the handmaiden's protector", clientId = 6539, sell = 50000 }, - { itemName = "the imperor's trident", clientId = 6534, sell = 50000 }, - { itemName = "the ironworker", clientId = 8025, sell = 50000 }, - { itemName = "the justice seeker", clientId = 7390, sell = 40000 }, - { itemName = "the plasmother's remains", clientId = 6535, sell = 50000 }, - { itemName = "thick fur", clientId = 10307, sell = 150 }, - { itemName = "third verse of the hymn", clientId = 6089, sell = 400 }, - { itemName = "thorn", clientId = 9643, sell = 100 }, - { itemName = "throwing knife", clientId = 3298, sell = 2 }, - { itemName = "tiara", clientId = 35578, sell = 11000 }, - { itemName = "tiger eye", clientId = 24961, sell = 350 }, - { itemName = "time ring", clientId = 3053, sell = 100 }, - { itemName = "titan axe", clientId = 7413, sell = 4000 }, - { itemName = "token of love", clientId = 31594, sell = 440000 }, - { itemName = "tooth file", clientId = 18924, sell = 60 }, - { itemName = "tooth of tazhadur", clientId = 24940, sell = 10000 }, - { itemName = "torn shirt", clientId = 25744, sell = 250 }, - { itemName = "tortoise shield", clientId = 6131, sell = 150 }, - { itemName = "tower shield", clientId = 3428, sell = 8000 }, - { itemName = "trapped bad dream monster", clientId = 20203, sell = 900 }, - { itemName = "tremendous tyrant head", clientId = 36783, sell = 930 }, - { itemName = "tremendous tyrant shell", clientId = 36784, sell = 740 }, - { itemName = "tribal mask", clientId = 3403, sell = 250 }, - { itemName = "troll green", clientId = 3741, sell = 25 }, - { itemName = "trollroot", clientId = 11515, sell = 50 }, - { itemName = "trophy of jaul", clientId = 14006, sell = 4000 }, - { itemName = "trophy of obujos", clientId = 14002, sell = 3000 }, - { itemName = "trophy of tanjis", clientId = 14004, sell = 2000 }, - { itemName = "tunnel tyrant head", clientId = 27595, sell = 500 }, - { itemName = "tunnel tyrant shell", clientId = 27596, sell = 700 }, - { itemName = "turtle shell", clientId = 5899, sell = 90 }, - { itemName = "tusk", clientId = 3044, sell = 100 }, - { itemName = "twiceslicer", clientId = 11657, sell = 28000 }, - { itemName = "twin hooks", clientId = 10392, sell = 500 }, - { itemName = "two handed sword", clientId = 3265, sell = 450 }, - { itemName = "two-headed turtle heads", clientId = 39409, sell = 460 }, - { itemName = "undead heart", clientId = 10450, sell = 200 }, - { itemName = "undertaker fangs", clientId = 39380, sell = 2700 }, - { itemName = "underworld rod", clientId = 8082, sell = 4400 }, - { itemName = "unholy bone", clientId = 10316, sell = 480 }, - { itemName = "unholy book", clientId = 6103, sell = 30000 }, - { itemName = "unicorn figurine", clientId = 30054, sell = 50000 }, - { itemName = "urmahlullus mane", clientId = 31623, sell = 490000 }, - { itemName = "urmahlullus paws", clientId = 31624, sell = 245000 }, - { itemName = "urmahlullus tail", clientId = 31622, sell = 210000 }, - { itemName = "utua's poison", clientId = 34101, sell = 230 }, - { itemName = "vampire dust", clientId = 5905, sell = 100 }, - { itemName = "vampire shield", clientId = 3434, sell = 15000 }, - { itemName = "vampire teeth", clientId = 9685, sell = 275 }, - { itemName = "vampire's cape chain", clientId = 18927, sell = 150 }, - { itemName = "varnished diremaw brainpan", clientId = 36781, sell = 750 }, - { itemName = "varnished diremaw legs", clientId = 36782, sell = 670 }, - { itemName = "veal", clientId = 32009, sell = 40 }, - { itemName = "vein of ore", clientId = 16135, sell = 330 }, - { itemName = "venison", clientId = 18995, sell = 55 }, - { itemName = "vexclaw talon", clientId = 22728, sell = 1100 }, - { itemName = "vial of hatred", clientId = 33927, sell = 737000 }, - { itemName = "vial", clientId = 2874, sell = 5 }, - { itemName = "vibrant heart", clientId = 34143, sell = 2100 }, - { itemName = "vibrant robe", clientId = 34144, sell = 1200 }, - { itemName = "viking helmet", clientId = 3367, sell = 66 }, - { itemName = "viking shield", clientId = 3431, sell = 85 }, - { itemName = "vile axe", clientId = 7388, sell = 30000 }, - { itemName = "violet crystal shard", clientId = 16120, sell = 1500 }, - { itemName = "violet gem", clientId = 3036, sell = 10000 }, - { itemName = "violet glass plate", clientId = 29347, sell = 2150 }, - { itemName = "volatile proto matter", clientId = 23514, sell = 300 }, - { itemName = "voodoo doll", clientId = 3002, sell = 400 }, - { itemName = "wailing widow's necklace", clientId = 10412, sell = 3000 }, - { itemName = "wand of cosmic energy", clientId = 3073, sell = 2000 }, - { itemName = "wand of decay", clientId = 3072, sell = 1000 }, - { itemName = "wand of defiance", clientId = 16096, sell = 6500 }, - { itemName = "wand of draconia", clientId = 8093, sell = 1500 }, - { itemName = "wand of dragonbreath", clientId = 3075, sell = 200 }, - { itemName = "wand of everblazing", clientId = 16115, sell = 6000 }, - { itemName = "wand of inferno", clientId = 3071, sell = 3000 }, - { itemName = "wand of starstorm", clientId = 8092, sell = 3600 }, - { itemName = "wand of voodoo", clientId = 8094, sell = 4400 }, - { itemName = "wand of vortex", clientId = 3074, sell = 100 }, - { itemName = "war axe", clientId = 3342, sell = 12000 }, - { itemName = "war crystal", clientId = 9654, sell = 460 }, - { itemName = "war hammer", clientId = 3279, sell = 1200 }, - { itemName = "war horn", clientId = 2958, sell = 8000 }, - { itemName = "warmaster's wristguards", clientId = 10405, sell = 200 }, - { itemName = "warrior helmet", clientId = 3369, sell = 5000 }, - { itemName = "warrior's axe", clientId = 14040, sell = 11000 }, - { itemName = "warrior's shield", clientId = 14042, sell = 9000 }, - { itemName = "warwolf fur", clientId = 10318, sell = 30 }, - { itemName = "waspoid claw", clientId = 14080, sell = 320 }, - { itemName = "waspoid wing", clientId = 14081, sell = 190 }, - { itemName = "watch", clientId = 2906, sell = 6 }, - { itemName = "watermelon tourmaline (slice)", clientId = 33779, sell = 30000 }, - { itemName = "watermelon tourmaline", clientId = 33780, sell = 230000 }, - { itemName = "weaver's wandtip", clientId = 10397, sell = 250 }, - { itemName = "wedding ring", clientId = 3004, sell = 100 }, - { itemName = "werebadger claws", clientId = 22051, sell = 160 }, - { itemName = "werebadger skull", clientId = 22055, sell = 185 }, - { itemName = "werebadger trophy", clientId = 22101, sell = 9000 }, - { itemName = "werebear fur", clientId = 22057, sell = 185 }, - { itemName = "werebear skull", clientId = 22056, sell = 195 }, - { itemName = "werebear trophy", clientId = 22103, sell = 11000 }, - { itemName = "wereboar hooves", clientId = 22053, sell = 175 }, - { itemName = "wereboar loincloth", clientId = 22087, sell = 1500 }, - { itemName = "wereboar trophy", clientId = 22102, sell = 10000 }, - { itemName = "wereboar tusk", clientId = 22054, sell = 165 }, - { itemName = "werefox tail", clientId = 27463, sell = 200 }, - { itemName = "werefox trophy", clientId = 27706, sell = 9000 }, - { itemName = "werehyaena nose", clientId = 33943, sell = 220 }, - { itemName = "werehyaena talisman", clientId = 33944, sell = 350 }, - { itemName = "werehyaena trophy", clientId = 34219, sell = 12000 }, - { itemName = "werewolf amulet", clientId = 22060, sell = 3000 }, - { itemName = "werewolf fangs", clientId = 22052, sell = 180 }, - { itemName = "werewolf fur", clientId = 10317, sell = 380 }, - { itemName = "white deer antlers", clientId = 12544, sell = 400 }, - { itemName = "white deer skin", clientId = 12545, sell = 245 }, - { itemName = "white gem", clientId = 32769, sell = 12000 }, - { itemName = "white pearl", clientId = 3026, sell = 160 }, - { itemName = "white piece of cloth", clientId = 5909, sell = 100 }, - { itemName = "white silk flower", clientId = 34008, sell = 9000 }, - { itemName = "widow's mandibles", clientId = 10411, sell = 110 }, - { itemName = "wild flowers", clientId = 25691, sell = 120 }, - { itemName = "wimp tooth chain", clientId = 17847, sell = 120 }, - { itemName = "windborn colossus armor", clientId = 8055, sell = 50000 }, - { itemName = "winged tail", clientId = 10313, sell = 800 }, - { itemName = "winter wolf fur", clientId = 10295, sell = 20 }, - { itemName = "witch broom", clientId = 9652, sell = 60 }, - { itemName = "witch hat", clientId = 9653, sell = 5000 }, - { itemName = "withered pauldrons", clientId = 27607, sell = 850 }, - { itemName = "withered scalp", clientId = 27608, sell = 900 }, - { itemName = "wolf paw", clientId = 5897, sell = 70 }, - { itemName = "wolf trophy", clientId = 7394, sell = 3000 }, - { itemName = "wood cape", clientId = 3575, sell = 5000 }, - { itemName = "wood mushroom", clientId = 3727, sell = 15 }, - { itemName = "wood", clientId = 5901, sell = 5 }, - { itemName = "wooden hammer", clientId = 3459, sell = 15 }, - { itemName = "wooden shield", clientId = 3412, sell = 5 }, - { itemName = "wooden spellbook", clientId = 25699, sell = 12000 }, - { itemName = "wool", clientId = 10319, sell = 15 }, - { itemName = "writhing brain", clientId = 32600, sell = 370000 }, - { itemName = "writhing heart", clientId = 32599, sell = 185000 }, - { itemName = "wyrm scale", clientId = 9665, sell = 400 }, - { itemName = "wyvern fang", clientId = 7408, sell = 1500 }, - { itemName = "wyvern talisman", clientId = 9644, sell = 265 }, - { itemName = "yellow gem", clientId = 3037, sell = 1000 }, - { itemName = "yellow piece of cloth", clientId = 5914, sell = 150 }, - { itemName = "yielocks", clientId = 12805, sell = 600 }, - { itemName = "yielowax", clientId = 12742, sell = 600 }, - { itemName = "yirkas' egg", clientId = 34102, sell = 280 }, - { itemName = "young lich worm", clientId = 31590, sell = 25000 }, - { itemName = "zaoan armor", clientId = 10384, sell = 14000 }, - { itemName = "zaoan halberd", clientId = 10406, sell = 500 }, - { itemName = "zaoan helmet", clientId = 10385, sell = 45000 }, - { itemName = "zaoan legs", clientId = 10387, sell = 14000 }, - { itemName = "zaoan robe", clientId = 10439, sell = 12000 }, - { itemName = "zaoan shoes", clientId = 10386, sell = 5000 }, - { itemName = "zaoan sword", clientId = 10390, sell = 30000 }, - { itemName = "zaogun flag", clientId = 10413, sell = 600 }, - { itemName = "zaogun's shoulderplates", clientId = 10414, sell = 150 }, +npcConfig.shop = LootShopConfig + +local function creatureSayCallback(npc, player, type, message) + local formattedCategoryNames = {} + for categoryName, _ in pairs(LootShopConfigTable) do + table.insert(formattedCategoryNames, "{" .. categoryName .. "}") + end + + local categoryTable = LootShopConfigTable[message:lower()] + if MsgContains(message, "shop options") then + npcHandler:say("I sell a selection of " .. table.concat(formattedCategoryNames, ", "), npc, player) + elseif categoryTable then + npcHandler:say("Here are the items for the category " .. message, npc, player) + npc:openShopWindowTable(player, categoryTable) + end +end - { itemName = "all loot in pouch", clientId = ITEM_GOLD_POUCH, sell = 1 }, -} +npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) +npcHandler:setMessage(MESSAGE_GREET, "Ah, a customer! Be greeted, |PLAYERNAME|! I buy all kinds of loot, would you like a {trade}? I can also show you my {shop options}.") +npcHandler:setMessage(MESSAGE_SENDTRADE, "Ah, a customer! Be greeted, |PLAYERNAME|! I buy all kinds of loot, would you like a {trade}? I can also show you my {shop options}.") -- On buy npc shop message npcType.onBuyItem = function(npc, player, itemId, subType, amount, ignore, inBackpacks, totalCost) diff --git a/data-otservbr-global/npc/undal.lua b/data-otservbr-global/npc/undal.lua index 786487fea2c..ad0346e7e77 100644 --- a/data-otservbr-global/npc/undal.lua +++ b/data-otservbr-global/npc/undal.lua @@ -53,5 +53,121 @@ end npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) +local outfits = { 1147, 1146 } + +local function hasOutfit(player) + for _, outfit in ipairs(outfits) do + if player:hasOutfit(outfit) then + return true + end + end + return false +end + +local function hasAddon(player, addon) + for _, outfit in ipairs(outfits) do + if player:hasOutfit(outfit, addon) then + return true + end + end + return false +end + +local function hasKllledTheNightmareBeast(player) + return player:getStorageValue(Storage.Quest.U12_00.TheDreamCourts.NightmareBeastKilled) == 1 +end + +local function checkAchievement(player) + if hasAddon(player, 3) then + player:addAchievement("Dream Warrior") + end +end + +local function creatureSayCallback(npc, creature, type, message) + local player = Player(creature) + local playerId = player:getId() + + if not npcHandler:checkInteraction(npc, creature) then + return false + end + + if npcHandler:getTopic(playerId) == 0 then + if MsgContains(message, "task") or MsgContains(message, "outfit") then + if hasOutfit(player) then + npcHandler:say("You already have the Dream Warrior outfit.", npc, creature) + return true + end + + if not hasKllledTheNightmareBeast(player) then + npcHandler:say("You need to kill the Nightmare Beast first.", npc, creature) + return true + end + + npcHandler:say("The Nightmare Beast is slain. You have done well. The Courts of Summer and Winter will be forever grateful. For your efforts I want to reward you with our traditional dream warrior outfit. May it suit you well!", npc, creature) + for _, outfit in ipairs(outfits) do + player:addOutfit(outfit, 0) + end + return true + end + + if MsgContains(message, "addon") then + if not hasOutfit(player) then + npcHandler:say("You don't have the Dream Warrior outfit.", npc, creature) + return true + end + npcHandler:say("Are you interested in one or two addons to your dream warrior outfit?", npc, creature) + npcHandler:setTopic(playerId, 1) + return true + end + elseif npcHandler:getTopic(playerId) == 1 then + if MsgContains(message, "yes") then + npcHandler:say("I provide two addons. For the first one I need you to bring me five pomegranates. For the second addon you need an ice shield. Which one would you like? {Pomegranate} or {shield}?", npc, creature) + npcHandler:setTopic(playerId, 2) + else + npcHandler:say("Alright then. Come back if you change your mind.", npc, creature) + npcHandler:setTopic(playerId, 0) + end + elseif npcHandler:getTopic(playerId) == 2 then + if MsgContains(message, "pomegranate") then + if hasAddon(player, 1) then + npcHandler:say("You already have this addon.", npc, creature) + return true + end + if player:removeItem(30169, 5) then + npcHandler:say("Great! Here is the addon.", npc, creature) + for _, outfit in ipairs(outfits) do + player:addOutfitAddon(outfit, 1) + end + player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) + checkAchievement(player) + npcHandler:setTopic(playerId, 0) + else + npcHandler:say("Sorry, you don't have the required items.", npc, creature) + end + elseif MsgContains(message, "shield") then + if hasAddon(player, 2) then + npcHandler:say("You already have this addon.", npc, creature) + return true + end + if player:removeItem(30168, 1) then + npcHandler:say("Great! Here is the addon.", npc, creature) + for _, outfit in ipairs(outfits) do + player:addOutfitAddon(outfit, 2) + end + player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) + checkAchievement(player) + npcHandler:setTopic(playerId, 0) + else + npcHandler:say("Sorry, you don't have the required items.", npc, creature) + end + else + npcHandler:say("Sorry, I didn't understand.", npc, creature) + return true + end + end +end + +npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) + -- npcType registering the npcConfig table npcType:register(npcConfig) diff --git a/data-otservbr-global/npc/vanys.lua b/data-otservbr-global/npc/vanys.lua index 0d7c1e009ea..c922ce8c8cd 100644 --- a/data-otservbr-global/npc/vanys.lua +++ b/data-otservbr-global/npc/vanys.lua @@ -53,5 +53,121 @@ end npcHandler:addModule(FocusModule:new(), npcConfig.name, true, true, true) +local outfits = { 1147, 1146 } + +local function hasOutfit(player) + for _, outfit in ipairs(outfits) do + if player:hasOutfit(outfit) then + return true + end + end + return false +end + +local function hasAddon(player, addon) + for _, outfit in ipairs(outfits) do + if player:hasOutfit(outfit, addon) then + return true + end + end + return false +end + +local function hasKllledTheNightmareBeast(player) + return player:getStorageValue(Storage.Quest.U12_00.TheDreamCourts.NightmareBeastKilled) == 1 +end + +local function checkAchievement(player) + if hasAddon(player, 3) then + player:addAchievement("Dream Warrior") + end +end + +local function creatureSayCallback(npc, creature, type, message) + local player = Player(creature) + local playerId = player:getId() + + if not npcHandler:checkInteraction(npc, creature) then + return false + end + + if npcHandler:getTopic(playerId) == 0 then + if MsgContains(message, "task") or MsgContains(message, "outfit") then + if hasOutfit(player) then + npcHandler:say("You already have the Dream Warrior outfit.", npc, creature) + return true + end + + if not hasKllledTheNightmareBeast(player) then + npcHandler:say("You need to kill the Nightmare Beast first.", npc, creature) + return true + end + + npcHandler:say("The Nightmare Beast is slain. You have done well. The Courts of Summer and Winter will be forever grateful. For your efforts I want to reward you with our traditional dream warrior outfit. May it suit you well!", npc, creature) + for _, outfit in ipairs(outfits) do + player:addOutfit(outfit, 0) + end + return true + end + + if MsgContains(message, "addon") then + if not hasOutfit(player) then + npcHandler:say("You don't have the Dream Warrior outfit.", npc, creature) + return true + end + npcHandler:say("Are you interested in one or two addons to your dream warrior outfit?", npc, creature) + npcHandler:setTopic(playerId, 1) + return true + end + elseif npcHandler:getTopic(playerId) == 1 then + if MsgContains(message, "yes") then + npcHandler:say("I provide two addons. For the first one I need you to bring me five pomegranates. For the second addon you need an ice shield. Which one would you like? {Pomegranate} or {shield}?", npc, creature) + npcHandler:setTopic(playerId, 2) + else + npcHandler:say("Alright then. Come back if you change your mind.", npc, creature) + npcHandler:setTopic(playerId, 0) + end + elseif npcHandler:getTopic(playerId) == 2 then + if MsgContains(message, "pomegranate") then + if hasAddon(player, 1) then + npcHandler:say("You already have this addon.", npc, creature) + return true + end + if player:removeItem(30169, 5) then + npcHandler:say("Great! Here is the addon.", npc, creature) + for _, outfit in ipairs(outfits) do + player:addOutfitAddon(outfit, 1) + end + player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) + checkAchievement(player) + npcHandler:setTopic(playerId, 0) + else + npcHandler:say("Sorry, you don't have the required items.", npc, creature) + end + elseif MsgContains(message, "shield") then + if hasAddon(player, 2) then + npcHandler:say("You already have this addon.", npc, creature) + return true + end + if player:removeItem(30168, 1) then + npcHandler:say("Great! Here is the addon.", npc, creature) + for _, outfit in ipairs(outfits) do + player:addOutfitAddon(outfit, 2) + end + player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) + checkAchievement(player) + npcHandler:setTopic(playerId, 0) + else + npcHandler:say("Sorry, you don't have the required items.", npc, creature) + end + else + npcHandler:say("Sorry, I didn't understand.", npc, creature) + return true + end + end +end + +npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) + -- npcType registering the npcConfig table npcType:register(npcConfig) diff --git a/data-otservbr-global/scripts/actions/addons/addons.lua b/data-otservbr-global/scripts/actions/addons/addons.lua index 8fea3d0b074..0658ab69312 100644 --- a/data-otservbr-global/scripts/actions/addons/addons.lua +++ b/data-otservbr-global/scripts/actions/addons/addons.lua @@ -20,6 +20,9 @@ local config = { -- rascoohan [35595] = { female = 1372, male = 1371, addon = 1, achievement = "Honorary Rascoohan" }, [35695] = { female = 1372, male = 1371, addon = 2, achievement = "Honorary Rascoohan" }, + -- fire-fighter + [39544] = { female = 1569, male = 1568, addon = 1, achievement = "Friendly Fire" }, + [39545] = { female = 1569, male = 1568, addon = 2, achievement = "Friendly Fire" }, } local addons = Action() diff --git a/data-otservbr-global/scripts/actions/adventurers_guild/adventurers_stone.lua b/data-otservbr-global/scripts/actions/adventurers_guild/adventurers_stone.lua index d39577418a5..a73caac912e 100644 --- a/data-otservbr-global/scripts/actions/adventurers_guild/adventurers_stone.lua +++ b/data-otservbr-global/scripts/actions/adventurers_guild/adventurers_stone.lua @@ -29,7 +29,7 @@ local config = { { fromPos = Position(32340, 32217, 7), toPos = Position(32355, 32232, 7), townId = TOWNS_LIST.THAIS }, { fromPos = Position(32910, 32070, 7), toPos = Position(32930, 32082, 7), townId = TOWNS_LIST.VENORE }, { fromPos = Position(33119, 32836, 7), toPos = Position(33133, 32850, 7), townId = TOWNS_LIST.ANKRAHMUN }, - { fromPos = Position(33160, 31794, 8), toPos = Position(33175, 31814, 8), townId = TOWNS_LIST.EDRON }, + { fromPos = Position(33160, 31794, 9), toPos = Position(33175, 31814, 8), townId = TOWNS_LIST.EDRON }, { fromPos = Position(33018, 31448, 11), toPos = Position(33035, 31457, 11), townId = TOWNS_LIST.FARMINE }, { fromPos = Position(33205, 32455, 8), toPos = Position(33223, 32466, 8), townId = TOWNS_LIST.DARASHIA }, { fromPos = Position(32327, 32831, 7), toPos = Position(32340, 32847, 7), townId = TOWNS_LIST.LIBERTY_BAY }, @@ -69,16 +69,16 @@ function adventurersStone.onUse(player, item, fromPosition, target, toPosition, if config.enableTemples then for _, temple in ipairs(config.Temples) do - if isInRange(playerPos, temple.fromPos, temple.toPos) then + if playerPos:isInRange(temple.fromPos, temple.toPos) then allowed, townId = true, temple.townId break end end end - if config.enableDepots then + if config.enableDepots and not allowed then for _, depot in ipairs(config.Depots) do - if isInRange(playerPos, depot.fromPos, depot.toPos) then + if playerPos:isInRange(depot.fromPos, depot.toPos) then allowed, townId = true, depot.townId break end diff --git a/data-otservbr-global/scripts/actions/farmine/oberon_lever.lua b/data-otservbr-global/scripts/actions/farmine/oberon_lever.lua index 0ec20531e46..e7a1a104d52 100644 --- a/data-otservbr-global/scripts/actions/farmine/oberon_lever.lua +++ b/data-otservbr-global/scripts/actions/farmine/oberon_lever.lua @@ -14,12 +14,6 @@ local config = { from = Position(33357, 31312, 9), to = Position(33371, 31324, 9), }, - monsters = { - { name = "Oberon's Bile", pos = Position(33361, 31316, 9) }, - { name = "Oberon's Hate", pos = Position(33367, 31316, 9) }, - { name = "Oberon's Spite", pos = Position(33361, 31320, 9) }, - { name = "Oberon's Ire", pos = Position(33367, 31320, 9) }, - }, exit = Position(33364, 31341, 9), } diff --git a/data-otservbr-global/scripts/actions/object/moonlight_crystals.lua b/data-otservbr-global/scripts/actions/object/moonlight_crystals.lua index 76762d4a85c..e8dbf007312 100644 --- a/data-otservbr-global/scripts/actions/object/moonlight_crystals.lua +++ b/data-otservbr-global/scripts/actions/object/moonlight_crystals.lua @@ -2,24 +2,30 @@ local moonlightCrystals = Action() function moonlightCrystals.onUse(player, item, fromPosition, target, toPosition, isHotkey) if target.itemid == 22060 then - target:transform(22061) + target:remove() + player:addItem(22061, 1) item:remove(1) return true elseif target.itemid == 22062 then if (player:getStorageValue(Storage.Grimvale.WereHelmetEnchant) == 0) or (player:getStorageValue(Storage.Grimvale.WereHelmetEnchant) == 1) then - target:transform(24783) -- Magic level helmet + target:remove() -- Magic level helmet + player:addItem(24783, 1) item:remove(1) elseif player:getStorageValue(Storage.Grimvale.WereHelmetEnchant) == 2 then - target:transform(22132) -- Paladin helmet + target:remove() -- Paladin helmet + player:addItem(22132, 1) item:remove(1) elseif player:getStorageValue(Storage.Grimvale.WereHelmetEnchant) == 3 then - target:transform(22128) -- Knight club + target:remove() -- Knight club + player:addItem(22128, 1) item:remove(1) elseif player:getStorageValue(Storage.Grimvale.WereHelmetEnchant) == 4 then - target:transform(22130) -- Knight axe + target:remove() -- Knight axe + player:addItem(22130, 1) item:remove(1) elseif player:getStorageValue(Storage.Grimvale.WereHelmetEnchant) == 5 then - target:transform(22129) -- Knight sword + target:remove() -- Knight sword + player:addItem(22129, 1) item:remove(1) else return false diff --git a/data-otservbr-global/scripts/actions/object/rope_down.lua b/data-otservbr-global/scripts/actions/object/rope_down.lua index f12613660cf..87d66d4b188 100644 --- a/data-otservbr-global/scripts/actions/object/rope_down.lua +++ b/data-otservbr-global/scripts/actions/object/rope_down.lua @@ -1,11 +1,22 @@ -local action = Action() +local cobraBastion = Action() -function action.onUse(player, item, fromPosition, target, toPosition, isHotkey) +function cobraBastion.onUse(player, item, fromPosition, target, toPosition, isHotkey) if not player then return false end player:teleportTo(Position(33394, 32650, 2)) end -action:position(Position(33395, 32651, 1)) -action:register() +cobraBastion:position(Position(33395, 32651, 1)) +cobraBastion:register() + +local oskayaat = Action() +function oskayaat.onUse(player, item, fromPosition, target, toPosition, isHotkey) + if not player then + return false + end + player:teleportTo(Position(33014, 32983, 8)) +end + +oskayaat:position(Position(33014, 32983, 7)) +oskayaat:register() diff --git a/data-otservbr-global/scripts/actions/other/bag_you_covet.lua b/data-otservbr-global/scripts/actions/other/bag_you_covet.lua index ddc381c69d1..e332d9fd3f2 100644 --- a/data-otservbr-global/scripts/actions/other/bag_you_covet.lua +++ b/data-otservbr-global/scripts/actions/other/bag_you_covet.lua @@ -15,7 +15,7 @@ local rewards = { { id = 43887, name = "Sanguine Galoshes" }, } -BagYouCovetId = 43895 +BagYouCovetId = 43898 local bagyouCovet = Action() diff --git a/data-otservbr-global/scripts/actions/other/dolls.lua b/data-otservbr-global/scripts/actions/other/dolls.lua index 255bdfa21f5..32864dcd109 100644 --- a/data-otservbr-global/scripts/actions/other/dolls.lua +++ b/data-otservbr-global/scripts/actions/other/dolls.lua @@ -56,6 +56,12 @@ local dolls = { "My dark magic lies on tibialatina.wikia.com", }, [21962] = { "Hail Tibia Brasileiros! (União&Força)" }, + [32918] = { + "COME HERE! FREE ITEMS FOR EVERYONE!", + "DON'T BE AFRAID! I AM COMING IN PEACE!", + "BOW TO THE POWER OF THE RUTHLESS SEVEN!", + "Slay your friends and I will spare you!", + }, } local doll = Action() diff --git a/data-otservbr-global/scripts/actions/other/music.lua b/data-otservbr-global/scripts/actions/other/music.lua index 519a36e1f81..9e5cbe5cb7b 100644 --- a/data-otservbr-global/scripts/actions/other/music.lua +++ b/data-otservbr-global/scripts/actions/other/music.lua @@ -35,7 +35,7 @@ local MusicEffect = { local music = Action() function music.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 2949 then - if isInRange(player:getPosition(), Position(32695, 31717, 2), Position(32699, 31719, 2)) then + if player:getPosition():isInRange(Position(32695, 31717, 2), Position(32699, 31719, 2)) then local lyreProgress = player:getStorageValue(Storage.Diapason.Lyre) if lyreProgress < 7 and player:getStorageValue(Storage.Diapason.Edala) ~= 1 and player:getStorageValue(Storage.Diapason.LyreTimer) < os.time() then player:setStorageValue(Storage.Diapason.Lyre, math.max(0, lyreProgress) + 1) @@ -44,7 +44,7 @@ function music.onUse(player, item, fromPosition, target, toPosition, isHotkey) end end elseif item.itemid == 2953 then - if isInRange(player:getPosition(), Position(33540, 32245, 7), Position(33542, 32247, 7)) then + if player:getPosition():isInRange(Position(33540, 32245, 7), Position(33542, 32247, 7)) then local ThreatenedDreams = Storage.Quest.U11_40.ThreatenedDreams local UnlikelyCouple = player:getStorageValue(ThreatenedDreams.Mission03.UnlikelyCouple) local PanpipesTimer = player:getStorageValue(ThreatenedDreams.Mission03.PanpipesTimer) diff --git a/data-otservbr-global/scripts/actions/other/surprise_bag.lua b/data-otservbr-global/scripts/actions/other/surprise_bag.lua index bbe76e26055..052fc987c61 100644 --- a/data-otservbr-global/scripts/actions/other/surprise_bag.lua +++ b/data-otservbr-global/scripts/actions/other/surprise_bag.lua @@ -89,7 +89,7 @@ function surpriseBag.onUse(cid, item, fromPosition, itemEx, toPosition) local count = 1 local gift = present[math.random(1, #present)] if type(gift) == "table" then - count = gift[2] + count = math.random(1, gift[2]) gift = gift[1] end diff --git a/data-otservbr-global/scripts/actions/other/watch.lua b/data-otservbr-global/scripts/actions/other/watch.lua index d989856ace5..a97fce78cbf 100644 --- a/data-otservbr-global/scripts/actions/other/watch.lua +++ b/data-otservbr-global/scripts/actions/other/watch.lua @@ -5,5 +5,5 @@ function watch.onUse(player, item, fromPosition, target, toPosition, isHotkey) return true end -watch:id(2445, 2446, 2447, 2448, 2906, 2771) +watch:id(2445, 2446, 2447, 2448, 2906, 2771, 6091) watch:register() diff --git a/data-otservbr-global/scripts/actions/quests/adventures_of_galthen/iksupan_entrance.lua b/data-otservbr-global/scripts/actions/quests/adventures_of_galthen/iksupan_entrance.lua index 8ec086eeb8b..79a74c4f8cd 100644 --- a/data-otservbr-global/scripts/actions/quests/adventures_of_galthen/iksupan_entrance.lua +++ b/data-otservbr-global/scripts/actions/quests/adventures_of_galthen/iksupan_entrance.lua @@ -1,5 +1,5 @@ local config = { - { position = { x = 32728, y = 32878, z = 7 }, destination = { x = 34015, y = 31890, z = 8 } }, + { position = { x = 32728, y = 32875, z = 7 }, destination = { x = 34015, y = 31890, z = 8 } }, } local entrance = Action() diff --git a/data-otservbr-global/scripts/actions/quests/adventures_of_galthen/iksupan_exit.lua b/data-otservbr-global/scripts/actions/quests/adventures_of_galthen/iksupan_exit.lua index 0a4a27478b0..09f53f88c79 100644 --- a/data-otservbr-global/scripts/actions/quests/adventures_of_galthen/iksupan_exit.lua +++ b/data-otservbr-global/scripts/actions/quests/adventures_of_galthen/iksupan_exit.lua @@ -1,5 +1,6 @@ local config = { { position = { x = 34015, y = 31892, z = 8 }, destination = { x = 32728, y = 32880, z = 7 } }, + { position = { x = 34041, y = 31726, z = 10 }, destination = { x = 32728, y = 32880, z = 7 } }, } local exit = MoveEvent() diff --git a/data-otservbr-global/scripts/actions/quests/elemental_spheres/lord_of_elements_lever.lua b/data-otservbr-global/scripts/actions/quests/elemental_spheres/lord_of_elements_lever.lua index 997e4acbdc6..3e90bf6ac90 100644 --- a/data-otservbr-global/scripts/actions/quests/elemental_spheres/lord_of_elements_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/elemental_spheres/lord_of_elements_lever.lua @@ -63,7 +63,7 @@ local config = { local function resetRoom(players) for i = 1, #players do local player = Player(players[i]) - if player and isInRange(player:getPosition(), config.area.from, config.area.to) then + if player and player:getPosition():isInRange(config.area.from, config.area.to) then player:teleportTo(config.exitPosition) config.exitPosition:sendMagicEffect(CONST_ME_TELEPORT) end @@ -104,7 +104,7 @@ local function warnPlayers(players) local player for i = 1, #players do player = Player(players[i]) - if player and isInRange(player:getPosition(), config.roomArea.from, config.roomArea.to) then + if player and player:getPosition():isInRange(config.roomArea.from, config.roomArea.to) then break end player = nil diff --git a/data-otservbr-global/scripts/actions/quests/elemental_spheres/machine2.lua b/data-otservbr-global/scripts/actions/quests/elemental_spheres/machine2.lua index 8ec90c1ce07..26fd74a62e5 100644 --- a/data-otservbr-global/scripts/actions/quests/elemental_spheres/machine2.lua +++ b/data-otservbr-global/scripts/actions/quests/elemental_spheres/machine2.lua @@ -1,6 +1,6 @@ local elementalSpheresMachine2 = Action() function elementalSpheresMachine2.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if not isInRange(toPosition, Position(33238, 31806, 12), Position(33297, 31865, 12)) then + if not toPosition:isInRange(Position(33238, 31806, 12), Position(33297, 31865, 12)) then return false end diff --git a/data-otservbr-global/scripts/actions/quests/elemental_spheres/soils2.lua b/data-otservbr-global/scripts/actions/quests/elemental_spheres/soils2.lua index daf2973d2b5..db55886635b 100644 --- a/data-otservbr-global/scripts/actions/quests/elemental_spheres/soils2.lua +++ b/data-otservbr-global/scripts/actions/quests/elemental_spheres/soils2.lua @@ -18,7 +18,7 @@ function elementalSpheresSoils2.onUse(player, item, fromPosition, target, toPosi return false end - if not isInRange(toPosition, { x = 33238, y = 31806, z = 12 }, { x = 33297, y = 31865, z = 12 }) then + if not toPosition:isInRange({ x = 33238, y = 31806, z = 12 }, { x = 33297, y = 31865, z = 12 }) then return false end diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/bone_flute.lua b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/bone_flute.lua index 842ea96aef2..def47cc49ca 100644 --- a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/bone_flute.lua +++ b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/bone_flute.lua @@ -6,7 +6,7 @@ function ferumbrasAscendantBoneFlute.onUse(player, item, fromPosition, target, t if player:getStorageValue(Storage.FerumbrasAscension.BoneFlute) >= 1 then return false end - if not isInRange(target:getPosition(), Position(33477, 32775, 11), Position(33493, 32781, 11)) then + if not target:getPosition():isInRange(Position(33477, 32775, 11), Position(33493, 32781, 11)) then return false end if target:getName():lower() == "snake" or target:getName():lower() == "lion" or target:getName():lower() == "bear" or target:getName():lower() == "seagull" or target:getName():lower() == "pig" then diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/flower_puzzle_lever.lua b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/flower_puzzle_lever.lua index 7f49c9c7f7f..6cc91c9d45a 100644 --- a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/flower_puzzle_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/flower_puzzle_lever.lua @@ -34,11 +34,11 @@ function ferumbrasAscendantFlowerPuzzle.onUse(player, item, fromPosition, target return true end end - if Game.getStorageValue(Storage.FerumbrasAscension.FlowerPuzzleTimer) >= 1 then + if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.FlowerPuzzleTimer) >= 1 then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The portal still activated.") else - Game.setStorageValue(Storage.FerumbrasAscension.FlowerPuzzleTimer, 1) - addEvent(Game.setStorageValue, 30 * 1000, Storage.FerumbrasAscension.FlowerPuzzleTimer, 0) + Game.setStorageValue(GlobalStorage.FerumbrasAscendant.FlowerPuzzleTimer, 1) + addEvent(Game.setStorageValue, 30 * 1000, GlobalStorage.FerumbrasAscendant.FlowerPuzzleTimer, 0) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "A portal forms as two beams of a strange construction dividing this room move towards each other.") for x = 33475, 33479 do local pos = Position(x, 32698, 14) diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/ragiaz_lever.lua b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/ragiaz_lever.lua index bf24a598d81..4fc83e29aa0 100644 --- a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/ragiaz_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/ragiaz_lever.lua @@ -12,6 +12,12 @@ local config = { { pos = Position(33459, 32356, 13), teleport = Position(33482, 32339, 13), effect = CONST_ME_TELEPORT }, { pos = Position(33460, 32356, 13), teleport = Position(33482, 32339, 13), effect = CONST_ME_TELEPORT }, }, + monsters = { + { name = "Death Dragon", pos = Position(33476, 32331, 13) }, + { name = "Death Dragon", pos = Position(33476, 32340, 13) }, + { name = "Death Dragon", pos = Position(33487, 32340, 13) }, + { name = "Death Dragon", pos = Position(33488, 32331, 13) }, + }, specPos = { from = Position(33468, 32319, 13), to = Position(33495, 32347, 13), @@ -19,23 +25,6 @@ local config = { exit = Position(33319, 32318, 13), } -local deathDragons = { - Position(33476, 32331, 13), - Position(33476, 32340, 13), - Position(33487, 32340, 13), - Position(33488, 32331, 13), -} - -local ferumbrasAscendantRagiaz = Action() -function ferumbrasAscendantRagiaz.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if CreateDefaultLeverBoss(player, config) then - for _, pos in pairs(deathDragons) do - Game.createMonster("Death Dragon", pos, true, true) - end - return true - end - return false -end - -ferumbrasAscendantRagiaz:uid(1023) -ferumbrasAscendantRagiaz:register() +local lever = BossLever(config) +lever:uid(1023) +lever:register() diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/sacrifice.lua b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/sacrifice.lua index e906f6f98cf..cf69d4dc968 100644 --- a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/sacrifice.lua +++ b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/sacrifice.lua @@ -7,7 +7,7 @@ local fount = { local ferumbrasAscendantSacrifice = Action() function ferumbrasAscendantSacrifice.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if not target.actionid == 53805 or Tile(Position(33415, 32379, 12)):getItemById(22161) or player:getStorageValue(Storage.FerumbrasAscension.Fount) >= 4 then + if not target.actionid == 53805 or Tile(Position(33415, 32379, 12)):getItemById(22163) or player:getStorageValue(Storage.FerumbrasAscension.Fount) >= 4 then return false end if item.itemid == 22158 then diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/teleportation_rod.lua b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/teleportation_rod.lua index 78292f6d34c..062233e7eb7 100644 --- a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/teleportation_rod.lua +++ b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/teleportation_rod.lua @@ -1,11 +1,11 @@ local config = { - [24830] = { storageKey = Storage.FerumbrasAscension.Razzagorn }, - [24831] = { storageKey = Storage.FerumbrasAscension.Ragiaz }, - [24832] = { storageKey = Storage.FerumbrasAscension.Zamulosh }, - [24833] = { storageKey = Storage.FerumbrasAscension.Mazoran }, - [24834] = { storageKey = Storage.FerumbrasAscension.Tarbaz }, - [24835] = { storageKey = Storage.FerumbrasAscension.Shulgrax }, - [24836] = { storageKey = Storage.FerumbrasAscension.Plagirath }, + [22174] = { storageKey = Storage.FerumbrasAscension.Razzagorn }, + [22175] = { storageKey = Storage.FerumbrasAscension.Ragiaz }, + [22176] = { storageKey = Storage.FerumbrasAscension.Zamulosh }, + [22177] = { storageKey = Storage.FerumbrasAscension.Mazoran }, + [22178] = { storageKey = Storage.FerumbrasAscension.Tarbaz }, + [22179] = { storageKey = Storage.FerumbrasAscension.Shulgrax }, + [22180] = { storageKey = Storage.FerumbrasAscension.Plagirath }, } local ferumbrasAscendantTeleportation = Action() diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/zamulosh_lever.lua b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/zamulosh_lever.lua index f59534879e3..94c7d59c0b2 100644 --- a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/zamulosh_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/zamulosh_lever.lua @@ -28,16 +28,6 @@ local zamuloshSummons = { Position(33644, 32756, 11), } -local ferumbrasAscendantZamulosh = Action() -function ferumbrasAscendantZamulosh.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if CreateDefaultLeverBoss(player, config) then - for _, pos in pairs(zamuloshSummons) do - Game.createMonster("Zamulosh3", pos, true, true) - end - return true - end - return false -end - -ferumbrasAscendantZamulosh:uid(1026) -ferumbrasAscendantZamulosh:register() +local lever = BossLever(config) +lever:uid(1026) +lever:register() diff --git a/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua b/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua index ec9d9ab4800..e3db2db8c6a 100644 --- a/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua +++ b/data-otservbr-global/scripts/creaturescripts/customs/freequests.lua @@ -371,6 +371,10 @@ local questTable = { { storage = Storage.HeroRathleton.AccessDoor, storageValue = 1 }, { storage = Storage.HeroRathleton.FastWay, storageValue = 1 }, + + -- Sea Serpent Quest + { storage = Storage.Quest.U8_2.FishForASerpent.QuestLine, storageValue = 5 }, + { storage = Storage.Quest.U8_2.TheHuntForTheSeaSerpent.QuestLine, storageValue = 2 }, } -- from Position: (33201, 31762, 1) diff --git a/data-otservbr-global/scripts/creaturescripts/customs/reward_exercise.lua b/data-otservbr-global/scripts/creaturescripts/customs/reward_exercise.lua index f17304cec00..7ef792fe10e 100644 --- a/data-otservbr-global/scripts/creaturescripts/customs/reward_exercise.lua +++ b/data-otservbr-global/scripts/creaturescripts/customs/reward_exercise.lua @@ -10,4 +10,6 @@ function winReward.onLogin(player) return true end -winReward:register() +if configManager.getBoolean(configKeys.TOGGLE_RECEIVE_REWARD) then + winReward:register() +end diff --git a/data-otservbr-global/scripts/creaturescripts/others/login_events.lua b/data-otservbr-global/scripts/creaturescripts/others/login_events.lua index 7adef4c07a1..2f570a72e3e 100644 --- a/data-otservbr-global/scripts/creaturescripts/others/login_events.lua +++ b/data-otservbr-global/scripts/creaturescripts/others/login_events.lua @@ -1,7 +1,6 @@ local loginEvents = CreatureEvent("LoginEvents") function loginEvents.onLogin(player) local events = { - --Others "AdvanceSave", "BossParticipation", "DropLoot", diff --git a/data-otservbr-global/scripts/creaturescripts/quests/cults_of_tibia/leiden_heal.lua b/data-otservbr-global/scripts/creaturescripts/quests/cults_of_tibia/leiden_heal.lua index 1eaf838ec28..85d61186ccf 100644 --- a/data-otservbr-global/scripts/creaturescripts/quests/cults_of_tibia/leiden_heal.lua +++ b/data-otservbr-global/scripts/creaturescripts/quests/cults_of_tibia/leiden_heal.lua @@ -1,16 +1,14 @@ local leidenHeal = CreatureEvent("LeidenHeal") function leidenHeal.onHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin) - if creature:getName():lower() == "leiden" then - if attacker and attacker:isPlayer() then - primaryType = COMBAT_HEALING - secondaryType = primaryType - if primaryDamage < 0 then - primaryDamage = primaryDamage * -1 - end - secondaryDamage = primaryDamage - creature:addHealth(primaryDamage < 0 and -primaryDamage or primaryDamage) - return primaryDamage, primaryType, secondaryDamage, secondaryType + if attacker and attacker:isPlayer() then + primaryType = COMBAT_HEALING + secondaryType = primaryType + if primaryDamage < 0 then + primaryDamage = primaryDamage * -1 end + secondaryDamage = primaryDamage + creature:addHealth(primaryDamage < 0 and -primaryDamage or primaryDamage) + return primaryDamage, primaryType, secondaryDamage, secondaryType end return primaryDamage, primaryType, secondaryDamage, secondaryType end diff --git a/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/bosses_kill.lua b/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/bosses_kill.lua index 5d81cf2f22c..8993c4b9063 100644 --- a/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/bosses_kill.lua +++ b/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/bosses_kill.lua @@ -3,7 +3,7 @@ local bosses = { ["tarbaz"] = { teleportPos = Position(33460, 32853, 11), godbreakerPos = Position(33427, 32852, 13) }, ["ragiaz"] = { teleportPos = Position(33482, 32345, 13), godbreakerPos = Position(33466, 32392, 13) }, ["plagirath"] = { teleportPos = Position(33174, 31511, 13), godbreakerPos = Position(33204, 31510, 13) }, - ["razzagorn"] = { teleportPos = Position(33413, 32467, 14), godbreakerPos = Position(33357, 32440, 13) }, + ["razzagorn"] = { teleportPos = Position(33357, 32434, 12), godbreakerPos = Position(33357, 32440, 13) }, ["zamulosh"] = { teleportPos = Position(33644, 32764, 11), godbreakerPos = Position(33678, 32758, 13) }, ["mazoran"] = { teleportPos = Position(33585, 32699, 14), godbreakerPos = Position(33614, 32679, 15) }, ["shulgrax"] = { teleportPos = Position(33486, 32796, 13), godbreakerPos = Position(33459, 32820, 14) }, diff --git a/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/rift_invader_death.lua b/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/rift_invader_death.lua index a3d049f4581..3db8456d1d1 100644 --- a/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/rift_invader_death.lua +++ b/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/rift_invader_death.lua @@ -22,7 +22,7 @@ function riftInvaderDeath.onDeath(creature, corpse, lasthitkiller, mostdamagekil for i = 1, #crystals do local crystal = crystals[i] - if isInRange(creature:getPosition(), crystal.fromPosition, crystal.toPosition) then + if creature:getPosition():isInRange(crystal.fromPosition, crystal.toPosition) then if Game.getStorageValue(crystal.globalStorage) > 8 then local item = Tile(crystal.crystalPosition):getItemById(14955) if not item then diff --git a/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/the_shatterer_kill.lua b/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/the_shatterer_kill.lua index a132bf68f17..493db2c089e 100644 --- a/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/the_shatterer_kill.lua +++ b/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/the_shatterer_kill.lua @@ -95,7 +95,7 @@ function theShattererKill.onDeath(creature) local oldPos = teleport:getDestination() if teleport then teleport:transform(22761) - targetMonster:getPosition():sendMagicEffect(CONST_ME_THUNDER) + creature:getPosition():sendMagicEffect(CONST_ME_THUNDER) teleport:setDestination(newPos) addEvent(revertTeleport, 2 * 60 * 1000, teleportPos, 22761, 1949, oldPos) revert() diff --git a/data-otservbr-global/scripts/creaturescripts/quests/in_service_of_yalahar/azerus_kill.lua b/data-otservbr-global/scripts/creaturescripts/quests/in_service_of_yalahar/azerus_kill.lua index e0243544958..0b288679c18 100644 --- a/data-otservbr-global/scripts/creaturescripts/quests/in_service_of_yalahar/azerus_kill.lua +++ b/data-otservbr-global/scripts/creaturescripts/quests/in_service_of_yalahar/azerus_kill.lua @@ -8,15 +8,14 @@ end local azerus = CreatureEvent("AzerusDeath") function azerus.onDeath(creature) - local targetMonster = creature:getMonster() - local position = targetMonster:getPosition() + local position = creature:getPosition() position:sendMagicEffect(CONST_ME_TELEPORT) local item = Game.createItem(1949, 1, position) local teleportToPosition = Position(32780, 31168, 14) if item:isTeleport() then item:setDestination(teleportToPosition) end - targetMonster:say("Azerus ran into teleporter! It will disappear in 2 minutes. Enter it!", TALKTYPE_MONSTER_SAY, 0, 0, position) + creature:say("Azerus ran into teleporter! It will disappear in 2 minutes. Enter it!", TALKTYPE_MONSTER_SAY, 0, 0, position) --remove portal after 2 min addEvent(removeTeleport, 2 * 60 * 1000, position) diff --git a/data-otservbr-global/scripts/creaturescripts/quests/the_primal_ordeal/magma_bubble_death.lua b/data-otservbr-global/scripts/creaturescripts/quests/the_primal_ordeal/magma_bubble_death.lua index 953918d959e..121b4071da0 100644 --- a/data-otservbr-global/scripts/creaturescripts/quests/the_primal_ordeal/magma_bubble_death.lua +++ b/data-otservbr-global/scripts/creaturescripts/quests/the_primal_ordeal/magma_bubble_death.lua @@ -1,15 +1,26 @@ local magmaBubbleDeath = CreatureEvent("MagmaBubbleDeath") + +local function hasOutfit(player) + return player:hasOutfit(1569) or player:hasOutfit(1568) +end + function magmaBubbleDeath.onDeath(creature, corpse, killer, mostDamage, unjustified, mostDamage_unjustified) if not creature then return end local damageMap = creature:getMonster():getDamageMap() - for key, value in pairs(damageMap) do local player = Player(key) - if player and player:getStorageValue(Storage.Quest.U12_90.PrimalOrdeal.Bosses.MagmaBubbleKilled) < 1 then - player:setStorageValue(Storage.Quest.U12_90.PrimalOrdeal.Bosses.MagmaBubbleKilled, 1) -- Access to The primal menace boss fight + if player then + if not hasOutfit(player) then + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Congratulations you received the Fire-Fighter Outfit.") + player:addOutfit(1569, 0) + player:addOutfit(1568, 0) + end + if player:getStorageValue(Storage.Quest.U12_90.PrimalOrdeal.Bosses.MagmaBubbleKilled) < 1 then + player:setStorageValue(Storage.Quest.U12_90.PrimalOrdeal.Bosses.MagmaBubbleKilled, 1) -- Access to The primal menace boss fight + end end end end diff --git a/data-otservbr-global/scripts/globalevents/quests/demon_oak_voices.lua b/data-otservbr-global/scripts/globalevents/quests/demon_oak_voices.lua index c5266d1e149..54d86db95fe 100644 --- a/data-otservbr-global/scripts/globalevents/quests/demon_oak_voices.lua +++ b/data-otservbr-global/scripts/globalevents/quests/demon_oak_voices.lua @@ -19,7 +19,7 @@ function demonOakVoices.onThink(interval, lastExecution) local sound = sounds[math.random(#sounds)] for i = 1, #spectators do spectator = spectators[i] - if isInRange(spectator:getPosition(), questArea[1], questArea[2]) then + if spectator:getPosition():isInRange(questArea[1], questArea[2]) then return true end spectator:say(sound, TALKTYPE_MONSTER_YELL, false, 0, DEMON_OAK_POSITION) diff --git a/data-otservbr-global/scripts/lib/register_actions.lua b/data-otservbr-global/scripts/lib/register_actions.lua index b55cfca6c33..1522ad20417 100644 --- a/data-otservbr-global/scripts/lib/register_actions.lua +++ b/data-otservbr-global/scripts/lib/register_actions.lua @@ -323,13 +323,13 @@ local function addFerumbrasAscendantReward(player, target, toPosition) end end - if target.itemid == 10551 and target.actionid == 53803 then - if player:getStorageValue(Storage.FerumbrasAscendant.Ring) >= 1 then + if target.itemid == 22872 and target.actionid == 53803 then + if player:getStorageValue(Storage.FerumbrasAscension.Ring) >= 1 then return false end player:addItem(22170, 1) - player:setStorageValue(Storage.FerumbrasAscendant.Ring, 1) + player:setStorageValue(Storage.FerumbrasAscension.Ring, 1) end end diff --git a/data-otservbr-global/scripts/lib/register_spells.lua b/data-otservbr-global/scripts/lib/register_spells.lua index 0aa63ca3471..49a5d7aec2f 100644 --- a/data-otservbr-global/scripts/lib/register_spells.lua +++ b/data-otservbr-global/scripts/lib/register_spells.lua @@ -283,6 +283,18 @@ AREA_CIRCLE1X1 = { { 0, 1, 0 }, } +AREA_CIRCLE4X4 = { + { 0, 0, 0, 0, 1, 0, 0, 0, 0 }, + { 0, 0, 0, 1, 1, 1, 0, 0, 0 }, + { 0, 0, 1, 1, 1, 1, 1, 0, 0 }, + { 0, 1, 1, 1, 1, 1, 1, 1, 0 }, + { 1, 1, 1, 1, 3, 1, 1, 1, 1 }, + { 0, 1, 1, 1, 1, 1, 1, 1, 0 }, + { 0, 0, 1, 1, 1, 1, 1, 0, 0 }, + { 0, 0, 0, 1, 1, 1, 0, 0, 0 }, + { 0, 0, 0, 0, 1, 0, 0, 0, 0 }, +} + AREA_CIRCLE5X5 = { { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0 }, diff --git a/data-otservbr-global/scripts/lib/shops.lua b/data-otservbr-global/scripts/lib/shops.lua new file mode 100644 index 00000000000..84902899489 --- /dev/null +++ b/data-otservbr-global/scripts/lib/shops.lua @@ -0,0 +1,1604 @@ +SupplyShopConfigTable = { + ["foods"] = { + { itemName = "brown mushroom", clientId = 3725, buy = 10 }, + { itemName = "fire mushroom", clientId = 3731, buy = 300 }, + }, + ["exercise weapons"] = { + { itemName = "enhanced exercise axe", clientId = 35280, buy = 2340000 }, + { itemName = "enhanced exercise bow", clientId = 35282, buy = 2340000 }, + { itemName = "enhanced exercise club", clientId = 35281, buy = 2340000 }, + { itemName = "enhanced exercise rod", clientId = 35283, buy = 2340000 }, + { itemName = "enhanced exercise shield", clientId = 44066, buy = 2340000 }, + { itemName = "enhanced exercise sword", clientId = 35279, buy = 2340000 }, + { itemName = "enhanced exercise wand", clientId = 35284, buy = 2340000 }, + { itemName = "exercise axe", clientId = 28553, buy = 1800000 }, + { itemName = "exercise bow", clientId = 28555, buy = 1800000 }, + { itemName = "exercise club", clientId = 28554, buy = 1800000 }, + { itemName = "exercise rod", clientId = 28556, buy = 1800000 }, + { itemName = "exercise shield", clientId = 44065, buy = 1800000 }, + { itemName = "exercise sword", clientId = 28552, buy = 1800000 }, + { itemName = "exercise wand", clientId = 28557, buy = 1800000 }, + { itemName = "masterful exercise axe", clientId = 35286, buy = 2700000 }, + { itemName = "masterful exercise bow", clientId = 35288, buy = 2700000 }, + { itemName = "masterful exercise club", clientId = 35287, buy = 2700000 }, + { itemName = "masterful exercise rod", clientId = 35289, buy = 2700000 }, + { itemName = "masterful exercise shield", clientId = 44067, buy = 2700000 }, + { itemName = "masterful exercise sword", clientId = 35285, buy = 2700000 }, + { itemName = "masterful exercise wand", clientId = 35290, buy = 2700000 }, + }, + ["distance equipments"] = { + { itemName = "envenomed arrow", clientId = 16143, buy = 12 }, + { itemName = "diamond arrow", clientId = 35901, buy = 100 }, + { itemName = "drill bolt", clientId = 16142, buy = 12 }, + { itemName = "crystalline arrow", clientId = 15793, buy = 20 }, + { itemName = "blue quiver", clientId = 35848, buy = 400 }, + { itemName = "bolt", clientId = 3446, buy = 4 }, + { itemName = "bow", clientId = 3350, buy = 400 }, + { itemName = "arrow", clientId = 3447, buy = 3 }, + { itemName = "assassin star", clientId = 7368, buy = 100 }, + { itemName = "earth arrow", clientId = 774, buy = 5 }, + { itemName = "enchanted spear", clientId = 7367, buy = 30 }, + { itemName = "flaming arrow", clientId = 763, buy = 5 }, + { itemName = "flash arrow", clientId = 761, buy = 5 }, + { itemName = "royal star", clientId = 25759, buy = 110 }, + { itemName = "quiver", clientId = 35562, buy = 400 }, + { itemName = "red quiver", clientId = 35849, buy = 400 }, + { itemName = "power bolt", clientId = 3450, buy = 7 }, + { itemName = "piercing bolt", clientId = 7363, buy = 5 }, + { itemName = "onyx arrow", clientId = 7365, buy = 7 }, + { itemName = "prismatic bolt", clientId = 16141, buy = 20 }, + { itemName = "shiver arrow", clientId = 762, buy = 5 }, + { itemName = "sniper arrow", clientId = 7364, buy = 5 }, + { itemName = "spear", clientId = 3277, buy = 5 }, + { itemName = "spectral bolt", clientId = 35902, buy = 70 }, + { itemName = "throwing star", clientId = 3287, buy = 42 }, + { itemName = "tarsal arrow", clientId = 14251, buy = 6 }, + { itemName = "vortex bolt", clientId = 14252, buy = 6 }, + { itemName = "hunting spear", clientId = 3347, buy = 25 }, + }, + ["runes"] = { + { itemName = "animate dead rune", clientId = 3203, buy = 375 }, + { itemName = "avalanche rune", clientId = 3161, buy = 57 }, + { itemName = "blank rune", clientId = 3147, buy = 10 }, + { itemName = "chameleon rune", clientId = 3178, buy = 210 }, + { itemName = "convince creature rune", clientId = 3177, buy = 80 }, + { itemName = "cure poison rune", clientId = 3153, buy = 65 }, + { itemName = "desintegrate rune", clientId = 3197, buy = 26 }, + { itemName = "destroy field rune", clientId = 3148, buy = 15 }, + { itemName = "divine rain rune", clientId = 3186, buy = 57 }, + { itemName = "energy bomb rune", clientId = 3149, buy = 203 }, + { itemName = "energy field rune", clientId = 3164, buy = 38 }, + { itemName = "energy wall rune", clientId = 3166, buy = 85 }, + { itemName = "explosion rune", clientId = 3200, buy = 31 }, + { itemName = "fire bomb rune", clientId = 3192, buy = 147 }, + { itemName = "fire field rune", clientId = 3188, buy = 28 }, + { itemName = "fire wall rune", clientId = 3190, buy = 61 }, + { itemName = "fireball rune", clientId = 3189, buy = 65 }, + { itemName = "great fireball rune", clientId = 3191, buy = 57 }, + { itemName = "heavy magic missile rune", clientId = 3198, buy = 65 }, + { itemName = "holy missile rune", clientId = 3182, buy = 16 }, + { itemName = "icicle rune", clientId = 3158, buy = 65 }, + { itemName = "intense healing rune", clientId = 3152, buy = 95 }, + { itemName = "light magic missile rune", clientId = 3174, buy = 4 }, + { itemName = "magic wall rune", clientId = 3180, buy = 116 }, + { itemName = "paralyze rune", clientId = 3165, buy = 700 }, + { itemName = "poison bomb rune", clientId = 3173, buy = 85 }, + { itemName = "poison field rune", clientId = 3172, buy = 21 }, + { itemName = "poison wall rune", clientId = 3176, buy = 52 }, + { itemName = "soulfire rune", clientId = 3195, buy = 46 }, + { itemName = "stalagmite rune", clientId = 3179, buy = 65 }, + { itemName = "stone shower rune", clientId = 3175, buy = 57 }, + { itemName = "sudden death rune", clientId = 3155, buy = 135 }, + { itemName = "thunderstorm rune", clientId = 3202, buy = 57 }, + { itemName = "ultimate healing rune", clientId = 3160, buy = 175 }, + { itemName = "wild growth rune", clientId = 3156, buy = 160 }, + }, + ["tools"] = { + { itemName = "fishing rod", clientId = 3483, buy = 150 }, + { itemName = "flask of rust remover", clientId = 9016, buy = 50 }, + { itemName = "torch", clientId = 2920, buy = 2 }, + { itemName = "worm", clientId = 3492, buy = 1 }, + { itemName = "crowbar", clientId = 3304, buy = 260 }, + { itemName = "backpack", clientId = 2854, buy = 20 }, + }, + ["amulets"] = { + { itemName = "gill necklace", clientId = 16108, buy = 20000 }, + { itemName = "glacier amulet", clientId = 815, buy = 15000 }, + { itemName = "leviathan's amulet", clientId = 9303, buy = 30000 }, + { itemName = "magma amulet", clientId = 817, buy = 15000 }, + { itemName = "lightning pendant", clientId = 816, buy = 15000 }, + { itemName = "prismatic necklace", clientId = 16113, buy = 20000 }, + { itemName = "sacred tree amulet", clientId = 9302, buy = 30000 }, + { itemName = "shockwave amulet", clientId = 9304, buy = 30000 }, + { itemName = "stone skin amulet", clientId = 3081, buy = 5000 }, + { itemName = "collar of blue plasma", clientId = 23542, buy = 60000 }, + { itemName = "collar of green plasma", clientId = 23543, buy = 60000 }, + { itemName = "collar of red plasma", clientId = 23544, buy = 60000 }, + { itemName = "terra amulet", clientId = 814, buy = 15000 }, + }, + ["rings"] = { + { itemName = "life ring", clientId = 3052, buy = 900 }, + { itemName = "might ring", clientId = 3048, buy = 5000 }, + { itemName = "ring of blue plasma", clientId = 23529, buy = 80000 }, + { itemName = "ring of green plasma", clientId = 23531, buy = 80000 }, + { itemName = "ring of healing", clientId = 3098, buy = 2000 }, + { itemName = "prismatic ring", clientId = 16114, buy = 100000 }, + { itemName = "ring of red plasma", clientId = 23533, buy = 80000 }, + { itemName = "stealth ring", clientId = 3049, buy = 5000 }, + { itemName = "time ring", clientId = 3053, buy = 2000 }, + { itemName = "dwarven ring", clientId = 3097, buy = 2000 }, + { itemName = "energy ring", clientId = 3051, buy = 2000 }, + }, + ["potions"] = { + { itemName = "great health potion", clientId = 239, buy = 225 }, + { itemName = "great mana potion", clientId = 238, buy = 144 }, + { itemName = "great spirit potion", clientId = 7642, buy = 228 }, + { itemName = "health potion", clientId = 266, buy = 50 }, + { itemName = "mana potion", clientId = 268, buy = 56 }, + { itemName = "mana shield potion", clientId = 35563, buy = 200000 }, + { itemName = "ultimate health potion", clientId = 7643, buy = 379 }, + { itemName = "ultimate mana potion", clientId = 23373, buy = 438 }, + { itemName = "ultimate spirit potion", clientId = 23374, buy = 438 }, + { itemName = "supreme health potion", clientId = 23375, buy = 625 }, + { itemName = "strong health potion", clientId = 236, buy = 115 }, + { itemName = "strong mana potion", clientId = 237, buy = 93 }, + }, +} + +SupplyShopConfig = {} +for _, categoryTable in pairs(SupplyShopConfigTable) do + for _, itemTable in ipairs(categoryTable) do + table.insert(SupplyShopConfig, itemTable) + end +end + +function FindSupplyShopItem(itemName) + for _, item in ipairs(SupplyShopConfig) do + if string.starts(item.itemName:lower(), itemName:lower()) then + return item + end + end +end + +LootShopConfigTable = { + ["creature products"] = { + { itemName = "abomination's eye", clientId = 36792, sell = 650000 }, + { itemName = "abomination's tail", clientId = 36791, sell = 700000 }, + { itemName = "abomination's tongue", clientId = 36793, sell = 950000 }, + { itemName = "afflicted strider head", clientId = 36789, sell = 900 }, + { itemName = "afflicted strider worms", clientId = 36790, sell = 500 }, + { itemName = "alptramun's toothbrush", clientId = 29943, sell = 270000 }, + { itemName = "acorn", clientId = 10296, sell = 10 }, + { itemName = "amber with a bug", clientId = 32624, sell = 41000 }, + { itemName = "amber with a dragonfly", clientId = 32625, sell = 56000 }, + { itemName = "amber", clientId = 32626, sell = 20000 }, + { itemName = "ancient belt buckle", clientId = 24384, sell = 260 }, + { itemName = "ancient liche bone", clientId = 31588, sell = 28000 }, + { itemName = "antlers", clientId = 10297, sell = 50 }, + { itemName = "apron", clientId = 33933, sell = 1300 }, + { itemName = "badger fur", clientId = 10299, sell = 15 }, + { itemName = "badger fur", clientId = 903, sell = 15 }, + { itemName = "bamboo stick", clientId = 11445, sell = 30 }, + { itemName = "banana sash", clientId = 11511, sell = 55 }, + { itemName = "basalt fetish", clientId = 17856, sell = 210 }, + { itemName = "bashmu fang", clientId = 36820, sell = 600 }, + { itemName = "bashmu feather", clientId = 36823, sell = 350 }, + { itemName = "bashmu tongue", clientId = 36821, sell = 400 }, + { itemName = "bed of nails", clientId = 25743, sell = 500 }, + { itemName = "beer tap", clientId = 32114, sell = 50 }, + { itemName = "beetle carapace", clientId = 24381, sell = 200 }, + { itemName = "beetle necklace", clientId = 10457, sell = 1500 }, + { itemName = "bejeweled ship's telescope", clientId = 9616, sell = 20000 }, + { itemName = "berserker", clientId = 7403, sell = 40000 }, + { itemName = "black hood", clientId = 9645, sell = 190 }, + { itemName = "black skull", clientId = 9056, sell = 4000 }, + { itemName = "black wool", clientId = 11448, sell = 300 }, + { itemName = "blazing bone", clientId = 16131, sell = 610 }, + { itemName = "blemished spawn abdomen", clientId = 36779, sell = 550 }, + { itemName = "blemished spawn head", clientId = 36778, sell = 800 }, + { itemName = "blemished spawn tail", clientId = 36780, sell = 1000 }, + { itemName = "blood preservation", clientId = 11449, sell = 320 }, + { itemName = "blood tincture in a vial", clientId = 18928, sell = 360 }, + { itemName = "bloody dwarven beard", clientId = 17827, sell = 110 }, + { itemName = "bloody pincers", clientId = 9633, sell = 100 }, + { itemName = "bloody tears", clientId = 32594, sell = 70000 }, + { itemName = "blue glass plate", clientId = 29345, sell = 60 }, + { itemName = "blue goanna scale", clientId = 31559, sell = 230 }, + { itemName = "boar man hoof", clientId = 40584, sell = 600 }, + { itemName = "boggy dreads", clientId = 9667, sell = 200 }, + { itemName = "bola", clientId = 17809, sell = 35 }, + { itemName = "bone fetish", clientId = 17831, sell = 150 }, + { itemName = "bone shoulderplate", clientId = 10404, sell = 150 }, + { itemName = "bone toothpick", clientId = 24380, sell = 150 }, + { itemName = "bonecarving knife", clientId = 17830, sell = 190 }, + { itemName = "bones of zorvorax", clientId = 24942, sell = 10000 }, + { itemName = "bony tail", clientId = 10277, sell = 210 }, + { itemName = "book of necromantic rituals", clientId = 10320, sell = 180 }, + { itemName = "book of prayers", clientId = 9646, sell = 120 }, + { itemName = "book page", clientId = 28569, sell = 640 }, + { itemName = "bowl of terror sweat", clientId = 20204, sell = 500 }, + { itemName = "brain head's giant neuron", clientId = 32578, sell = 100000 }, + { itemName = "brain head's left hemisphere", clientId = 32579, sell = 90000 }, + { itemName = "brain head's right hemisphere", clientId = 32580, sell = 50000 }, + { itemName = "brainstealer's brain", clientId = 36795, sell = 300000 }, + { itemName = "brainstealer's brainwave", clientId = 36796, sell = 440000 }, + { itemName = "brainstealer's tissue", clientId = 36794, sell = 240000 }, + { itemName = "bright bell", clientId = 30324, sell = 220 }, + { itemName = "brimstone fangs", clientId = 11702, sell = 380 }, + { itemName = "brimstone shell", clientId = 11703, sell = 210 }, + { itemName = "broken bell", clientId = 30185, sell = 150 }, + { itemName = "broken crossbow", clientId = 11451, sell = 30 }, + { itemName = "broken draken mail", clientId = 11660, sell = 340 }, + { itemName = "broken gladiator shield", clientId = 9656, sell = 190 }, + { itemName = "broken halberd", clientId = 10418, sell = 100 }, + { itemName = "broken helmet", clientId = 11453, sell = 20 }, + { itemName = "broken iks faulds", clientId = 40531, sell = 530 }, + { itemName = "broken iks headpiece", clientId = 40532, sell = 560 }, + { itemName = "broken iks sandals", clientId = 40534, sell = 440 }, + { itemName = "broken key ring", clientId = 11652, sell = 8000 }, + { itemName = "broken longbow", clientId = 34161, sell = 130 }, + { itemName = "broken macuahuitl", clientId = 40530, sell = 1000 }, + { itemName = "broken ring of ending", clientId = 12737, sell = 4000 }, + { itemName = "broken shamanic staff", clientId = 11452, sell = 35 }, + { itemName = "broken slicer", clientId = 11661, sell = 120 }, + { itemName = "broken throwing axe", clientId = 17851, sell = 230 }, + { itemName = "broken visor", clientId = 20184, sell = 1900 }, + { itemName = "bronze amulet", clientId = 3056, sell = 50, count = 200 }, + { itemName = "brooch of embracement", clientId = 34023, sell = 14000 }, + { itemName = "brutetamer's staff", clientId = 7379, sell = 1500 }, + { itemName = "buckle", clientId = 17829, sell = 7000 }, + { itemName = "bunch of ripe rice", clientId = 10328, sell = 75 }, + { itemName = "bunch of troll hair", clientId = 9689, sell = 30 }, + { itemName = "bundle of cursed straw", clientId = 9688, sell = 800 }, + { itemName = "capricious heart", clientId = 34138, sell = 2100 }, + { itemName = "capricious robe", clientId = 34145, sell = 1200 }, + { itemName = "carniphila seeds", clientId = 10300, sell = 50 }, + { itemName = "carnisylvan bark", clientId = 36806, sell = 230 }, + { itemName = "carnisylvan finger", clientId = 36805, sell = 250 }, + { itemName = "carnivostrich feathers", clientId = 40586, sell = 550 }, + { itemName = "carrion worm fang", clientId = 10275, sell = 35 }, + { itemName = "cat's paw", clientId = 5479, sell = 2000 }, + { itemName = "cave chimera head", clientId = 36787, sell = 1200 }, + { itemName = "cave chimera leg", clientId = 36788, sell = 650 }, + { itemName = "cave devourer eyes", clientId = 27599, sell = 550 }, + { itemName = "cave devourer legs", clientId = 27601, sell = 350 }, + { itemName = "cave devourer maw", clientId = 27600, sell = 600 }, + { itemName = "cavebear skull", clientId = 12316, sell = 550 }, + { itemName = "centipede leg", clientId = 10301, sell = 28 }, + { itemName = "chasm spawn abdomen", clientId = 27603, sell = 240 }, + { itemName = "chasm spawn head", clientId = 27602, sell = 850 }, + { itemName = "chasm spawn tail", clientId = 27604, sell = 120 }, + { itemName = "cheese cutter", clientId = 17817, sell = 50 }, + { itemName = "cheesy figurine", clientId = 17818, sell = 150 }, + { itemName = "cheesy membership card", clientId = 35614, sell = 120000 }, + { itemName = "chicken feather", clientId = 5890, sell = 30 }, + { itemName = "chitinous mouth", clientId = 27622, sell = 10000 }, + { itemName = "chitinous mouth", clientId = 27626, sell = 10000 }, + { itemName = "cliff strider claw", clientId = 16134, sell = 800 }, + { itemName = "closed trap", clientId = 3481, sell = 75 }, + { itemName = "coal", clientId = 12600, sell = 20 }, + { itemName = "cobra crest", clientId = 31678, sell = 650 }, + { itemName = "cobra tongue", clientId = 9634, sell = 15 }, + { itemName = "colourful feather", clientId = 11514, sell = 110 }, + { itemName = "colourful feathers", clientId = 25089, sell = 400 }, + { itemName = "colourful snail shell", clientId = 25696, sell = 250 }, + { itemName = "compass", clientId = 10302, sell = 45 }, + { itemName = "compound eye", clientId = 14083, sell = 150 }, + { itemName = "condensed energy", clientId = 23501, sell = 260 }, + { itemName = "coral branch", clientId = 39406, sell = 360 }, + { itemName = "coral brooch", clientId = 24391, sell = 750 }, + { itemName = "corrupt naga scales", clientId = 39415, sell = 570 }, + { itemName = "corrupted flag", clientId = 10409, sell = 700 }, + { itemName = "countess sorrow's frozen tear", clientId = 6536, sell = 50000 }, + { itemName = "cow bell", clientId = 32012, sell = 120 }, + { itemName = "cowbell", clientId = 21204, sell = 210 }, + { itemName = "crab man claw", clientId = 40582, sell = 550 }, + { itemName = "crab pincers", clientId = 10272, sell = 35 }, + { itemName = "crawler head plating", clientId = 14079, sell = 210 }, + { itemName = "crawler's essence", clientId = 33982, sell = 3700 }, + { itemName = "crest of the deep seas", clientId = 21892, sell = 10000 }, + { itemName = "cruelty's chest", clientId = 33923, sell = 720000 }, + { itemName = "cruelty's claw", clientId = 33922, sell = 640000 }, + { itemName = "crunor idol", clientId = 30055, sell = 30000 }, + { itemName = "crystal bone", clientId = 23521, sell = 250 }, + { itemName = "cultish mask", clientId = 9638, sell = 280 }, + { itemName = "cultish robe", clientId = 9639, sell = 150 }, + { itemName = "cultish symbol", clientId = 11455, sell = 500 }, + { itemName = "curious matter", clientId = 23511, sell = 430 }, + { itemName = "curl of hair", clientId = 36809, sell = 320000 }, + { itemName = "cursed bone", clientId = 32774, sell = 6000 }, + { itemName = "cursed shoulder spikes", clientId = 10410, sell = 320 }, + { itemName = "cyclops toe", clientId = 9657, sell = 55 }, + { itemName = "daedal chisel", clientId = 40522, sell = 480 }, + { itemName = "damaged armor plates", clientId = 28822, sell = 280 }, + { itemName = "damaged worm head", clientId = 27620, sell = 8000 }, + { itemName = "damselfly eye", clientId = 17463, sell = 25 }, + { itemName = "damselfly wing", clientId = 17458, sell = 20 }, + { itemName = "dandelion seeds", clientId = 25695, sell = 200 }, + { itemName = "dangerous proto matter", clientId = 23515, sell = 300 }, + { itemName = "dark bell", clientId = 30325, sell = 250 }, + { itemName = "dark bell", clientId = 32596, sell = 310000 }, + { itemName = "dead weight", clientId = 20202, sell = 450 }, + { itemName = "deepling breaktime snack", clientId = 14011, sell = 90 }, + { itemName = "deepling claw", clientId = 14044, sell = 430 }, + { itemName = "deepling guard belt buckle", clientId = 14010, sell = 230 }, + { itemName = "deepling ridge", clientId = 14041, sell = 360 }, + { itemName = "deepling scales", clientId = 14017, sell = 80 }, + { itemName = "deepling warts", clientId = 14012, sell = 180 }, + { itemName = "deeptags", clientId = 14013, sell = 290 }, + { itemName = "deepworm jaws", clientId = 27594, sell = 500 }, + { itemName = "deepworm spike roots", clientId = 27593, sell = 650 }, + { itemName = "deepworm spikes", clientId = 27592, sell = 800 }, + { itemName = "demon horn", clientId = 5954, sell = 1000 }, + { itemName = "demonic finger", clientId = 12541, sell = 1000 }, + { itemName = "demonic skeletal hand", clientId = 9647, sell = 80 }, + { itemName = "diabolic skull", clientId = 34025, sell = 19000 }, + { itemName = "diremaw brainpan", clientId = 27597, sell = 350 }, + { itemName = "diremaw legs", clientId = 27598, sell = 270 }, + { itemName = "dirty turban", clientId = 11456, sell = 120 }, + { itemName = "distorted heart", clientId = 34142, sell = 2100 }, + { itemName = "distorted robe", clientId = 34149, sell = 1200 }, + { itemName = "downy feather", clientId = 11684, sell = 20 }, + { itemName = "dowser", clientId = 19110, sell = 35 }, + { itemName = "dracola's eye", clientId = 6546, sell = 50000 }, + { itemName = "dragon blood", clientId = 24937, sell = 700 }, + { itemName = "dragon priest's wandtip", clientId = 10444, sell = 175 }, + { itemName = "dragon tongue", clientId = 24938, sell = 550 }, + { itemName = "dragon's tail", clientId = 11457, sell = 100 }, + { itemName = "draken sulphur", clientId = 11658, sell = 550 }, + { itemName = "draken wristbands", clientId = 11659, sell = 430 }, + { itemName = "draptor scales", clientId = 12309, sell = 800 }, + { itemName = "dream essence egg", clientId = 30005, sell = 205 }, + { itemName = "dung ball", clientId = 14225, sell = 130 }, + { itemName = "earflap", clientId = 17819, sell = 40 }, + { itemName = "elder bonelord tentacle", clientId = 10276, sell = 150 }, + { itemName = "elven astral observer", clientId = 11465, sell = 90 }, + { itemName = "elven hoof", clientId = 18994, sell = 115 }, + { itemName = "elven scouting glass", clientId = 11464, sell = 50 }, + { itemName = "elvish talisman", clientId = 9635, sell = 45 }, + { itemName = "emerald tortoise shell", clientId = 39379, sell = 2150 }, + { itemName = "empty honey glass", clientId = 31331, sell = 270 }, + { itemName = "energy ball", clientId = 23523, sell = 300 }, + { itemName = "energy vein", clientId = 23508, sell = 270 }, + { itemName = "enigmatic voodoo skull", clientId = 5669, sell = 4000 }, + { itemName = "ensouled essence", clientId = 32698, sell = 820 }, + { itemName = "essence of a bad dream", clientId = 10306, sell = 360 }, + { itemName = "eternal flames", clientId = 946, sell = 5000 }, + { itemName = "execowtioner mask", clientId = 21201, sell = 240 }, + { itemName = "ethno coat", clientId = 8064, sell = 200 }, + { itemName = "eye of a deepling", clientId = 12730, sell = 150 }, + { itemName = "eye of a weeper", clientId = 16132, sell = 650 }, + { itemName = "eye of corruption", clientId = 11671, sell = 390 }, + { itemName = "eyeless devourer legs", clientId = 36776, sell = 650 }, + { itemName = "eyeless devourer maw", clientId = 36775, sell = 420 }, + { itemName = "eyeless devourer tongue", clientId = 36777, sell = 900 }, + { itemName = "fafnar symbol", clientId = 31443, sell = 950 }, + { itemName = "fairy wings", clientId = 25694, sell = 200 }, + { itemName = "falcon crest", clientId = 28823, sell = 650 }, + { itemName = "fern", clientId = 3737, sell = 20 }, + { itemName = "fiery heart", clientId = 9636, sell = 375 }, + { itemName = "fiery tear", clientId = 39040, sell = 1070000 }, + { itemName = "fig leaf", clientId = 25742, sell = 200 }, + { itemName = "fir cone", clientId = 19111, sell = 25 }, + { itemName = "flask of embalming fluid", clientId = 11466, sell = 30 }, + { itemName = "flask of warrior's sweat", clientId = 5885, sell = 10000 }, + { itemName = "flotsam", clientId = 39407, sell = 330 }, + { itemName = "flower dress", clientId = 9015, sell = 1000 }, + { itemName = "flower wreath", clientId = 9013, sell = 500 }, + { itemName = "fox paw", clientId = 27462, sell = 100 }, + { itemName = "frazzle skin", clientId = 20199, sell = 400 }, + { itemName = "frazzle tongue", clientId = 20198, sell = 700 }, + { itemName = "frost giant pelt", clientId = 9658, sell = 160 }, + { itemName = "frosty ear of a troll", clientId = 9648, sell = 30 }, + { itemName = "frosty heart", clientId = 9661, sell = 280 }, + { itemName = "gauze bandage", clientId = 9649, sell = 90 }, + { itemName = "gear crystal", clientId = 9655, sell = 200 }, + { itemName = "gear wheel", clientId = 8775, sell = 500 }, + { itemName = "fur shred", clientId = 34164, sell = 200 }, + { itemName = "geomancer's robe", clientId = 11458, sell = 80 }, + { itemName = "geomancer's staff", clientId = 11463, sell = 120 }, + { itemName = "ghastly dragon head", clientId = 10449, sell = 700 }, + { itemName = "ghostly tissue", clientId = 9690, sell = 90 }, + { itemName = "ghoul snack", clientId = 11467, sell = 60 }, + { itemName = "giant crab pincer", clientId = 12317, sell = 950 }, + { itemName = "giant eye", clientId = 10280, sell = 380 }, + { itemName = "giant tentacle", clientId = 27619, sell = 10000 }, + { itemName = "girlish hair decoration", clientId = 11443, sell = 30 }, + { itemName = "girtablilu warrior carapace", clientId = 36971, sell = 520 }, + { itemName = "gland", clientId = 8143, sell = 500 }, + { itemName = "glistening bone", clientId = 23522, sell = 250 }, + { itemName = "glob of acid slime", clientId = 9054, sell = 25 }, + { itemName = "glob of glooth", clientId = 21182, sell = 125 }, + { itemName = "glob of mercury", clientId = 9053, sell = 20 }, + { itemName = "glob of tar", clientId = 9055, sell = 30 }, + { itemName = "gloom wolf fur", clientId = 22007, sell = 70 }, + { itemName = "glooth injection tube", clientId = 21103, sell = 350 }, + { itemName = "goanna claw", clientId = 31561, sell = 260 }, + { itemName = "goanna meat", clientId = 31560, sell = 190 }, + { itemName = "goat grass", clientId = 3674, sell = 50 }, + { itemName = "goblet of gloom", clientId = 34022, sell = 12000 }, + { itemName = "goblin ear", clientId = 11539, sell = 20 }, + { itemName = "goo shell", clientId = 19372, sell = 4000 }, + { itemName = "goosebump leather", clientId = 20205, sell = 650 }, + { itemName = "gore horn", clientId = 39377, sell = 2900 }, + { itemName = "gorerilla mane", clientId = 39392, sell = 2750 }, + { itemName = "gorerilla tail", clientId = 39393, sell = 2650 }, + { itemName = "grant of arms", clientId = 28824, sell = 950 }, + { itemName = "grappling hook", clientId = 35588, sell = 150 }, + { itemName = "grasshopper legs", clientId = 14087, sell = 15000 }, + { itemName = "grave flower", clientId = 3661, sell = 25 }, + { itemName = "greed's arm", clientId = 33924, sell = 950000 }, + { itemName = "green bandage", clientId = 25697, sell = 180 }, + { itemName = "green glass plate", clientId = 29346, sell = 180 }, + { itemName = "grimace", clientId = 32593, sell = 120000 }, + { itemName = "gruesome fan", clientId = 34024, sell = 15000 }, + { itemName = "guidebook", clientId = 25745, sell = 200 }, + { itemName = "hair of a banshee", clientId = 11446, sell = 350 }, + { itemName = "half-digested piece of meat", clientId = 10283, sell = 55 }, + { itemName = "half-digested stones", clientId = 27369, sell = 40 }, + { itemName = "half-eaten brain", clientId = 9659, sell = 85 }, + { itemName = "hand", clientId = 33936, sell = 1450 }, + { itemName = "harpoon of a giant snail", clientId = 27625, sell = 15000 }, + { itemName = "harpy feathers", clientId = 40585, sell = 730 }, + { itemName = "hatched rorc egg", clientId = 18997, sell = 30 }, + { itemName = "haunted piece of wood", clientId = 9683, sell = 115 }, + { itemName = "hazardous heart", clientId = 34140, sell = 5000 }, + { itemName = "hazardous robe", clientId = 34147, sell = 3000 }, + { itemName = "head", clientId = 33932, sell = 3500 }, + { itemName = "head", clientId = 33937, sell = 3200 }, + { itemName = "headpecker beak", clientId = 39387, sell = 2998 }, + { itemName = "headpecker feather", clientId = 39388, sell = 1300 }, + { itemName = "heaven blossom", clientId = 3657, sell = 50 }, + { itemName = "heavy machete", clientId = 3330, sell = 90 }, + { itemName = "heavy old tome", clientId = 23986, sell = 30 }, + { itemName = "hellhound slobber", clientId = 9637, sell = 500 }, + { itemName = "hellspawn tail", clientId = 10304, sell = 475 }, + { itemName = "hemp rope", clientId = 20206, sell = 350 }, + { itemName = "hideous chunk", clientId = 16140, sell = 510 }, + { itemName = "hieroglyph banner", clientId = 12482, sell = 500 }, + { itemName = "high guard flag", clientId = 10415, sell = 550 }, + { itemName = "high guard shoulderplates", clientId = 10416, sell = 130 }, + { itemName = "hollow stampor hoof", clientId = 12314, sell = 400 }, + { itemName = "holy ash", clientId = 17850, sell = 160 }, + { itemName = "horn of kalyassa", clientId = 24941, sell = 10000 }, + { itemName = "horn", clientId = 19359, sell = 300 }, + { itemName = "horoscope", clientId = 18926, sell = 40 }, + { itemName = "huge chunk of crude iron", clientId = 5892, sell = 15000 }, + { itemName = "huge shell", clientId = 27621, sell = 15000 }, + { itemName = "huge spiky snail shell", clientId = 27627, sell = 8000 }, + { itemName = "humongous chunk", clientId = 16139, sell = 540 }, + { itemName = "hunter's quiver", clientId = 11469, sell = 80 }, + { itemName = "hydra egg", clientId = 4839, sell = 500 }, + { itemName = "hydra head", clientId = 10282, sell = 600 }, + { itemName = "hydrophytes", clientId = 39410, sell = 220 }, + { itemName = "ice flower", clientId = 30058, sell = 370 }, + { itemName = "incantation notes", clientId = 18929, sell = 90 }, + { itemName = "infernal heart", clientId = 34139, sell = 2100 }, + { itemName = "infernal robe", clientId = 34146, sell = 1200 }, + { itemName = "inkwell", clientId = 28568, sell = 720 }, + { itemName = "instable proto matter", clientId = 23516, sell = 300 }, + { itemName = "ivory carving", clientId = 33945, sell = 300 }, + { itemName = "ivory comb", clientId = 32773, sell = 8000 }, + { itemName = "izcandar's snow globe", clientId = 29944, sell = 180000 }, + { itemName = "izcandar's sundial", clientId = 29945, sell = 225000 }, + { itemName = "jacket", clientId = 3561, sell = 1 }, + { itemName = "jaws", clientId = 34014, sell = 3900 }, + { itemName = "jewelled belt", clientId = 11470, sell = 180 }, + { itemName = "jungle moa claw", clientId = 39404, sell = 160 }, + { itemName = "jungle moa egg", clientId = 39405, sell = 250 }, + { itemName = "jungle moa feather", clientId = 39403, sell = 140 }, + { itemName = "katex' blood", clientId = 34100, sell = 210 }, + { itemName = "key to the drowned library", clientId = 14009, sell = 330 }, + { itemName = "kollos shell", clientId = 14077, sell = 420 }, + { itemName = "kongra's shoulderpad", clientId = 11471, sell = 100 }, + { itemName = "lamassu hoof", clientId = 31441, sell = 330 }, + { itemName = "lamassu horn", clientId = 31442, sell = 240 }, + { itemName = "lancer beetle shell", clientId = 10455, sell = 80 }, + { itemName = "lancet", clientId = 18925, sell = 90 }, + { itemName = "lava fungus head", clientId = 36785, sell = 900 }, + { itemName = "lava fungus ring", clientId = 36786, sell = 390 }, + { itemName = "lavaworm jaws", clientId = 36771, sell = 1100 }, + { itemName = "lavaworm spike roots", clientId = 36769, sell = 600 }, + { itemName = "lavaworm spikes", clientId = 36770, sell = 750 }, + { itemName = "legionnaire flags", clientId = 10417, sell = 500 }, + { itemName = "liodile fang", clientId = 40583, sell = 480 }, + { itemName = "lion cloak patch", clientId = 34162, sell = 190 }, + { itemName = "lion crest", clientId = 34160, sell = 270 }, + { itemName = "lion figurine", clientId = 33781, sell = 10000 }, + { itemName = "lion seal", clientId = 34163, sell = 210 }, + { itemName = "lion's mane", clientId = 9691, sell = 60 }, + { itemName = "little bowl of myrrh", clientId = 25702, sell = 500 }, + { itemName = "lizard essence", clientId = 11680, sell = 300 }, + { itemName = "lizard heart", clientId = 31340, sell = 530 }, + { itemName = "longing eyes", clientId = 27624, sell = 8000 }, + { itemName = "lost basher's spike", clientId = 17826, sell = 280 }, + { itemName = "lost bracers", clientId = 17853, sell = 140 }, + { itemName = "lost husher's staff", clientId = 17848, sell = 250 }, + { itemName = "lost soul", clientId = 32227, sell = 120 }, + { itemName = "luminescent crystal pickaxe", clientId = 32711, sell = 50 }, + { itemName = "luminous orb", clientId = 11454, sell = 1000 }, + { itemName = "lump of dirt", clientId = 9692, sell = 10 }, + { itemName = "lump of earth", clientId = 10305, sell = 130 }, + { itemName = "mad froth", clientId = 17854, sell = 80 }, + { itemName = "magma clump", clientId = 16130, sell = 570 }, + { itemName = "magma coat", clientId = 826, sell = 11000 }, + { itemName = "makara fin", clientId = 39401, sell = 350 }, + { itemName = "makara tongue", clientId = 39402, sell = 320 }, + { itemName = "malice's horn", clientId = 33920, sell = 620000 }, + { itemName = "malice's spine", clientId = 33921, sell = 850000 }, + { itemName = "malofur's lunchbox", clientId = 30088, sell = 240000 }, + { itemName = "mantassin tail", clientId = 11489, sell = 280 }, + { itemName = "manticore ear", clientId = 31440, sell = 310 }, + { itemName = "manticore tail", clientId = 31439, sell = 220 }, + { itemName = "mantosaurus jaw", clientId = 39386, sell = 2998 }, + { itemName = "marsh stalker beak", clientId = 17461, sell = 65 }, + { itemName = "marsh stalker feather", clientId = 17462, sell = 50 }, + { itemName = "maxilla", clientId = 12315, sell = 250 }, + { itemName = "maxxenius head", clientId = 29942, sell = 500000 }, + { itemName = "megalomania's essence", clientId = 33928, sell = 1900000 }, + { itemName = "megalomania's skull", clientId = 33925, sell = 1500000 }, + { itemName = "metal spike", clientId = 10298, sell = 320 }, + { itemName = "metal toe", clientId = 21198, sell = 430 }, + { itemName = "milk churn", clientId = 32011, sell = 100 }, + { itemName = "minotaur horn", clientId = 11472, sell = 75 }, + { itemName = "miraculum", clientId = 11474, sell = 60 }, + { itemName = "mooh'tah shell", clientId = 21202, sell = 110 }, + { itemName = "moohtant horn", clientId = 21200, sell = 140 }, + { itemName = "moon pin", clientId = 43736, sell = 18000 }, + { itemName = "morgaroth's heart", clientId = 5943, sell = 15000 }, + { itemName = "morshabaal's brain", clientId = 37613, sell = 15000 }, + { itemName = "morshabaal's extract", clientId = 37810, sell = 3250000 }, + { itemName = "mould heart", clientId = 34141, sell = 2100 }, + { itemName = "mould robe", clientId = 34148, sell = 1200 }, + { itemName = "mouldy powder", clientId = 35596, sell = 200 }, + { itemName = "mr. punish's handcuffs", clientId = 6537, sell = 50000 }, + { itemName = "mucus plug", clientId = 16102, sell = 500 }, + { itemName = "mutated bat ear", clientId = 9662, sell = 420 }, + { itemName = "mutated flesh", clientId = 10308, sell = 50 }, + { itemName = "mutated rat tail", clientId = 9668, sell = 150 }, + { itemName = "mysterious fetish", clientId = 3078, sell = 50 }, + { itemName = "mysterious voodoo skull", clientId = 5668, sell = 4000 }, + { itemName = "mystical hourglass", clientId = 9660, sell = 700 }, + { itemName = "naga archer scales", clientId = 39413, sell = 340 }, + { itemName = "naga armring", clientId = 39411, sell = 390 }, + { itemName = "naga earring", clientId = 39412, sell = 380 }, + { itemName = "naga warrior scales", clientId = 39414, sell = 340 }, + { itemName = "necromantic robe", clientId = 11475, sell = 250 }, + { itemName = "necromantic rust", clientId = 21196, sell = 390 }, + { itemName = "nettle blossom", clientId = 10314, sell = 75 }, + { itemName = "nettle spit", clientId = 11476, sell = 25 }, + { itemName = "neutral matter", clientId = 954, sell = 5000 }, + { itemName = "nighthunter wing", clientId = 39381, sell = 2000 }, + { itemName = "odd organ", clientId = 23510, sell = 410 }, + { itemName = "ogre ear stud", clientId = 22188, sell = 180 }, + { itemName = "ogre nose ring", clientId = 22189, sell = 210 }, + { itemName = "old girtablilu carapace", clientId = 36972, sell = 570 }, + { itemName = "old parchment", clientId = 4831, sell = 500 }, + { itemName = "one of timira's many heads", clientId = 39399, sell = 215000 }, + { itemName = "orc leather", clientId = 11479, sell = 30 }, + { itemName = "orc tooth", clientId = 10196, sell = 150 }, + { itemName = "orc trophy", clientId = 7395, sell = 1000 }, + { itemName = "orc tusk", clientId = 7786, sell = 700 }, + { itemName = "orcish gear", clientId = 11477, sell = 85 }, + { itemName = "orshabaal's brain", clientId = 5808, sell = 12000 }, + { itemName = "pair of hellflayer horns", clientId = 22729, sell = 1300 }, + { itemName = "pair of iron fists", clientId = 17828, sell = 4000 }, + { itemName = "pair of old bracers", clientId = 32705, sell = 500 }, + { itemName = "pale worm's scalp", clientId = 32598, sell = 489000 }, + { itemName = "panpipes", clientId = 2953, sell = 150 }, + { itemName = "panther head", clientId = 12039, sell = 750 }, + { itemName = "panther paw", clientId = 12040, sell = 300 }, + { itemName = "parder fur", clientId = 39418, sell = 150 }, + { itemName = "parder tooth", clientId = 39417, sell = 150 }, + { itemName = "patch of fine cloth", clientId = 28821, sell = 1350 }, + { itemName = "peacock feather fan", clientId = 21975, sell = 350 }, + { itemName = "pelvis bone", clientId = 11481, sell = 30 }, + { itemName = "percht horns", clientId = 30186, sell = 200 }, + { itemName = "petrified scream", clientId = 10420, sell = 250 }, + { itemName = "phantasmal hair", clientId = 32704, sell = 500 }, + { itemName = "pharaoh banner", clientId = 12483, sell = 1000 }, + { itemName = "piece of archer armor", clientId = 11483, sell = 20 }, + { itemName = "piece of crocodile leather", clientId = 10279, sell = 15 }, + { itemName = "piece of dead brain", clientId = 9663, sell = 420 }, + { itemName = "piece of hellfire armor", clientId = 9664, sell = 550 }, + { itemName = "piece of massacre's shell", clientId = 6540, sell = 50000 }, + { itemName = "piece of scarab shell", clientId = 9641, sell = 45 }, + { itemName = "piece of swampling wood", clientId = 17823, sell = 30 }, + { itemName = "piece of timira's sensors", clientId = 39400, sell = 150000 }, + { itemName = "piece of warrior armor", clientId = 11482, sell = 50 }, + { itemName = "pieces of magic chalk", clientId = 18930, sell = 210 }, + { itemName = "pig foot", clientId = 9693, sell = 10 }, + { itemName = "pile of grave earth", clientId = 11484, sell = 25 }, + { itemName = "pirat's tail", clientId = 35573, sell = 180 }, + { itemName = "plagueroot offshoot", clientId = 30087, sell = 280000 }, + { itemName = "plasmatic lightning", clientId = 23520, sell = 270 }, + { itemName = "poison gland", clientId = 29348, sell = 210 }, + { itemName = "poison spider shell", clientId = 11485, sell = 10 }, + { itemName = "poisoned fang", clientId = 21195, sell = 130 }, + { itemName = "poisonous slime", clientId = 9640, sell = 50 }, + { itemName = "polar bear paw", clientId = 9650, sell = 30 }, + { itemName = "pool of chitinous glue", clientId = 20207, sell = 480 }, + { itemName = "porcelain mask", clientId = 25088, sell = 2000 }, + { itemName = "powder herb", clientId = 3739, sell = 10 }, + { itemName = "prehemoth claw", clientId = 39383, sell = 2300 }, + { itemName = "prehemoth horns", clientId = 39382, sell = 3000 }, + { itemName = "pristine worm head", clientId = 27618, sell = 15000 }, + { itemName = "protective charm", clientId = 11444, sell = 60 }, + { itemName = "pulverized ore", clientId = 16133, sell = 400 }, + { itemName = "purified soul", clientId = 32228, sell = 260 }, + { itemName = "purple robe", clientId = 11473, sell = 110 }, + { itemName = "quara bone", clientId = 11491, sell = 500 }, + { itemName = "quara eye", clientId = 11488, sell = 350 }, + { itemName = "quara pincers", clientId = 11490, sell = 410 }, + { itemName = "quara tentacle", clientId = 11487, sell = 140 }, + { itemName = "quill", clientId = 28567, sell = 1100 }, + { itemName = "rabbit's foot", clientId = 12172, sell = 50 }, + { itemName = "rare earth", clientId = 27301, sell = 80 }, + { itemName = "ratmiral's hat", clientId = 35613, sell = 150000 }, + { itemName = "ravenous circlet", clientId = 32597, sell = 220000 }, + { itemName = "red goanna scale", clientId = 31558, sell = 270 }, + { itemName = "red hair dye", clientId = 17855, sell = 40 }, + { itemName = "red lantern", clientId = 10289, sell = 250 }, + { itemName = "rhindeer antlers", clientId = 40587, sell = 680 }, + { itemName = "rhino hide", clientId = 24388, sell = 175 }, + { itemName = "rhino horn carving", clientId = 24386, sell = 300 }, + { itemName = "rhino horn", clientId = 24389, sell = 265 }, + { itemName = "ripptor claw", clientId = 39389, sell = 2000 }, + { itemName = "ripptor scales", clientId = 39391, sell = 1200 }, + { itemName = "ritual tooth", clientId = 40528, sell = 135 }, + { itemName = "rogue naga scales", clientId = 39416, sell = 570 }, + { itemName = "roots", clientId = 33938, sell = 1200 }, + { itemName = "rope belt", clientId = 11492, sell = 66 }, + { itemName = "rorc egg", clientId = 18996, sell = 120 }, + { itemName = "rorc feather", clientId = 18993, sell = 70 }, + { itemName = "rotten feather", clientId = 40527, sell = 120 }, + { itemName = "rotten heart", clientId = 31589, sell = 74000 }, + { itemName = "rotten piece of cloth", clientId = 10291, sell = 30 }, + { itemName = "sabretooth fur", clientId = 39378, sell = 2500 }, + { itemName = "sabretooth", clientId = 10311, sell = 400 }, + { itemName = "safety pin", clientId = 11493, sell = 120 }, + { itemName = "sample of monster blood", clientId = 27874, sell = 250 }, + { itemName = "sandcrawler shell", clientId = 10456, sell = 20 }, + { itemName = "scale of corruption", clientId = 11673, sell = 680 }, + { itemName = "scale of gelidrazah", clientId = 24939, sell = 10000 }, + { itemName = "scorpion charm", clientId = 36822, sell = 620 }, + { itemName = "scorpion tail", clientId = 9651, sell = 25 }, + { itemName = "scroll of heroic deeds", clientId = 11510, sell = 230 }, + { itemName = "scythe leg", clientId = 10312, sell = 450 }, + { itemName = "scarab pincers", clientId = 9631, sell = 280 }, + { itemName = "sea serpent scale", clientId = 9666, sell = 520 }, + { itemName = "seacrest hair", clientId = 21801, sell = 260 }, + { itemName = "seacrest scale", clientId = 21800, sell = 150 }, + { itemName = "seeds", clientId = 647, sell = 150 }, + { itemName = "shadow herb", clientId = 3740, sell = 20 }, + { itemName = "shaggy tail", clientId = 10407, sell = 25 }, + { itemName = "shamanic hood", clientId = 11478, sell = 45 }, + { itemName = "shamanic mask", clientId = 22192, sell = 2000 }, + { itemName = "shamanic talisman", clientId = 22184, sell = 200 }, + { itemName = "shark fins", clientId = 35574, sell = 250 }, + { itemName = "shimmering beetles", clientId = 25693, sell = 150 }, + { itemName = "sight of surrender's eye", clientId = 20183, sell = 3000 }, + { itemName = "silencer claws", clientId = 20200, sell = 390 }, + { itemName = "silencer resonating chamber", clientId = 20201, sell = 600 }, + { itemName = "silken bookmark", clientId = 28566, sell = 1300 }, + { itemName = "silky fur", clientId = 10292, sell = 35 }, + { itemName = "single human eye", clientId = 25701, sell = 1000 }, + { itemName = "skull belt", clientId = 11480, sell = 80 }, + { itemName = "skull fetish", clientId = 22191, sell = 250 }, + { itemName = "skull shatterer", clientId = 17849, sell = 170 }, + { itemName = "skunk tail", clientId = 10274, sell = 50 }, + { itemName = "slime heart", clientId = 21194, sell = 160 }, + { itemName = "slime mould", clientId = 12601, sell = 175 }, + { itemName = "slimy leaf tentacle", clientId = 21197, sell = 320 }, + { itemName = "slimy leg", clientId = 27623, sell = 4500 }, + { itemName = "sling herb", clientId = 3738, sell = 10 }, + { itemName = "small energy ball", clientId = 23524, sell = 250 }, + { itemName = "small flask of eyedrops", clientId = 11512, sell = 95 }, + { itemName = "small notebook", clientId = 11450, sell = 480 }, + { itemName = "small oil lamp", clientId = 2933, sell = 150 }, + { itemName = "small pitchfork", clientId = 11513, sell = 70 }, + { itemName = "small tropical fish", clientId = 39408, sell = 380 }, + { itemName = "smoldering eye", clientId = 39543, sell = 470000 }, + { itemName = "snake skin", clientId = 9694, sell = 400 }, + { itemName = "solid rage", clientId = 23517, sell = 310 }, + { itemName = "some grimeleech wings", clientId = 22730, sell = 1200 }, + { itemName = "spark sphere", clientId = 23518, sell = 350 }, + { itemName = "sparkion claw", clientId = 23502, sell = 290 }, + { itemName = "sparkion legs", clientId = 23504, sell = 310 }, + { itemName = "sparkion stings", clientId = 23505, sell = 280 }, + { itemName = "sparkion tail", clientId = 23503, sell = 300 }, + { itemName = "spellsinger's seal", clientId = 14008, sell = 280 }, + { itemName = "sphinx feather", clientId = 31437, sell = 470 }, + { itemName = "sphinx tiara", clientId = 31438, sell = 360 }, + { itemName = "spider fangs", clientId = 8031, sell = 10 }, + { itemName = "spidris mandible", clientId = 14082, sell = 450 }, + { itemName = "spiked iron ball", clientId = 10408, sell = 100 }, + { itemName = "spiky club", clientId = 17859, sell = 300 }, + { itemName = "spite's spirit", clientId = 33926, sell = 840000 }, + { itemName = "spitter nose", clientId = 14078, sell = 340 }, + { itemName = "spooky blue eye", clientId = 9642, sell = 95 }, + { itemName = "srezz' eye", clientId = 34103, sell = 300 }, + { itemName = "stalking seeds", clientId = 39384, sell = 1800 }, + { itemName = "stampor horn", clientId = 12312, sell = 280 }, + { itemName = "stampor talons", clientId = 12313, sell = 150 }, + { itemName = "star herb", clientId = 3736, sell = 15 }, + { itemName = "stone herb", clientId = 3735, sell = 20 }, + { itemName = "stone nose", clientId = 16137, sell = 590 }, + { itemName = "stone wing", clientId = 10278, sell = 120 }, + { itemName = "stonerefiner's skull", clientId = 27606, sell = 100 }, + { itemName = "strand of medusa hair", clientId = 10309, sell = 600 }, + { itemName = "strange proto matter", clientId = 23513, sell = 300 }, + { itemName = "strange symbol", clientId = 3058, sell = 200 }, + { itemName = "strange talisman", clientId = 3045, sell = 30, count = 200 }, + { itemName = "streaked devourer eyes", clientId = 36772, sell = 500 }, + { itemName = "streaked devourer legs", clientId = 36774, sell = 600 }, + { itemName = "streaked devourer maw", clientId = 36773, sell = 400 }, + { itemName = "striped fur", clientId = 10293, sell = 50 }, + { itemName = "sulphider shell", clientId = 39375, sell = 2200 }, + { itemName = "sulphur powder", clientId = 39376, sell = 1900 }, + { itemName = "sulphurous stone", clientId = 10315, sell = 100 }, + { itemName = "summer dress", clientId = 8046, sell = 1500 }, + { itemName = "sun brooch", clientId = 43737, sell = 18000 }, + { itemName = "swamp grass", clientId = 9686, sell = 20 }, + { itemName = "swampling club", clientId = 17824, sell = 40 }, + { itemName = "swampling moss", clientId = 17822, sell = 20 }, + { itemName = "swarmer antenna", clientId = 14076, sell = 130 }, + { itemName = "tail of corruption", clientId = 11672, sell = 240 }, + { itemName = "tarantula egg", clientId = 10281, sell = 80 }, + { itemName = "tarnished rhino figurine", clientId = 24387, sell = 320 }, + { itemName = "tattered piece of robe", clientId = 9684, sell = 120 }, + { itemName = "telescope eye", clientId = 33934, sell = 1600 }, + { itemName = "tentacle of tentugly", clientId = 35611, sell = 27000 }, + { itemName = "tentacle piece", clientId = 11666, sell = 5000 }, + { itemName = "tentugly's eye", clientId = 35610, sell = 52000 }, + { itemName = "tentugly's jaws", clientId = 35612, sell = 80000 }, + { itemName = "terramite eggs", clientId = 10453, sell = 50 }, + { itemName = "terramite legs", clientId = 10454, sell = 60 }, + { itemName = "terramite shell", clientId = 10452, sell = 170 }, + { itemName = "terrorbird beak", clientId = 10273, sell = 95 }, + { itemName = "the handmaiden's protector", clientId = 6539, sell = 50000 }, + { itemName = "the imperor's trident", clientId = 6534, sell = 50000 }, + { itemName = "the plasmother's remains", clientId = 6535, sell = 50000 }, + { itemName = "thick fur", clientId = 10307, sell = 150 }, + { itemName = "thorn", clientId = 9643, sell = 100 }, + { itemName = "tiger eye", clientId = 24961, sell = 350 }, + { itemName = "token of love", clientId = 31594, sell = 440000 }, + { itemName = "tooth file", clientId = 18924, sell = 60 }, + { itemName = "tooth of tazhadur", clientId = 24940, sell = 10000 }, + { itemName = "torn shirt", clientId = 25744, sell = 250 }, + { itemName = "trapped bad dream monster", clientId = 20203, sell = 900 }, + { itemName = "tremendous tyrant head", clientId = 36783, sell = 930 }, + { itemName = "tremendous tyrant shell", clientId = 36784, sell = 740 }, + { itemName = "tribal mask", clientId = 3403, sell = 250 }, + { itemName = "troll green", clientId = 3741, sell = 25 }, + { itemName = "trollroot", clientId = 11515, sell = 50 }, + { itemName = "tunnel tyrant head", clientId = 27595, sell = 500 }, + { itemName = "tunnel tyrant shell", clientId = 27596, sell = 700 }, + { itemName = "tusk", clientId = 3044, sell = 100 }, + { itemName = "two-headed turtle heads", clientId = 39409, sell = 460 }, + { itemName = "undead heart", clientId = 10450, sell = 200 }, + { itemName = "undertaker fangs", clientId = 39380, sell = 2700 }, + { itemName = "unholy bone", clientId = 10316, sell = 480 }, + { itemName = "unholy book", clientId = 6103, sell = 30000 }, + { itemName = "urmahlullus mane", clientId = 31623, sell = 490000 }, + { itemName = "urmahlullus paws", clientId = 31624, sell = 245000 }, + { itemName = "urmahlullus tail", clientId = 31622, sell = 210000 }, + { itemName = "utua's poison", clientId = 34101, sell = 230 }, + { itemName = "vampire teeth", clientId = 9685, sell = 275 }, + { itemName = "vampire's cape chain", clientId = 18927, sell = 150 }, + { itemName = "varnished diremaw brainpan", clientId = 36781, sell = 750 }, + { itemName = "varnished diremaw legs", clientId = 36782, sell = 670 }, + { itemName = "veal", clientId = 32009, sell = 40 }, + { itemName = "vein of ore", clientId = 16135, sell = 330 }, + { itemName = "venison", clientId = 18995, sell = 55 }, + { itemName = "vexclaw talon", clientId = 22728, sell = 1100 }, + { itemName = "vial of hatred", clientId = 33927, sell = 737000 }, + { itemName = "vibrant heart", clientId = 34143, sell = 2100 }, + { itemName = "vibrant robe", clientId = 34144, sell = 1200 }, + { itemName = "violet glass plate", clientId = 29347, sell = 2150 }, + { itemName = "volatile proto matter", clientId = 23514, sell = 300 }, + { itemName = "war horn", clientId = 2958, sell = 8000 }, + { itemName = "warmaster's wristguards", clientId = 10405, sell = 200 }, + { itemName = "warwolf fur", clientId = 10318, sell = 30 }, + { itemName = "waspoid claw", clientId = 14080, sell = 320 }, + { itemName = "waspoid wing", clientId = 14081, sell = 190 }, + { itemName = "weaver's wandtip", clientId = 10397, sell = 250 }, + { itemName = "werebadger claws", clientId = 22051, sell = 160 }, + { itemName = "werebadger skull", clientId = 22055, sell = 185 }, + { itemName = "werebear fur", clientId = 22057, sell = 185 }, + { itemName = "werebear skull", clientId = 22056, sell = 195 }, + { itemName = "wereboar hooves", clientId = 22053, sell = 175 }, + { itemName = "wereboar tusk", clientId = 22054, sell = 165 }, + { itemName = "werecrocodile tongue", clientId = 43729, sell = 570 }, + { itemName = "werefox tail", clientId = 27463, sell = 200 }, + { itemName = "werehyaena nose", clientId = 33943, sell = 220 }, + { itemName = "werehyaena talisman", clientId = 33944, sell = 350 }, + { itemName = "werepanther claw", clientId = 43731, sell = 280 }, + { itemName = "weretiger tooth", clientId = 43730, sell = 490 }, + { itemName = "werewolf fangs", clientId = 22052, sell = 180 }, + { itemName = "werewolf fur", clientId = 10317, sell = 380 }, + { itemName = "white deer antlers", clientId = 12544, sell = 400 }, + { itemName = "white deer skin", clientId = 12545, sell = 245 }, + { itemName = "white silk flower", clientId = 34008, sell = 9000 }, + { itemName = "widow's mandibles", clientId = 10411, sell = 110 }, + { itemName = "wild flowers", clientId = 25691, sell = 120 }, + { itemName = "wimp tooth chain", clientId = 17847, sell = 120 }, + { itemName = "winged tail", clientId = 10313, sell = 800 }, + { itemName = "winter wolf fur", clientId = 10295, sell = 20 }, + { itemName = "witch broom", clientId = 9652, sell = 60 }, + { itemName = "withered pauldrons", clientId = 27607, sell = 850 }, + { itemName = "withered scalp", clientId = 27608, sell = 900 }, + { itemName = "wood", clientId = 5901, sell = 5 }, + { itemName = "wool", clientId = 10319, sell = 15 }, + { itemName = "writhing brain", clientId = 32600, sell = 370000 }, + { itemName = "writhing heart", clientId = 32599, sell = 185000 }, + { itemName = "wyrm scale", clientId = 9665, sell = 400 }, + { itemName = "wyvern talisman", clientId = 9644, sell = 265 }, + { itemName = "yielocks", clientId = 12805, sell = 600 }, + { itemName = "yielowax", clientId = 12742, sell = 600 }, + { itemName = "yirkas' egg", clientId = 34102, sell = 280 }, + { itemName = "young lich worm", clientId = 31590, sell = 25000 }, + { itemName = "zaogun flag", clientId = 10413, sell = 600 }, + { itemName = "zaogun's shoulderplates", clientId = 10414, sell = 150 }, + }, + + ["equipment"] = { + { itemName = "abyss hammer", clientId = 7414, sell = 20000 }, + { itemName = "albino plate", clientId = 19358, sell = 1500 }, + { itemName = "alloy legs", clientId = 21168, sell = 11000 }, + { itemName = "amber staff", clientId = 7426, sell = 8000 }, + { itemName = "ancient shield", clientId = 3432, sell = 900 }, + { itemName = "angelic axe", clientId = 7436, sell = 5000 }, + { itemName = "arbalest", clientId = 5803, sell = 42000 }, + { itemName = "arcane staff", clientId = 3341, sell = 42000 }, + { itemName = "assassin dagger", clientId = 7404, sell = 20000 }, + { itemName = "axe", clientId = 3274, sell = 7 }, + { itemName = "badger boots", clientId = 22086, sell = 7500 }, + { itemName = "bandana", clientId = 5917, sell = 150 }, + { itemName = "battle axe", clientId = 3266, sell = 80 }, + { itemName = "battle hammer", clientId = 3305, sell = 120 }, + { itemName = "battle shield", clientId = 3413, sell = 95 }, + { itemName = "batwing hat", clientId = 9103, sell = 8000 }, + { itemName = "beastslayer axe", clientId = 3344, sell = 1500 }, + { itemName = "belted cape", clientId = 8044, sell = 500 }, + { itemName = "black shield", clientId = 3429, sell = 800 }, + { itemName = "blacksteel sword", clientId = 7406, sell = 6000 }, + { itemName = "blade of corruption", clientId = 11693, sell = 60000 }, + { itemName = "blessed sceptre", clientId = 7429, sell = 40000 }, + { itemName = "bloody edge", clientId = 7416, sell = 30000 }, + { itemName = "blue legs", clientId = 645, sell = 15000 }, + { itemName = "blue robe", clientId = 3567, sell = 10000 }, + { itemName = "bone club", clientId = 3337, sell = 5 }, + { itemName = "bone shield", clientId = 3441, sell = 80 }, + { itemName = "bone sword", clientId = 3338, sell = 20 }, + { itemName = "bonebreaker", clientId = 7428, sell = 10000 }, + { itemName = "bonelord helmet", clientId = 3408, sell = 7500 }, + { itemName = "bonelord shield", clientId = 3418, sell = 1200 }, + { itemName = "boots of haste", clientId = 3079, sell = 30000 }, + { itemName = "brass armor", clientId = 3359, sell = 150 }, + { itemName = "brass helmet", clientId = 3354, sell = 30 }, + { itemName = "brass legs", clientId = 3372, sell = 49 }, + { itemName = "brass shield", clientId = 3411, sell = 25 }, + { itemName = "bright sword", clientId = 3295, sell = 6000 }, + { itemName = "broadsword", clientId = 3301, sell = 500 }, + { itemName = "butcher's axe", clientId = 7412, sell = 18000 }, + { itemName = "butterfly ring", clientId = 25698, sell = 2000 }, + { itemName = "calopteryx cape", clientId = 14086, sell = 15000 }, + { itemName = "carapace shield", clientId = 14088, sell = 32000 }, + { itemName = "carlin sword", clientId = 3283, sell = 118 }, + { itemName = "castle shield", clientId = 3435, sell = 5000 }, + { itemName = "chain armor", clientId = 3358, sell = 70 }, + { itemName = "chain bolter", clientId = 8022, sell = 40000 }, + { itemName = "chain helmet", clientId = 3352, sell = 17 }, + { itemName = "chain legs", clientId = 3558, sell = 25 }, + { itemName = "chaos mace", clientId = 7427, sell = 9000 }, + { itemName = "claw of 'the noxious spawn'", clientId = 9392, sell = 15000 }, + { itemName = "club", clientId = 3270, sell = 1 }, + { itemName = "coat", clientId = 3562, sell = 1 }, + { itemName = "cobra crown", clientId = 11674, sell = 50000 }, + { itemName = "coconut shoes", clientId = 9017, sell = 500 }, + { itemName = "composite hornbow", clientId = 8027, sell = 25000 }, + { itemName = "copper shield", clientId = 3430, sell = 50 }, + { itemName = "cowtana", clientId = 21177, sell = 2500 }, + { itemName = "cranial basher", clientId = 7415, sell = 30000 }, + { itemName = "crocodile boots", clientId = 3556, sell = 1000 }, + { itemName = "crowbar", clientId = 3304, sell = 50 }, + { itemName = "crown armor", clientId = 3381, sell = 12000 }, + { itemName = "crown helmet", clientId = 3385, sell = 2500 }, + { itemName = "crown legs", clientId = 3382, sell = 12000 }, + { itemName = "crown shield", clientId = 3419, sell = 8000 }, + { itemName = "crusader helmet", clientId = 3391, sell = 6000 }, + { itemName = "crystal crossbow", clientId = 16163, sell = 35000 }, + { itemName = "crystal mace", clientId = 3333, sell = 12000 }, + { itemName = "crystal ring", clientId = 3007, sell = 250 }, + { itemName = "crystal sword", clientId = 7449, sell = 600 }, + { itemName = "crystal wand", clientId = 3068, sell = 10000 }, + { itemName = "crystalline armor", clientId = 8050, sell = 16000 }, + { itemName = "crystalline axe", clientId = 16161, sell = 10000 }, + { itemName = "crystalline spikes", clientId = 16138, sell = 440 }, + { itemName = "crystalline sword", clientId = 16160, sell = 2000 }, + { itemName = "dagger", clientId = 3267, sell = 2 }, + { itemName = "daramian mace", clientId = 3327, sell = 110 }, + { itemName = "daramian waraxe", clientId = 3328, sell = 1000 }, + { itemName = "dark armor", clientId = 3383, sell = 400 }, + { itemName = "dark helmet", clientId = 3384, sell = 250 }, + { itemName = "dark shield", clientId = 3421, sell = 400 }, + { itemName = "death ring", clientId = 6299, sell = 1000 }, + { itemName = "deepling axe", clientId = 13991, sell = 40000 }, + { itemName = "deepling squelcher", clientId = 14250, sell = 7000 }, + { itemName = "deepling staff", clientId = 13987, sell = 4000 }, + { itemName = "demon helmet", clientId = 3387, sell = 40000 }, + { itemName = "demon shield", clientId = 3420, sell = 30000 }, + { itemName = "demonbone amulet", clientId = 3019, sell = 32000 }, + { itemName = "demonrage sword", clientId = 7382, sell = 36000 }, + { itemName = "depth calcei", clientId = 13997, sell = 25000 }, + { itemName = "depth galea", clientId = 13995, sell = 35000 }, + { itemName = "depth lorica", clientId = 13994, sell = 30000 }, + { itemName = "depth ocrea", clientId = 13996, sell = 16000 }, + { itemName = "depth scutum", clientId = 13998, sell = 36000 }, + { itemName = "devil helmet", clientId = 3356, sell = 1000 }, + { itemName = "diamond sceptre", clientId = 7387, sell = 3000 }, + { itemName = "divine plate", clientId = 8057, sell = 55000 }, + { itemName = "djinn blade", clientId = 3339, sell = 15000 }, + { itemName = "double axe", clientId = 3275, sell = 260 }, + { itemName = "doublet", clientId = 3379, sell = 3 }, + { itemName = "drachaku", clientId = 10391, sell = 10000 }, + { itemName = "dragon hammer", clientId = 3322, sell = 2000 }, + { itemName = "dragon lance", clientId = 3302, sell = 9000 }, + { itemName = "dragon robe", clientId = 8039, sell = 50000 }, + { itemName = "dragon scale mail", clientId = 3386, sell = 40000 }, + { itemName = "dragon shield", clientId = 3416, sell = 4000 }, + { itemName = "dragon slayer", clientId = 7402, sell = 15000 }, + { itemName = "dragonbone staff", clientId = 7430, sell = 3000 }, + { itemName = "draken boots", clientId = 4033, sell = 40000 }, + { itemName = "drakinata", clientId = 10388, sell = 10000 }, + { itemName = "dream essence egg", clientId = 30005, sell = 205 }, + { itemName = "dung ball", clientId = 14225, sell = 130 }, + { itemName = "dreaded cleaver", clientId = 7419, sell = 15000 }, + { itemName = "dream blossom staff", clientId = 25700, sell = 5000 }, + { itemName = "dwarven armor", clientId = 3397, sell = 30000 }, + { itemName = "dwarven axe", clientId = 3323, sell = 1500 }, + { itemName = "dwarven legs", clientId = 3398, sell = 40000 }, + { itemName = "dwarven shield", clientId = 3425, sell = 100 }, + { itemName = "elite draken mail", clientId = 11651, sell = 50000 }, + { itemName = "elvish bow", clientId = 7438, sell = 2000 }, + { itemName = "epee", clientId = 3326, sell = 8000 }, + { itemName = "execowtioner axe", clientId = 21176, sell = 12000 }, + { itemName = "executioner", clientId = 7453, sell = 55000 }, + { itemName = "fire axe", clientId = 3320, sell = 8000 }, + { itemName = "fire sword", clientId = 3280, sell = 4000 }, + { itemName = "fishing rod", clientId = 3483, sell = 40 }, + { itemName = "focus cape", clientId = 8043, sell = 6000 }, + { itemName = "fur armor", clientId = 22085, sell = 5000 }, + { itemName = "fur boots", clientId = 7457, sell = 2000 }, + { itemName = "furry club", clientId = 7432, sell = 1000 }, + { itemName = "giant sword", clientId = 3281, sell = 17000 }, + { itemName = "glacial rod", clientId = 16118, sell = 6500 }, + { itemName = "glacier amulet", clientId = 815, sell = 1500 }, + { itemName = "glacier kilt", clientId = 823, sell = 11000 }, + { itemName = "glacier mask", clientId = 829, sell = 2500 }, + { itemName = "glacier robe", clientId = 824, sell = 11000 }, + { itemName = "glacier shoes", clientId = 819, sell = 2500 }, + { itemName = "glooth axe", clientId = 21180, sell = 1500 }, + { itemName = "glooth blade", clientId = 21179, sell = 1500 }, + { itemName = "glooth cap", clientId = 21164, sell = 7000 }, + { itemName = "glooth club", clientId = 21178, sell = 1500 }, + { itemName = "glooth whip", clientId = 21172, sell = 2500 }, + { itemName = "glorious axe", clientId = 7454, sell = 3000 }, + { itemName = "golden armor", clientId = 3360, sell = 20000 }, + { itemName = "golden legs", clientId = 3364, sell = 30000 }, + { itemName = "greenwood coat", clientId = 8041, sell = 50000 }, + { itemName = "griffin shield", clientId = 3433, sell = 3000 }, + { itemName = "guardian axe", clientId = 14043, sell = 9000 }, + { itemName = "guardian boots", clientId = 10323, sell = 35000 }, + { itemName = "guardian halberd", clientId = 3315, sell = 11000 }, + { itemName = "guardian shield", clientId = 3415, sell = 2000 }, + { itemName = "hailstorm rod", clientId = 3067, sell = 3000 }, + { itemName = "halberd", clientId = 3269, sell = 400 }, + { itemName = "hammer of wrath", clientId = 3332, sell = 30000 }, + { itemName = "hand axe", clientId = 3268, sell = 4 }, + { itemName = "hatchet", clientId = 3276, sell = 25 }, + { itemName = "haunted blade", clientId = 7407, sell = 8000 }, + { itemName = "headchopper", clientId = 7380, sell = 6000 }, + { itemName = "heat core", clientId = 21167, sell = 10000 }, + { itemName = "heavy trident", clientId = 12683, sell = 2000 }, + { itemName = "heavy mace", clientId = 3340, sell = 50000 }, + { itemName = "helmet of the lost", clientId = 17852, sell = 2000 }, + { itemName = "heroic axe", clientId = 7389, sell = 30000 }, + { itemName = "hibiscus dress", clientId = 8045, sell = 3000 }, + { itemName = "hive bow", clientId = 14246, sell = 28000 }, + { itemName = "hive scythe", clientId = 14089, sell = 17000 }, + { itemName = "ice rapier", clientId = 3284, sell = 1000 }, + { itemName = "iron helmet", clientId = 3353, sell = 150 }, + { itemName = "jade hammer", clientId = 7422, sell = 25000 }, + { itemName = "jade hat", clientId = 10451, sell = 9000 }, + { itemName = "jagged sickle", clientId = 32595, sell = 150000 }, + { itemName = "katana", clientId = 3300, sell = 35 }, + { itemName = "knight armor", clientId = 3370, sell = 5000 }, + { itemName = "knight axe", clientId = 3318, sell = 2000 }, + { itemName = "knight legs", clientId = 3371, sell = 5000 }, + { itemName = "krimhorn helmet", clientId = 7461, sell = 200 }, + { itemName = "lavos armor", clientId = 8049, sell = 16000 }, + { itemName = "leaf legs", clientId = 9014, sell = 500 }, + { itemName = "leaf star", clientId = 25735, sell = 50 }, + { itemName = "leather armor", clientId = 3361, sell = 12 }, + { itemName = "leather boots", clientId = 3552, sell = 2 }, + { itemName = "leather helmet", clientId = 3355, sell = 4 }, + { itemName = "leather legs", clientId = 3559, sell = 9 }, + { itemName = "legion helmet", clientId = 3374, sell = 22 }, + { itemName = "leopard armor", clientId = 3404, sell = 1000 }, + { itemName = "life preserver", clientId = 17813, sell = 300 }, + { itemName = "light shovel", clientId = 5710, sell = 300 }, + { itemName = "lightning boots", clientId = 820, sell = 2500 }, + { itemName = "lightning headband", clientId = 828, sell = 2500 }, + { itemName = "lightning legs", clientId = 822, sell = 11000 }, + { itemName = "lightning pendant", clientId = 816, sell = 1500 }, + { itemName = "lightning robe", clientId = 825, sell = 11000 }, + { itemName = "longsword", clientId = 3285, sell = 51 }, + { itemName = "lunar staff", clientId = 7424, sell = 5000 }, + { itemName = "mace", clientId = 3286, sell = 30 }, + { itemName = "machete", clientId = 3308, sell = 6 }, + { itemName = "magic plate armor", clientId = 3366, sell = 90000 }, + { itemName = "magma boots", clientId = 818, sell = 2500 }, + { itemName = "magma legs", clientId = 821, sell = 11000 }, + { itemName = "magma monocle", clientId = 827, sell = 2500 }, + { itemName = "mammoth fur cape", clientId = 7463, sell = 6000 }, + { itemName = "mammoth fur shorts", clientId = 7464, sell = 850 }, + { itemName = "mammoth whopper", clientId = 7381, sell = 300 }, + { itemName = "mastermind shield", clientId = 3414, sell = 50000 }, + { itemName = "meat hammer", clientId = 32093, sell = 60 }, + { itemName = "medusa shield", clientId = 3436, sell = 9000 }, + { itemName = "mercenary sword", clientId = 7386, sell = 12000 }, + { itemName = "mercurial wing", clientId = 39395, sell = 2500 }, + { itemName = "metal bat", clientId = 21171, sell = 9000 }, + { itemName = "metal jaw", clientId = 21193, sell = 260 }, + { itemName = "metal spats", clientId = 21169, sell = 2000 }, + { itemName = "mino lance", clientId = 21174, sell = 7000 }, + { itemName = "mino shield", clientId = 21175, sell = 3000 }, + { itemName = "modified crossbow", clientId = 8021, sell = 10000 }, + { itemName = "mooh'tah plate", clientId = 21166, sell = 6000 }, + { itemName = "moohtant cudgel", clientId = 21173, sell = 14000 }, + { itemName = "moonlight rod", clientId = 3070, sell = 200 }, + { itemName = "morning star", clientId = 3282, sell = 100 }, + { itemName = "muck rod", clientId = 16117, sell = 6000 }, + { itemName = "mycological bow", clientId = 16164, sell = 35000 }, + { itemName = "mystic blade", clientId = 7384, sell = 30000 }, + { itemName = "mystic turban", clientId = 3574, sell = 150 }, + { itemName = "naginata", clientId = 3314, sell = 2000 }, + { itemName = "necrotic rod", clientId = 3069, sell = 1000 }, + { itemName = "nightmare blade", clientId = 7418, sell = 35000 }, + { itemName = "noble armor", clientId = 3380, sell = 900 }, + { itemName = "noble axe", clientId = 7456, sell = 10000 }, + { itemName = "noble cape", clientId = 31593, sell = 425000 }, + { itemName = "noble turban", clientId = 11486, sell = 430 }, + { itemName = "norse shield", clientId = 7460, sell = 1500 }, + { itemName = "northwind rod", clientId = 8083, sell = 1500 }, + { itemName = "obsidian lance", clientId = 3313, sell = 500 }, + { itemName = "ogre choppa", clientId = 22172, sell = 1500 }, + { itemName = "ogre klubba", clientId = 22171, sell = 2500 }, + { itemName = "ogre scepta", clientId = 22183, sell = 3600 }, + { itemName = "onyx flail", clientId = 7421, sell = 22000 }, + { itemName = "orcish axe", clientId = 3316, sell = 350 }, + { itemName = "orcish maul", clientId = 7392, sell = 6000 }, + { itemName = "oriental shoes", clientId = 21981, sell = 15000 }, + { itemName = "ornamented axe", clientId = 7411, sell = 20000 }, + { itemName = "ornamented shield", clientId = 3424, sell = 1500 }, + { itemName = "ornate chestplate", clientId = 13993, sell = 60000 }, + { itemName = "ornate crossbow", clientId = 14247, sell = 12000 }, + { itemName = "ornate legs", clientId = 13999, sell = 40000 }, + { itemName = "ornate mace", clientId = 14001, sell = 42000 }, + { itemName = "ornate shield", clientId = 14000, sell = 42000 }, + { itemName = "paladin armor", clientId = 8063, sell = 15000 }, + { itemName = "patched boots", clientId = 3550, sell = 2000 }, + { itemName = "pharaoh sword", clientId = 3334, sell = 23000 }, + { itemName = "phoenix shield", clientId = 3439, sell = 16000 }, + { itemName = "pick", clientId = 3456, sell = 15 }, + { itemName = "plate armor", clientId = 3357, sell = 400 }, + { itemName = "plate legs", clientId = 3557, sell = 115 }, + { itemName = "plate shield", clientId = 3410, sell = 45 }, + { itemName = "platinum amulet", clientId = 3055, sell = 2500 }, + { itemName = "poison dagger", clientId = 3299, sell = 50 }, + { itemName = "queen's sceptre", clientId = 7410, sell = 20000 }, + { itemName = "ragnir helmet", clientId = 7462, sell = 400 }, + { itemName = "rapier", clientId = 3272, sell = 5 }, + { itemName = "ratana", clientId = 17812, sell = 500 }, + { itemName = "relic sword", clientId = 7383, sell = 25000 }, + { itemName = "rift bow", clientId = 22866, sell = 45000 }, + { itemName = "rift crossbow", clientId = 22867, sell = 45000 }, + { itemName = "rift lance", clientId = 22727, sell = 30000 }, + { itemName = "rift shield", clientId = 22726, sell = 50000 }, + { itemName = "ripper lance", clientId = 3346, sell = 500 }, + { itemName = "rod", clientId = 33929, sell = 2200 }, + { itemName = "rope", clientId = 3003, sell = 15 }, + { itemName = "royal axe", clientId = 7434, sell = 40000 }, + { itemName = "royal helmet", clientId = 3392, sell = 30000 }, + { itemName = "rubber cap", clientId = 21165, sell = 11000 }, + { itemName = "runed sword", clientId = 7417, sell = 45000 }, + { itemName = "ruthless axe", clientId = 6553, sell = 45000 }, + { itemName = "sabre", clientId = 3273, sell = 12 }, + { itemName = "sai", clientId = 10389, sell = 16500 }, + { itemName = "sapphire hammer", clientId = 7437, sell = 7000 }, + { itemName = "scale armor", clientId = 3377, sell = 75 }, + { itemName = "scarab shield", clientId = 3440, sell = 2000 }, + { itemName = "scimitar", clientId = 3307, sell = 150 }, + { itemName = "scythe", clientId = 3453, sell = 10 }, + { itemName = "serpent sword", clientId = 3297, sell = 900 }, + { itemName = "shadow sceptre", clientId = 7451, sell = 10000 }, + { itemName = "short sword", clientId = 3294, sell = 10 }, + { itemName = "shovel", clientId = 3457, sell = 8 }, + { itemName = "sickle", clientId = 3293, sell = 3 }, + { itemName = "silkweaver bow", clientId = 8029, sell = 12000 }, + { itemName = "silver dagger", clientId = 3290, sell = 500 }, + { itemName = "skull helmet", clientId = 5741, sell = 40000 }, + { itemName = "skull staff", clientId = 3324, sell = 6000 }, + { itemName = "skullcracker armor", clientId = 8061, sell = 18000 }, + { itemName = "small axe", clientId = 3462, sell = 5 }, + { itemName = "snakebite rod", clientId = 3066, sell = 100 }, + { itemName = "soldier helmet", clientId = 3375, sell = 16 }, + { itemName = "spellbook of enlightenment", clientId = 8072, sell = 4000 }, + { itemName = "spellbook of lost souls", clientId = 8075, sell = 19000 }, + { itemName = "spellbook of mind control", clientId = 8074, sell = 13000 }, + { itemName = "spellbook of warding", clientId = 8073, sell = 8000 }, + { itemName = "spellwand", clientId = 651, sell = 299 }, + { itemName = "spellweaver's robe", clientId = 10438, sell = 12000 }, + { itemName = "spike shield", clientId = 17810, sell = 250 }, + { itemName = "spike sword", clientId = 3271, sell = 1000 }, + { itemName = "spiked squelcher", clientId = 7452, sell = 5000 }, + { itemName = "spirit cloak", clientId = 8042, sell = 350 }, + { itemName = "springsprout rod", clientId = 8084, sell = 3600 }, + { itemName = "steel boots", clientId = 3554, sell = 30000 }, + { itemName = "steel helmet", clientId = 3351, sell = 293 }, + { itemName = "steel shield", clientId = 3409, sell = 80 }, + { itemName = "strange helmet", clientId = 3373, sell = 500 }, + { itemName = "studded armor", clientId = 3378, sell = 25 }, + { itemName = "studded club", clientId = 3336, sell = 10 }, + { itemName = "studded helmet", clientId = 3376, sell = 20 }, + { itemName = "studded legs", clientId = 3362, sell = 15 }, + { itemName = "studded shield", clientId = 3426, sell = 16 }, + { itemName = "swamplair armor", clientId = 8052, sell = 16000 }, + { itemName = "sword", clientId = 3264, sell = 25 }, + { itemName = "taurus mace", clientId = 7425, sell = 500 }, + { itemName = "tempest shield", clientId = 3442, sell = 35000 }, + { itemName = "terra boots", clientId = 813, sell = 2500 }, + { itemName = "terra hood", clientId = 830, sell = 2500 }, + { itemName = "terra legs", clientId = 812, sell = 11000 }, + { itemName = "terra mantle", clientId = 811, sell = 11000 }, + { itemName = "terra rod", clientId = 3065, sell = 2000 }, + { itemName = "thaian sword", clientId = 7391, sell = 16000 }, + { itemName = "the avenger", clientId = 6527, sell = 42000 }, + { itemName = "the ironworker", clientId = 8025, sell = 50000 }, + { itemName = "the justice seeker", clientId = 7390, sell = 40000 }, + { itemName = "throwing knife", clientId = 3298, sell = 2 }, + { itemName = "tiara", clientId = 35578, sell = 11000 }, + { itemName = "titan axe", clientId = 7413, sell = 4000 }, + { itemName = "tortoise shield", clientId = 6131, sell = 150 }, + { itemName = "tower shield", clientId = 3428, sell = 8000 }, + { itemName = "twiceslicer", clientId = 11657, sell = 28000 }, + { itemName = "twin hooks", clientId = 10392, sell = 500 }, + { itemName = "two handed sword", clientId = 3265, sell = 450 }, + { itemName = "underworld rod", clientId = 8082, sell = 4400 }, + { itemName = "vampire shield", clientId = 3434, sell = 15000 }, + { itemName = "viking helmet", clientId = 3367, sell = 66 }, + { itemName = "viking shield", clientId = 3431, sell = 85 }, + { itemName = "vile axe", clientId = 7388, sell = 30000 }, + { itemName = "wand of cosmic energy", clientId = 3073, sell = 2000 }, + { itemName = "wand of decay", clientId = 3072, sell = 1000 }, + { itemName = "wand of defiance", clientId = 16096, sell = 6500 }, + { itemName = "wand of draconia", clientId = 8093, sell = 1500 }, + { itemName = "wand of dragonbreath", clientId = 3075, sell = 200 }, + { itemName = "wand of everblazing", clientId = 16115, sell = 6000 }, + { itemName = "wand of inferno", clientId = 3071, sell = 3000 }, + { itemName = "wand of starstorm", clientId = 8092, sell = 3600 }, + { itemName = "wand of voodoo", clientId = 8094, sell = 4400 }, + { itemName = "wand of vortex", clientId = 3074, sell = 100 }, + { itemName = "war axe", clientId = 3342, sell = 12000 }, + { itemName = "war hammer", clientId = 3279, sell = 1200 }, + { itemName = "warrior helmet", clientId = 3369, sell = 5000 }, + { itemName = "warrior's axe", clientId = 14040, sell = 11000 }, + { itemName = "warrior's shield", clientId = 14042, sell = 9000 }, + { itemName = "watch", clientId = 2906, sell = 6 }, + { itemName = "wereboar loincloth", clientId = 22087, sell = 1500 }, + { itemName = "windborn colossus armor", clientId = 8055, sell = 50000 }, + { itemName = "witch hat", clientId = 9653, sell = 5000 }, + { itemName = "wood cape", clientId = 3575, sell = 5000 }, + { itemName = "wooden hammer", clientId = 3459, sell = 15 }, + { itemName = "wooden shield", clientId = 3412, sell = 5 }, + { itemName = "wooden spellbook", clientId = 25699, sell = 12000 }, + { itemName = "wyvern fang", clientId = 7408, sell = 1500 }, + { itemName = "zaoan armor", clientId = 10384, sell = 14000 }, + { itemName = "zaoan halberd", clientId = 10406, sell = 500 }, + { itemName = "zaoan helmet", clientId = 10385, sell = 45000 }, + { itemName = "zaoan legs", clientId = 10387, sell = 14000 }, + { itemName = "zaoan robe", clientId = 10439, sell = 12000 }, + { itemName = "zaoan shoes", clientId = 10386, sell = 5000 }, + { itemName = "zaoan sword", clientId = 10390, sell = 30000 }, + }, + + ["amulets"] = { + { itemName = "amulet of loss", clientId = 3057, sell = 45000 }, + { itemName = "ancient amulet", clientId = 3025, sell = 200 }, + { itemName = "collar of blue plasma", clientId = 23542, sell = 6000 }, + { itemName = "collar of green plasma", clientId = 23543, sell = 6000 }, + { itemName = "collar of red plasma", clientId = 23544, sell = 6000 }, + { itemName = "crystal necklace", clientId = 3008, sell = 400 }, + { itemName = "dragon necklace", clientId = 3085, sell = 100, count = 200 }, + { itemName = "elven amulet", clientId = 3082, sell = 100, count = 50 }, + { itemName = "garlic necklace", clientId = 3083, sell = 50 }, + { itemName = "gearwheel chain", clientId = 21170, sell = 5000 }, + { itemName = "glooth amulet", clientId = 21183, sell = 2000 }, + { itemName = "leviathan's amulet", clientId = 9303, sell = 3000 }, + { itemName = "magma amulet", clientId = 817, sell = 1500 }, + { itemName = "noble amulet", clientId = 31595, sell = 430000 }, + { itemName = "onyx pendant", clientId = 22195, sell = 3500 }, + { itemName = "ornate locket", clientId = 30056, sell = 18000 }, + { itemName = "protection amulet", clientId = 3084, sell = 100, count = 250 }, + { itemName = "ruby necklace", clientId = 3016, sell = 2000 }, + { itemName = "sacred tree amulet", clientId = 9302, sell = 3000 }, + { itemName = "scarab amulet", clientId = 3018, sell = 200 }, + { itemName = "shockwave amulet", clientId = 9304, sell = 3000 }, + { itemName = "silver amulet", clientId = 3054, sell = 50, count = 200 }, + { itemName = "star amulet", clientId = 3014, sell = 500 }, + { itemName = "stone skin amulet", clientId = 3081, sell = 500, count = 5 }, + { itemName = "terra amulet", clientId = 814, sell = 1500 }, + { itemName = "wailing widow's necklace", clientId = 10412, sell = 3000 }, + { itemName = "werewolf amulet", clientId = 22060, sell = 3000 }, + { itemName = "wolf tooth chain", clientId = 3012, sell = 100 }, + }, + + ["rings"] = { + { itemName = "axe ring", clientId = 3092, sell = 100 }, + { itemName = "club ring", clientId = 3093, sell = 100 }, + { itemName = "dwarven ring", clientId = 3097, sell = 100 }, + { itemName = "energy ring", clientId = 3051, sell = 100 }, + { itemName = "life ring", clientId = 3052, sell = 50 }, + { itemName = "might ring", clientId = 3048, sell = 250, count = 20 }, + { itemName = "power ring", clientId = 3050, sell = 50 }, + { itemName = "ring of blue plasma", clientId = 23529, sell = 8000 }, + { itemName = "ring of green plasma", clientId = 23531, sell = 8000 }, + { itemName = "ring of healing", clientId = 3098, sell = 100 }, + { itemName = "ring of red plasma", clientId = 23533, sell = 8000 }, + { itemName = "ring of the sky", clientId = 3006, sell = 30000 }, + { itemName = "signet ring", clientId = 31592, sell = 480000 }, + { itemName = "stealth ring", clientId = 3049, sell = 200 }, + { itemName = "sword ring", clientId = 3091, sell = 100 }, + { itemName = "time ring", clientId = 3053, sell = 100 }, + { itemName = "wedding ring", clientId = 3004, sell = 100 }, + }, + + ["valuables"] = { + { itemName = "ancient coin", clientId = 24390, sell = 350 }, + { itemName = "ancient stone", clientId = 9632, sell = 200 }, + { itemName = "angel figurine", clientId = 32589, sell = 36000 }, + { itemName = "ankh", clientId = 3077, sell = 100 }, + { itemName = "bar of gold", clientId = 14112, sell = 10000 }, + { itemName = "basalt figurine", clientId = 17857, sell = 160 }, + { itemName = "battle stone", clientId = 11447, sell = 290 }, + { itemName = "beast's nightmare-cushion", clientId = 29946, sell = 630000 }, + { itemName = "black pearl", clientId = 3027, sell = 280 }, + { itemName = "blood goblet", clientId = 8531, sell = 10000 }, + { itemName = "blue crystal shard", clientId = 16119, sell = 1500 }, + { itemName = "blue crystal splinter", clientId = 16124, sell = 400 }, + { itemName = "blue gem", clientId = 3041, sell = 5000 }, + { itemName = "broken iks cuirass", clientId = 40533, sell = 640 }, + { itemName = "brown crystal splinter", clientId = 16123, sell = 400 }, + { itemName = "brown giant shimmering pearl", clientId = 282, sell = 3000 }, + { itemName = "ceremonial ankh", clientId = 6561, sell = 20000 }, + { itemName = "cracked alabaster vase", clientId = 24385, sell = 180 }, + { itemName = "crown", clientId = 33935, sell = 2700 }, + { itemName = "cry-stal", clientId = 39394, sell = 3200 }, + { itemName = "crystal ball", clientId = 3076, sell = 190 }, + { itemName = "crystal of balance", clientId = 9028, sell = 1000 }, + { itemName = "crystal of focus", clientId = 9027, sell = 2000 }, + { itemName = "crystal of power", clientId = 9067, sell = 3000 }, + { itemName = "crystallized anger", clientId = 23507, sell = 400 }, + { itemName = "cyan crystal fragment", clientId = 16125, sell = 800 }, + { itemName = "dark rosary", clientId = 10303, sell = 48 }, + { itemName = "death toll", clientId = 32703, sell = 1000 }, + { itemName = "diamond", clientId = 32770, sell = 15000 }, + { itemName = "dragon figurine", clientId = 30053, sell = 45000 }, + { itemName = "eldritch crystal", clientId = 36835, sell = 48000 }, + { itemName = "emerald bangle", clientId = 3010, sell = 800 }, + { itemName = "explorer brooch", clientId = 4871, sell = 50 }, + { itemName = "figurine of cruelty", clientId = 34019, sell = 3100000 }, + { itemName = "figurine of greed", clientId = 34021, sell = 2900000 }, + { itemName = "figurine of hatred", clientId = 34020, sell = 2700000 }, + { itemName = "figurine of malice", clientId = 34018, sell = 2800000 }, + { itemName = "figurine of megalomania", clientId = 33953, sell = 5000000 }, + { itemName = "figurine of spite", clientId = 33952, sell = 3000000 }, + { itemName = "flawless ice crystal", clientId = 942, sell = 5000 }, + { itemName = "flintstone", clientId = 12806, sell = 800 }, + { itemName = "frozen lightning", clientId = 23519, sell = 270 }, + { itemName = "frozen starlight", clientId = 3249, sell = 20000 }, + { itemName = "gemmed figurine", clientId = 24392, sell = 3500 }, + { itemName = "giant amethyst", clientId = 32622, sell = 60000 }, + { itemName = "giant emerald", clientId = 30060, sell = 90000 }, + { itemName = "giant pacifier", clientId = 21199, sell = 170 }, + { itemName = "giant ruby", clientId = 30059, sell = 70000 }, + { itemName = "giant sapphire", clientId = 30061, sell = 50000 }, + { itemName = "giant topaz", clientId = 32623, sell = 80000 }, + { itemName = "glowing rune", clientId = 28570, sell = 350 }, + { itemName = "gold ingot", clientId = 9058, sell = 5000 }, + { itemName = "gold nugget", clientId = 3040, sell = 850 }, + { itemName = "gold ring", clientId = 3063, sell = 8000 }, + { itemName = "gold-brocaded cloth", clientId = 40529, sell = 175 }, + { itemName = "golden amulet", clientId = 3013, sell = 2000 }, + { itemName = "golden brush", clientId = 25689, sell = 250 }, + { itemName = "golden cheese wedge", clientId = 35581, sell = 6000 }, + { itemName = "golden dustbin", clientId = 35579, sell = 7000 }, + { itemName = "golden fafnar trophy", clientId = 9626, sell = 10000 }, + { itemName = "golden figurine", clientId = 5799, sell = 3000 }, + { itemName = "golden lotus brooch", clientId = 21974, sell = 270 }, + { itemName = "golden mask", clientId = 31324, sell = 38000 }, + { itemName = "golden mug", clientId = 2903, sell = 250 }, + { itemName = "golden sickle", clientId = 3306, sell = 1000 }, + { itemName = "golden skull", clientId = 35580, sell = 9000 }, + { itemName = "golden sun coin", clientId = 43734, sell = 11000 }, + { itemName = "golden tiger coin", clientId = 43735, sell = 11000 }, + { itemName = "green crystal fragment", clientId = 16127, sell = 800 }, + { itemName = "green crystal shard", clientId = 16121, sell = 1500 }, + { itemName = "green crystal splinter", clientId = 16122, sell = 400 }, + { itemName = "green gem", clientId = 3038, sell = 5000 }, + { itemName = "green giant shimmering pearl", clientId = 281, sell = 3000 }, + { itemName = "hexagonal ruby", clientId = 30180, sell = 30000 }, + { itemName = "life crystal", clientId = 3061, sell = 85 }, + { itemName = "magic light wand", clientId = 3046, sell = 35 }, + { itemName = "medal of valiance", clientId = 31591, sell = 410000 }, + { itemName = "mind stone", clientId = 3062, sell = 100 }, + { itemName = "moonstone", clientId = 32771, sell = 13000 }, + { itemName = "onyx chip", clientId = 22193, sell = 500 }, + { itemName = "opal", clientId = 22194, sell = 500 }, + { itemName = "orb", clientId = 3060, sell = 750 }, + { itemName = "orichalcum pearl", clientId = 5021, sell = 40 }, + { itemName = "pirate coin", clientId = 35572, sell = 110 }, + { itemName = "plasma pearls", clientId = 23506, sell = 250 }, + { itemName = "prismatic quartz", clientId = 24962, sell = 450 }, + { itemName = "purple tome", clientId = 2848, sell = 2000 }, + { itemName = "rainbow quartz", clientId = 25737, sell = 800 }, + { itemName = "red crystal fragment", clientId = 16126, sell = 800 }, + { itemName = "red gem", clientId = 3039, sell = 1000 }, + { itemName = "red tome", clientId = 2852, sell = 2000 }, + { itemName = "royal almandine", clientId = 39038, sell = 460000 }, + { itemName = "scarab coin", clientId = 3042, sell = 100 }, + { itemName = "sea horse figurine", clientId = 31323, sell = 42000 }, + { itemName = "seacrest pearl", clientId = 21747, sell = 400 }, + { itemName = "shiny stone", clientId = 10310, sell = 500 }, + { itemName = "silver brooch", clientId = 3017, sell = 150 }, + { itemName = "silver foxmouse coin", clientId = 43733, sell = 11000 }, + { itemName = "silver hand mirror", clientId = 32772, sell = 10000 }, + { itemName = "silver moon coin", clientId = 43732, sell = 11000 }, + { itemName = "silver rune emblem explosion", clientId = 11607, sell = 5000 }, + { itemName = "silver rune emblem heavy magic missile", clientId = 11605, sell = 5000 }, + { itemName = "silver rune emblem sudden death", clientId = 11609, sell = 5000 }, + { itemName = "silver rune emblem ultimate healing", clientId = 11603, sell = 5000 }, + { itemName = "skull coin", clientId = 32583, sell = 12000 }, + { itemName = "small amethyst", clientId = 3033, sell = 200 }, + { itemName = "small diamond", clientId = 3028, sell = 300 }, + { itemName = "small emerald", clientId = 3032, sell = 250 }, + { itemName = "small enchanted amethyst", clientId = 678, sell = 200 }, + { itemName = "small enchanted emerald", clientId = 677, sell = 250 }, + { itemName = "small enchanted ruby", clientId = 676, sell = 250 }, + { itemName = "small enchanted sapphire", clientId = 675, sell = 250 }, + { itemName = "small ruby", clientId = 3030, sell = 250 }, + { itemName = "small sapphire", clientId = 3029, sell = 250 }, + { itemName = "small topaz", clientId = 9057, sell = 200 }, + { itemName = "small treasure chest", clientId = 35571, sell = 500 }, + { itemName = "spectral gold nugget", clientId = 32724, sell = 500 }, + { itemName = "spectral silver nugget", clientId = 32725, sell = 250 }, + { itemName = "spectral stone", clientId = 4840, sell = 50 }, + { itemName = "talon", clientId = 3034, sell = 320 }, + { itemName = "unicorn figurine", clientId = 30054, sell = 50000 }, + { itemName = "violet crystal shard", clientId = 16120, sell = 1500 }, + { itemName = "violet gem", clientId = 3036, sell = 10000 }, + { itemName = "war crystal", clientId = 9654, sell = 460 }, + { itemName = "watermelon tourmaline (slice)", clientId = 33779, sell = 30000 }, + { itemName = "watermelon tourmaline", clientId = 33780, sell = 230000 }, + { itemName = "white gem", clientId = 32769, sell = 12000 }, + { itemName = "white pearl", clientId = 3026, sell = 160 }, + { itemName = "yellow gem", clientId = 3037, sell = 1000 }, + }, + + ["quest items"] = { + { itemName = "ape fur", clientId = 5883, sell = 120 }, + { itemName = "bat wing", clientId = 5894, sell = 50 }, + { itemName = "bear paw", clientId = 5896, sell = 100 }, + { itemName = "behemoth claw", clientId = 5930, sell = 2000 }, + { itemName = "blue piece of cloth", clientId = 5912, sell = 200 }, + { itemName = "bonelord eye", clientId = 5898, sell = 80 }, + { itemName = "brown piece of cloth", clientId = 5913, sell = 100 }, + { itemName = "cluster of solace", clientId = 20062, sell = 500 }, + { itemName = "demon dust", clientId = 5906, sell = 300 }, + { itemName = "demonic essence", clientId = 6499, sell = 1000 }, + { itemName = "dragon claw", clientId = 5919, sell = 8000 }, + { itemName = "egg of the many", clientId = 9606, sell = 15000 }, + { itemName = "enchanted chicken wing", clientId = 5891, sell = 20000 }, + { itemName = "first verse of the hymn", clientId = 6087, sell = 100 }, + { itemName = "fish fin", clientId = 5895, sell = 150 }, + { itemName = "fourth verse of the hymn", clientId = 6090, sell = 800 }, + { itemName = "green dragon leather", clientId = 5877, sell = 100 }, + { itemName = "green dragon scale", clientId = 5920, sell = 100 }, + { itemName = "green piece of cloth", clientId = 5910, sell = 200 }, + { itemName = "hardened bone", clientId = 5925, sell = 70 }, + { itemName = "heaven blossom", clientId = 5921, sell = 50 }, + { itemName = "holy orchid", clientId = 5922, sell = 90 }, + { itemName = "honeycomb", clientId = 5902, sell = 40 }, + { itemName = "iced soil", clientId = 944, sell = 2000 }, + { itemName = "energy soil", clientId = 945, sell = 2000 }, + { itemName = "iron ore", clientId = 5880, sell = 500 }, + { itemName = "lizard leather", clientId = 5876, sell = 150 }, + { itemName = "lizard scale", clientId = 5881, sell = 120 }, + { itemName = "magic sulphur", clientId = 5904, sell = 8000 }, + { itemName = "mammoth tusk", clientId = 10321, sell = 100 }, + { itemName = "mandrake", clientId = 5014, sell = 5000 }, + { itemName = "minotaur leather", clientId = 5878, sell = 80 }, + { itemName = "mother soil", clientId = 947, sell = 5000 }, + { itemName = "natural soil", clientId = 940, sell = 2000 }, + { itemName = "necklace of the deep", clientId = 13990, sell = 3000 }, + { itemName = "nose ring", clientId = 5804, sell = 2000 }, + { itemName = "perfect behemoth fang", clientId = 5893, sell = 250 }, + { itemName = "piece of royal steel", clientId = 5887, sell = 10000 }, + { itemName = "piece of draconian steel", clientId = 5889, sell = 3000 }, + { itemName = "piece of hell steel", clientId = 5888, sell = 500 }, + { itemName = "pirate voodoo doll", clientId = 5810, sell = 500 }, + { itemName = "red dragon leather", clientId = 5948, sell = 200 }, + { itemName = "red dragon scale", clientId = 5882, sell = 200 }, + { itemName = "red piece of cloth", clientId = 5911, sell = 300 }, + { itemName = "second verse of the hymn", clientId = 6088, sell = 250 }, + { itemName = "shard", clientId = 7290, sell = 2000 }, + { itemName = "sniper gloves", clientId = 5875, sell = 2000 }, + { itemName = "soul stone", clientId = 5809, sell = 6000 }, + { itemName = "spider silk", clientId = 5879, sell = 100 }, + { itemName = "spirit container", clientId = 5884, sell = 40000 }, + { itemName = "spool of yarn", clientId = 5886, sell = 1000 }, + { itemName = "third verse of the hymn", clientId = 6089, sell = 400 }, + { itemName = "turtle shell", clientId = 5899, sell = 90 }, + { itemName = "vampire dust", clientId = 5905, sell = 100 }, + { itemName = "voodoo doll", clientId = 3002, sell = 400 }, + { itemName = "white piece of cloth", clientId = 5909, sell = 100 }, + { itemName = "wolf paw", clientId = 5897, sell = 70 }, + { itemName = "yellow piece of cloth", clientId = 5914, sell = 150 }, + }, + + ["decoration"] = { + { itemName = "baby seal doll", clientId = 7183, sell = 20000 }, + { itemName = "bat decoration", clientId = 6491, sell = 2000 }, + { itemName = "behemoth trophy", clientId = 7396, sell = 20000 }, + { itemName = "blood herb", clientId = 3734, sell = 500 }, + { itemName = "blue rose", clientId = 3659, sell = 250 }, + { itemName = "bonebeast trophy", clientId = 10244, sell = 6000 }, + { itemName = "crystal pedestal", clientId = 9063, sell = 500 }, + { itemName = "cyclops trophy", clientId = 7398, sell = 500 }, + { itemName = "deer trophy", clientId = 7397, sell = 3000 }, + { itemName = "demon trophy", clientId = 7393, sell = 40000 }, + { itemName = "disgusting trophy", clientId = 10421, sell = 3000 }, + { itemName = "doll", clientId = 2991, sell = 200 }, + { itemName = "dracoyle statue", clientId = 9034, sell = 5000 }, + { itemName = "dragon lord trophy", clientId = 7399, sell = 10000 }, + { itemName = "draken trophy", clientId = 10398, sell = 15000 }, + { itemName = "lion trophy", clientId = 7400, sell = 3000 }, + { itemName = "lizard trophy", clientId = 10419, sell = 8000 }, + { itemName = "marlin trophy", clientId = 902, sell = 5000 }, + { itemName = "minotaur trophy", clientId = 7401, sell = 500 }, + { itemName = "model ship", clientId = 2994, sell = 1000 }, + { itemName = "morbid tapestry", clientId = 34170, sell = 30000 }, + { itemName = "panda teddy", clientId = 5080, sell = 30000 }, + { itemName = "pet pig", clientId = 16165, sell = 1500 }, + { itemName = "sea serpent trophy", clientId = 9613, sell = 10000 }, + { itemName = "silver fafnar trophy", clientId = 9627, sell = 1000 }, + { itemName = "skeleton decoration", clientId = 6525, sell = 3000 }, + { itemName = "souleater trophy", clientId = 11679, sell = 7500 }, + { itemName = "statue of abyssador", clientId = 16232, sell = 4000 }, + { itemName = "statue of deathstrike", clientId = 16236, sell = 3000 }, + { itemName = "statue of devovorga", clientId = 4065, sell = 1500 }, + { itemName = "statue of gnomevil", clientId = 16240, sell = 2000 }, + { itemName = "stuffed dragon", clientId = 5791, sell = 6000 }, + { itemName = "trophy of jaul", clientId = 14006, sell = 4000 }, + { itemName = "trophy of obujos", clientId = 14002, sell = 3000 }, + { itemName = "trophy of tanjis", clientId = 14004, sell = 2000 }, + { itemName = "werebadger trophy", clientId = 22101, sell = 9000 }, + { itemName = "werebear trophy", clientId = 22103, sell = 11000 }, + { itemName = "wereboar trophy", clientId = 22102, sell = 10000 }, + { itemName = "werecrocodile trophy", clientId = 43916, sell = 15000 }, + { itemName = "werefox trophy", clientId = 27706, sell = 9000 }, + { itemName = "werehyaena trophy", clientId = 34219, sell = 12000 }, + { itemName = "werepanther trophy", clientId = 43917, sell = 14000 }, + { itemName = "weretiger trophy", clientId = 43915, sell = 14000 }, + { itemName = "wolf trophy", clientId = 7394, sell = 3000 }, + }, + + ["potions"] = { + { itemName = "berserk potion", clientId = 7439, sell = 500 }, + { itemName = "bullseye potion", clientId = 7443, sell = 500 }, + { itemName = "empty potion flask", clientId = 283, sell = 5 }, + { itemName = "empty potion flask", clientId = 284, sell = 5 }, + { itemName = "empty potion flask", clientId = 285, sell = 5 }, + { itemName = "mastermind potion", clientId = 7440, sell = 500 }, + { itemName = "vial", clientId = 2874, sell = 5 }, + }, + + ["food"] = { + { itemName = "dark mushroom", clientId = 3728, sell = 100 }, + { itemName = "ectoplasmic sushi", clientId = 11681, sell = 300 }, + { itemName = "fire mushroom", clientId = 3731, sell = 200 }, + { itemName = "green mushroom", clientId = 3732, sell = 100 }, + { itemName = "orange mushroom", clientId = 3726, sell = 150 }, + { itemName = "wood mushroom", clientId = 3727, sell = 15 }, + }, +} + +local garbage = { + "Spatial Warp Almanac", + "assassin star", + "big bone", + "bug meat", + "cape", + "combat knife", + "dirty cape", + "dirty fur", + "energy bar", + "fishbone", + "flash arrow", + "great health potion", + "great mana potion", + "great spirit potion", + "ham", + "health potion", + "knife", + "mana potion", + "royal star", + "strong health potion", + "strong mana potion", + "supreme health potion", + "the spatial warp almanac", + "ultimate health potion", + "ultimate mana potion", + "ultimate spirit potion", + "onyx arrow", + "small stone", + 1047, -- bone + 1048, -- bone + 3115, -- bone + 2920, -- torch + 6558, -- demonic blood + 27509, -- heavy crystal fragment + 27713, -- heavy crystal fragment +} + +LootShopConfigTable["garbage"] = {} + +for _, itemNameOrId in ipairs(garbage) do + local item = ItemType(itemNameOrId) + if item and item:getId() > 0 then + local suplyShop = FindSupplyShopItem(item:getName()) + local price = 1 + if suplyShop then + price = math.ceil(suplyShop.buy / 3) + end + table.insert(LootShopConfigTable["garbage"], { itemName = item:getName(), clientId = item:getId(), sell = price }) + end +end + +local lootPouchEntry = { itemName = "all loot in pouch", clientId = ITEM_GOLD_POUCH, sell = 1 } +LootShopConfig = { lootPouchEntry } + +for category, items in pairs(LootShopConfigTable) do + for _, item in ipairs(items) do + table.insert(LootShopConfig, item) + end + table.insert(LootShopConfigTable[category], lootPouchEntry) +end + +function FindLootShopCategory(categoryName) + for category, items in pairs(LootShopConfigTable) do + if string.starts(category:lower(), categoryName:lower()) then + return items + end + end +end + +function FindLootShopItem(itemName) + for _, item in ipairs(LootShopConfig) do + if string.starts(item.itemName:lower(), itemName:lower()) then + return item + end + end +end diff --git a/data-otservbr-global/scripts/movements/others/closing_door.lua b/data-otservbr-global/scripts/movements/others/closing_door.lua index a4e286d0a71..448d208b20f 100644 --- a/data-otservbr-global/scripts/movements/others/closing_door.lua +++ b/data-otservbr-global/scripts/movements/others/closing_door.lua @@ -13,6 +13,9 @@ for index, value in ipairs(LevelDoorTable) do table.insert(doorIds, value.openDoor) end end +local skipActionIds = { + 12107, +} function closingDoor.onStepIn(creature, item, position, fromPosition) local player = creature:getPlayer() @@ -22,7 +25,7 @@ function closingDoor.onStepIn(creature, item, position, fromPosition) for index, value in ipairs(QuestDoorTable) do if value.openDoor == item.itemid then - if player:getStorageValue(item.actionid) ~= -1 then + if player:getStorageValue(item.actionid) ~= -1 or table.contains(skipActionIds, item.actionid) then return true else player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The door seems to be sealed against unwanted intruders.") diff --git a/data-otservbr-global/scripts/movements/quests/the_gravedigger_of_drefia/teleport.lua b/data-otservbr-global/scripts/movements/quests/the_gravedigger_of_drefia/teleport.lua index 824642c4287..ad3f9447859 100644 --- a/data-otservbr-global/scripts/movements/quests/the_gravedigger_of_drefia/teleport.lua +++ b/data-otservbr-global/scripts/movements/quests/the_gravedigger_of_drefia/teleport.lua @@ -13,9 +13,9 @@ local setting = { }, } -local teleport = MoveEvent() +local event = MoveEvent() -function teleport.onStepIn(creature, item, position, fromPosition) +function event.onStepIn(creature, item, position, fromPosition) local player = creature:getPlayer() if not player then return true @@ -32,10 +32,10 @@ function teleport.onStepIn(creature, item, position, fromPosition) return true end -teleport:type("stepin") +event:type("stepin") for index, value in pairs(setting) do - teleport:aid(index) + event:aid(index) end -teleport:register() +event:register() diff --git a/data-otservbr-global/scripts/quests/primal_ordeal_quest/magma_bubble_fight.lua b/data-otservbr-global/scripts/quests/primal_ordeal_quest/magma_bubble_fight.lua index c2642008a09..36de1fb1497 100644 --- a/data-otservbr-global/scripts/quests/primal_ordeal_quest/magma_bubble_fight.lua +++ b/data-otservbr-global/scripts/quests/primal_ordeal_quest/magma_bubble_fight.lua @@ -270,8 +270,7 @@ theEndOfDaysHealth:register() local magmaCrystalDeath = CreatureEvent("fight.magma-bubble.MagmaCrystalDeath") function magmaCrystalDeath.onDeath() - -- The monster count is only updated AFTER the event is called, so we need to subtract 1 - local crystals = encounter:countMonsters("magma crystal") - 1 + local crystals = encounter:countMonsters("magma crystal") if crystals == 0 then encounter:nextStage() else @@ -283,8 +282,7 @@ magmaCrystalDeath:register() local endOfDaysDeath = CreatureEvent("fight.magma-bubble.TheEndOfDaysDeath") function endOfDaysDeath.onDeath() - -- The monster count is only updated AFTER the event is called, so we need to subtract 1 - local monsters = encounter:countMonsters("the end of days") - 1 + local monsters = encounter:countMonsters("the end of days") if monsters == 0 then encounter:nextStage() end diff --git a/data-otservbr-global/scripts/quests/primal_ordeal_quest/the_primal_manace_lever.lua b/data-otservbr-global/scripts/quests/primal_ordeal_quest/the_primal_manace_lever.lua index bb01eb8da7d..805c68b689f 100644 --- a/data-otservbr-global/scripts/quests/primal_ordeal_quest/the_primal_manace_lever.lua +++ b/data-otservbr-global/scripts/quests/primal_ordeal_quest/the_primal_manace_lever.lua @@ -15,6 +15,7 @@ local config = { from = Position(33547, 32749, 15), to = Position(33570, 32769, 15), }, + disableCooldown = true, exit = Position(33520, 32871, 15), } diff --git a/data-otservbr-global/scripts/quests/the_new_frontier/action-beaver.lua b/data-otservbr-global/scripts/quests/the_new_frontier/action-beaver.lua index bf29b8854a3..68350db37ef 100644 --- a/data-otservbr-global/scripts/quests/the_new_frontier/action-beaver.lua +++ b/data-otservbr-global/scripts/quests/the_new_frontier/action-beaver.lua @@ -13,16 +13,16 @@ function beaverTrees.onUse(player, item, fromPosition, target, toPosition, isHot if toPosition == config.treesBeaver[1] or toPosition == config.treesBeaver[2] or toPosition == config.treesBeaver[3] and player:getStorageValue(TheNewFrontier.Questline) == 5 then if toPosition == config.treesBeaver[1] and player:getStorageValue(TheNewFrontier.Mission02.Beaver1) < 1 then for i = 1, 3 do - pos = toPosition - Game.createMonster("enraged squirrel", pos) + position = toPosition + Game.createMonster("enraged squirrel", position) toPosition:sendMagicEffect(CONST_ME_TELEPORT) end player:setStorageValue(TheNewFrontier.Mission02.Beaver1, 1) player:say("You have marked the tree, but you also angered the aquirrel family who lived on it!", TALKTYPE_MONSTER_SAY) elseif toPosition == config.treesBeaver[2] and player:getStorageValue(TheNewFrontier.Mission02.Beaver2) < 1 then for i = 1, 5 do - pos = toPosition - Game.createMonster("wolf", pos) + position = toPosition + Game.createMonster("wolf", position) toPosition:sendMagicEffect(CONST_ME_TELEPORT) end Game.createMonster("war wolf", toPosition) diff --git a/data-otservbr-global/scripts/quests/the_order_of_lion/action-bounac_entrance.lua b/data-otservbr-global/scripts/quests/the_order_of_lion/action-bounac_entrance.lua index 803bfc1b1e6..6c4c6b6d5c1 100644 --- a/data-otservbr-global/scripts/quests/the_order_of_lion/action-bounac_entrance.lua +++ b/data-otservbr-global/scripts/quests/the_order_of_lion/action-bounac_entrance.lua @@ -20,3 +20,6 @@ end bounacEntrance:aid(59602) bounacEntrance:aid(59603) bounacEntrance:register() + +SimpleTeleport(Position(32475, 32497, 7), Position(32475, 32496, 6), nil, true) +SimpleTeleport(Position(32475, 32497, 6), Position(32475, 32498, 7), nil, true) diff --git a/data-otservbr-global/startup/tables/item.lua b/data-otservbr-global/startup/tables/item.lua index fecd3fc6a0b..6aaa5f7235d 100644 --- a/data-otservbr-global/startup/tables/item.lua +++ b/data-otservbr-global/startup/tables/item.lua @@ -276,6 +276,11 @@ ItemAction = { } ItemUnique = { + -- Issavi town teleport + [9515] = { + itemId = 1949, + itemPos = { x = 33926, y = 31477, z = 5 }, + }, -- The shattered isles -- data\scripts\actions\quests\the_shattered_isles\nargor_maps.lua [40001] = { diff --git a/data-otservbr-global/world/otservbr-npc.xml b/data-otservbr-global/world/otservbr-npc.xml index 305023dbfa2..85ee7763faa 100644 --- a/data-otservbr-global/world/otservbr-npc.xml +++ b/data-otservbr-global/world/otservbr-npc.xml @@ -2379,6 +2379,18 @@ + + + + + + + + + + + + diff --git a/data/events/scripts/player.lua b/data/events/scripts/player.lua index 93a37f0dafc..cf78eeb2bc7 100644 --- a/data/events/scripts/player.lua +++ b/data/events/scripts/player.lua @@ -642,18 +642,14 @@ function Player:onChangeZone(zone) delay = configManager.getNumber(configKeys.STAMINA_GREEN_DELAY) end - local message = string.format("In protection zone. Every %i minutes, gain %i stamina.", delay, configManager.getNumber(configKeys.STAMINA_PZ_GAIN)) - self:sendTextMessage(MESSAGE_STATUS, message) + local message = string.format("In protection zone. Recharging %i stamina every %i minutes.", configManager.getNumber(configKeys.STAMINA_PZ_GAIN), delay) + self:sendTextMessage(MESSAGE_FAILURE, message) staminaBonus.eventsPz[self:getId()] = addEvent(addStamina, delay * 60 * 1000, nil, self:getId(), delay * 60 * 1000) end end else if event then - self:sendTextMessage( - MESSAGE_STATUS, - "You are no longer refilling stamina, \z - since you left a regeneration zone." - ) + self:sendTextMessage(MESSAGE_FAILURE, "You are no longer refilling stamina, since you left a regeneration zone.") stopEvent(event) staminaBonus.eventsPz[self:getId()] = nil end diff --git a/data/global.lua b/data/global.lua index 4caec8c69f9..3508d7fbd44 100644 --- a/data/global.lua +++ b/data/global.lua @@ -19,6 +19,10 @@ function IsRetroPVP() return configManager.getBoolean(configKeys.TOGGLE_SERVER_IS_RETRO) end +function IsTravelFree() + return configManager.getBoolean(configKeys.TOGGLE_TRAVELS_FREE) +end + -- NOTE: 0 is disabled. PARTY_PROTECTION = (IsRetroPVP() and 0) or 1 ADVANCED_SECURE_MODE = (IsRetroPVP() and 0) or 1 @@ -159,7 +163,7 @@ function addStamina(playerId, ...) staminaBonus.eventsTrainer[playerId] = nil else player:setStamina(player:getStamina() + staminaBonus.bonus) - player:sendTextMessage(MESSAGE_STATUS, string.format("%i of stamina has been refilled.", configManager.getNumber(configKeys.STAMINA_TRAINER_GAIN))) + player:sendTextMessage(MESSAGE_FAILURE, string.format("%i of stamina has been refilled.", configManager.getNumber(configKeys.STAMINA_TRAINER_GAIN))) staminaBonus.eventsTrainer[playerId] = addEvent(addStamina, staminaBonus.period, playerId) end end @@ -196,8 +200,9 @@ function addStamina(playerId, ...) return false end - player:setStamina(player:getStamina() + configManager.getNumber(configKeys.STAMINA_PZ_GAIN)) - player:sendTextMessage(MESSAGE_STATUS, string.format("%i of stamina has been refilled.", configManager.getNumber(configKeys.STAMINA_PZ_GAIN))) + local regen = configManager.getNumber(configKeys.STAMINA_PZ_GAIN) + player:setStamina(player:getStamina() + regen) + player:sendTextMessage(MESSAGE_STATUS, string.format("%i minute%s of stamina has been refilled.", regen, regen == 1 and "" or "s")) staminaBonus.eventsPz[localPlayerId] = addEvent(addStamina, delay, nil, localPlayerId, delay) return true end diff --git a/data/items/items.xml b/data/items/items.xml index 67bb50a17ff..ade8054ec07 100644 --- a/data/items/items.xml +++ b/data/items/items.xml @@ -7360,6 +7360,8 @@ + + diff --git a/data/libs/achievements_lib.lua b/data/libs/achievements_lib.lua index 49318843c1c..2b0f441ad29 100644 --- a/data/libs/achievements_lib.lua +++ b/data/libs/achievements_lib.lua @@ -570,6 +570,10 @@ achievements = { [475] = { name = "Taskmaster", grade = 1, points = 2, description = "Having hunted and bested them all, you live for the thrill of the hunt!" }, [476] = { name = "Verminbane", grade = 1, points = 2, description = "And so it begins!" }, + --12.60 + [480] = { name = "Honorary Rascoohan", grade = 1, points = 2, description = "When in Rascacoon, do as the Rascoohans do!" }, + [481] = { name = "Release the Kraken", grade = 1, points = 3, description = "Riding around on this squishy companion gives you the feeling of flying through the air... uhm... swimming through the seven seas!" }, + --Custom [477] = { name = "Waypoint Explorer", grade = 1, points = 1, description = "You've explored all the towns of Tibia and discovered each town's waypoint." }, [478] = { name = "Up the Molehill", grade = 1, points = 3, description = "Putting this candle stump on your new mount was kind of a waiting game. You're even tempted to call it whack-a-mole. But in the end you found a loyal companion for your journeys into the depths." }, @@ -578,6 +582,12 @@ achievements = { --12.60 [480] = { name = "Honorary Rascoohan", grade = 1, points = 2, description = "When in Rascacoon, do as the Rascoohans do!" }, [481] = { name = "Release the Kraken", grade = 1, points = 3, description = "Riding around on this squishy companion gives you the feeling of flying through the air... uhm... swimming through the seven seas!" }, + + -- 12.90 + [482] = { name = "Friendly Fire", grade = 1, points = 2, description = "You mastered the fire and tamed a supervulcano!" }, + + -- + [483] = { name = "Dream Warrior", grade = 2, points = 6, description = "You became an acquaintance of the courts of dreams and acquired the right to display your new status and title of 'dream warrior'." }, } ACHIEVEMENT_FIRST = 1 diff --git a/data/libs/exercise_training.lua b/data/libs/exercise_training.lua index 6981c55ca3b..ab4282b3cbb 100644 --- a/data/libs/exercise_training.lua +++ b/data/libs/exercise_training.lua @@ -55,7 +55,7 @@ function ExerciseEvent(playerId, tilePosition, weaponId, dummyId) end if player:isTraining() == 0 then - player:sendTextMessage(MESSAGE_FAILURE, "You've stopped training!") + player:sendTextMessage(MESSAGE_FAILURE, "You have stopped training.") return LeaveTraining(playerId) end diff --git a/data/libs/functions/bosslever.lua b/data/libs/functions/bosslever.lua index 257e9eb4eae..3792cdf629d 100644 --- a/data/libs/functions/bosslever.lua +++ b/data/libs/functions/bosslever.lua @@ -18,7 +18,7 @@ ---@field private exit Position ---@field private encounter Encounter ---@field private timeoutEvent Event ----@field private testMode boolean +---@field private disableCooldown boolean BossLever = {} --[[ @@ -71,7 +71,7 @@ setmetatable(BossLever, { exit = config.exit, area = config.specPos, monsters = config.monsters or {}, - testMode = config.testMode, + disableCooldown = config.disableCooldown, _position = nil, _uid = nil, _aid = nil, @@ -115,7 +115,7 @@ end ---@param player Player ---@return number function BossLever:lastEncounterTime(player) - if not player or self.testMode then + if not player or self.disableCooldown then return 0 end return player:getBossCooldown(self.name) @@ -178,7 +178,18 @@ function BossLever:onUse(player) return false end - if not lever:canUseLever(player, self.name, self.timeToFightAgain / 60 / 60) then + if self:lastEncounterTime(creature) > os.time() then + local info = lever:getInfoPositions() + for _, v in pairs(info) do + local newPlayer = v.creature + if newPlayer then + local timeLeft = self:lastEncounterTime(newPlayer) - os.time() + newPlayer:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You or a member in your team have to wait " .. getTimeInWords(timeLeft) .. " to face " .. self.name .. " again!") + if self:lastEncounterTime(newPlayer) > os.time() then + newPlayer:getPosition():sendMagicEffect(CONST_ME_POFF) + end + end + end return false end self.onUseExtra(creature) diff --git a/data/libs/functions/creature.lua b/data/libs/functions/creature.lua index d43a31f287d..29e0303ca7e 100644 --- a/data/libs/functions/creature.lua +++ b/data/libs/functions/creature.lua @@ -7,9 +7,14 @@ function Creature.getClosestFreePosition(self, position, maxRadius, mustBeReacha end local checkPosition = Position(position) + local closestDistance = -1 + local closestPosition = Position() for radius = 0, maxRadius do checkPosition.x = checkPosition.x - math.min(1, radius) checkPosition.y = checkPosition.y + math.min(1, radius) + if closestDistance ~= -1 then + return closestPosition + end local total = math.max(1, radius * 8) for i = 1, total do @@ -20,11 +25,15 @@ function Creature.getClosestFreePosition(self, position, maxRadius, mustBeReacha local tile = Tile(checkPosition) if tile and tile:getCreatureCount() == 0 and not tile:hasProperty(CONST_PROP_IMMOVABLEBLOCKSOLID) and (not mustBeReachable or self:getPathTo(checkPosition)) then - return checkPosition + local distance = self:getPosition():getDistance(checkPosition) + if closestDistance == -1 or closestDistance > distance then + closestDistance = distance + closestPosition = Position(checkPosition) + end end end end - return Position() + return closestPosition end function Creature.getMonster(self) diff --git a/data/libs/functions/functions.lua b/data/libs/functions/functions.lua index c39a10de451..48e1ff29078 100644 --- a/data/libs/functions/functions.lua +++ b/data/libs/functions/functions.lua @@ -731,10 +731,6 @@ if not bosssPlayers then } end -function isInRange(pos, fromPos, toPos) - return pos.x >= fromPos.x and pos.y >= fromPos.y and pos.z >= fromPos.z and pos.x <= toPos.x and pos.y <= toPos.y and pos.z <= toPos.z -end - function isNumber(str) return tonumber(str) ~= nil end diff --git a/data/libs/functions/load.lua b/data/libs/functions/load.lua index 9319bc97ac6..bedbbe84fe1 100644 --- a/data/libs/functions/load.lua +++ b/data/libs/functions/load.lua @@ -27,3 +27,4 @@ dofile(CORE_DIRECTORY .. "/libs/functions/teleport.lua") dofile(CORE_DIRECTORY .. "/libs/functions/tile.lua") dofile(CORE_DIRECTORY .. "/libs/functions/vocation.lua") dofile(CORE_DIRECTORY .. "/libs/functions/set.lua") +dofile(CORE_DIRECTORY .. "/libs/functions/queue.lua") diff --git a/data/libs/functions/party.lua b/data/libs/functions/party.lua index c2fdffffc28..b811b8bb547 100644 --- a/data/libs/functions/party.lua +++ b/data/libs/functions/party.lua @@ -74,6 +74,50 @@ function Party.hasDruid(self) return self:hasVocation(VOCATION.BASE_ID.DRUID) end +function Party:getPlayersWithVocation(vocation) + local players = {} + if self:getLeader():getVocation():getBaseId() == vocation then + table.insert(players, self:getLeader()) + end + local membersList = self:getMembers() + for i = 1, #membersList do + local player = membersList[i] + if player and player:getVocation():getBaseId() == vocation then + table.insert(players, player) + end + end + return players +end + +function Party:getKnights() + return self:getPlayersWithVocation(VOCATION.BASE_ID.KNIGHT) +end + +function Party:getPaladins() + return self:getPlayersWithVocation(VOCATION.BASE_ID.PALADIN) +end + +function Party:getSorcerers() + return self:getPlayersWithVocation(VOCATION.BASE_ID.SORCERER) +end + +function Party:getDruids() + return self:getPlayersWithVocation(VOCATION.BASE_ID.DRUID) +end + +function Party:getMages() + local sorcerers = self:getSorcerers() + local druids = self:getDruids() + local mages = {} + for i = 1, #sorcerers do + table.insert(mages, sorcerers[i]) + end + for i = 1, #druids do + table.insert(mages, druids[i]) + end + return mages +end + function Participants(player, requireSharedExperience) local party = player:getParty() if not party then @@ -86,3 +130,14 @@ function Participants(player, requireSharedExperience) table.insert(members, party:getLeader()) return members end + +function Player:isPartyLeaderOrSolo(sharedExperience) + local party = self:getParty() + if not party then + return true + end + if sharedExperience and not party:isSharedExperienceActive() then + return true + end + return party:getLeader() == self +end diff --git a/data/libs/functions/player.lua b/data/libs/functions/player.lua index 7be4b743228..b462a4777f6 100644 --- a/data/libs/functions/player.lua +++ b/data/libs/functions/player.lua @@ -652,6 +652,62 @@ function Player:setFiendish() return false end +function Player:findItemInInbox(itemId, name) + local inbox = self:getSlotItem(CONST_SLOT_STORE_INBOX) + local items = inbox:getItems() + for _, item in pairs(items) do + if item:getId() == itemId and (not name or item:getName() == name) then + return item + end + end + return nil +end + +function Player:sendColoredMessage(message) + local grey = 3003 + local blue = 3043 + local green = 3415 + local purple = 36792 + local yellow = 34021 + + local msg = message:gsub("{grey|", "{" .. grey .. "|"):gsub("{blue|", "{" .. blue .. "|"):gsub("{green|", "{" .. green .. "|"):gsub("{purple|", "{" .. purple .. "|"):gsub("{yellow|", "{" .. yellow .. "|") + return self:sendTextMessage(MESSAGE_LOOT, msg) +end + +function Player:showInfoModal(title, message, buttonText) + local modal = ModalWindow({ + title = title, + message = message, + }) + buttonText = buttonText or "Close" + modal:addButton(buttonText, function() end) + modal:setDefaultEscapeButton(buttonText) + + modal:sendToPlayer(self) +end + +function Player:showConfirmationModal(title, message, yesCallback, noCallback, yesText, noText) + local modal = ModalWindow({ + title = title, + message = message, + }) + yesText = yesText or "Yes" + modal:addButton(yesText, yesCallback or function() end) + noText = noText or "No" + modal:addButton(noText, noCallback or function() end) + modal:setDefaultEscapeButton(noText) + + modal:sendToPlayer(self) +end + +function Player:removeAll(itemId) + local count = 0 + while self:removeItem(itemId, 1) do + count = count + 1 + end + return count +end + local function bossKVScope(bossNameOrId) local mType = MonsterType(bossNameOrId) if not mType then diff --git a/data/libs/functions/queue.lua b/data/libs/functions/queue.lua new file mode 100644 index 00000000000..33a6c240947 --- /dev/null +++ b/data/libs/functions/queue.lua @@ -0,0 +1,73 @@ +Queue = {} + +---@param initial table|Queue +---@param options table +---@return Queue +setmetatable(Queue, { + __call = function(self) + local set = setmetatable({ + head = 0, + tail = -1, + items = {}, + }, { __index = Queue }) + return set + end, +}) + +function Queue:isEmpty() + return self.head > self.tail +end + +function Queue:enqueue(value) + self.tail = self.tail + 1 + self.items[self.tail] = value +end + +function Queue:dequeue() + if self:isEmpty() then + error("Queue is empty") + end + + local value = self.items[self.head] + self.items[self.head] = nil -- to allow garbage collection + self.head = self.head + 1 + return value +end + +function Queue:peek() + if self:isEmpty() then + error("Queue is empty") + end + + return self.items[self.head] +end + +function Queue:size() + return self.tail - self.head + 1 +end + +RandomQueue = {} + +setmetatable(RandomQueue, { + __index = Queue, + __call = function(self) + local instance = setmetatable(Queue(), { __index = RandomQueue }) + return instance + end, +}) + +function RandomQueue:dequeue() + if self:isEmpty() then + error("RandomQueue is empty") + end + + local index = math.random(self.head, self.tail) + local value = self.items[index] + + -- Move the last item to the place of the removed item to maintain contiguity + self.items[index] = self.items[self.tail] + self.items[self.tail] = nil -- to allow garbage collection + self.tail = self.tail - 1 + + return value +end diff --git a/data/libs/functions/string.lua b/data/libs/functions/string.lua index 5d41af47c75..9d746b82e3a 100644 --- a/data/libs/functions/string.lua +++ b/data/libs/functions/string.lua @@ -96,6 +96,19 @@ string.splitTrimmed = function(str, sep) return res end +-- Function that splits a string into parts using a separator +-- @param str (string) - the string to be split, sep (string) - the separator to be used +-- @return a table containing the separated parts of the string +function string.splitFirst(str, delimiter) + local start, finish = string.find(str, delimiter) + if start == nil then + return str, nil + end + local firstPart = string.sub(str, 1, start - 1) + local secondPart = string.sub(str, finish + 1) + return firstPart:trim(), secondPart:trim() +end + --- Function that removes whitespace from the beginning and end of a string -- @param str (string) - the string to be modified -- @return the string without whitespace at the beginning and end diff --git a/data/libs/functions/teleport.lua b/data/libs/functions/teleport.lua index de150cdcfdc..266e29d4fd8 100644 --- a/data/libs/functions/teleport.lua +++ b/data/libs/functions/teleport.lua @@ -2,7 +2,7 @@ function Teleport.isTeleport(self) return true end -function SimpleTeleport(from, destination, condition) +function SimpleTeleport(from, destination, condition, disableEffect) local teleport = MoveEvent() function teleport.onStepIn(creature, item, position, fromPosition) @@ -16,7 +16,9 @@ function SimpleTeleport(from, destination, condition) end player:teleportTo(destination) - player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + if not disableEffect then + player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) + end return true end diff --git a/data/libs/hireling_lib.lua b/data/libs/hireling_lib.lua index ee52150c5ea..528a903da88 100644 --- a/data/libs/hireling_lib.lua +++ b/data/libs/hireling_lib.lua @@ -676,18 +676,6 @@ function Player:sendHirelingSelectionModal(title, message, callback, data) modal:sendToPlayer(self) end -function Player:showInfoModal(title, message, buttonText) - local modal = ModalWindow({ - title = title, - message = message, - }) - buttonText = buttonText or "Close" - modal:addButton(buttonText, function() end) - modal:setDefaultEscapeButton(buttonText) - - modal:sendToPlayer(self) -end - function Player:hasHirelingSkill(skillName) return self:kv():scoped("hireling-skills"):get(skillName) end diff --git a/data/libs/reward_boss/reward_boss.lua b/data/libs/reward_boss/reward_boss.lua index 8913d746a84..5576eb62fa6 100644 --- a/data/libs/reward_boss/reward_boss.lua +++ b/data/libs/reward_boss/reward_boss.lua @@ -116,6 +116,9 @@ function ResetAndSetTargetList(creature) local bossId = creature:getId() local info = _G.GlobalBosses[bossId] + if not info then + return + end -- Reset all players' status for _, player in pairs(info) do player.active = false diff --git a/data/modules/scripts/blessings/blessings.lua b/data/modules/scripts/blessings/blessings.lua index 2f3aa90fe6b..c7c1ce42a72 100644 --- a/data/modules/scripts/blessings/blessings.lua +++ b/data/modules/scripts/blessings/blessings.lua @@ -361,6 +361,10 @@ Blessings.BuyAllBlesses = function(player) end if player:removeMoneyBank(totalCost) then + metrics.addCounter("balance_decrease", remainsPrice, { + player = player:getName(), + context = "blessings", + }) for i, v in ipairs(missingBless) do player:addBlessing(v.id, 1) end diff --git a/data/npclib/npc.lua b/data/npclib/npc.lua index 5ca017e1f73..30305778707 100644 --- a/data/npclib/npc.lua +++ b/data/npclib/npc.lua @@ -54,12 +54,12 @@ end function SayEvent(npcId, playerId, messageDelayed, npcHandler, textType) local npc = Npc(npcId) if not npc then - return logger.error("[NpcHandler:say] - Npc parameter for npc '{}' is missing, nil or not found", npc:getName()) + return logger.error("[{} NpcHandler:say] - Npc parameter for npc '{}' is missing, nil or not found", npc:getName(), npc:getName()) end local player = Player(playerId) if not player then - return logger.error("[NpcHandler:say] - Player parameter for npc '{}' is missing, nil or not found", npc:getName()) + return logger.error("[{} NpcHandler:say] - Player parameter for npc '{}' is missing, nil or not found", npc:getName(), npc:getName()) end local parseInfo = { diff --git a/data/npclib/npc_system/modules.lua b/data/npclib/npc_system/modules.lua index c8f2847c84f..68fff0c39df 100644 --- a/data/npclib/npc_system/modules.lua +++ b/data/npclib/npc_system/modules.lua @@ -46,7 +46,7 @@ if Modules == nil then return false end - local cost, costMessage = (configManager.getBoolean(configKeys.TOGGLE_TRAVELS_FREE) and 0) or parameters.cost, "%d gold" + local cost, costMessage = (IsTravelFree() and 0) or parameters.cost, "%d gold" if cost and cost > 0 then if parameters.discount then cost = cost - StdModule.travelDiscount(npc, player, parameters.discount) @@ -64,8 +64,13 @@ if Modules == nil then [TAG_PVPBLESSCOST] = Blessings.getPvpBlessingCost(player:getLevel(), false), [TAG_TRAVELCOST] = costMessage, } + if parameters.replacements then + for k, v in pairs(parameters.replacements) do + parseInfo[k] = v + end + end if parameters.text then - npcHandler:say(npcHandler:parseMessage(parameters.text, parseInfo), npc, player) + npcHandler:say(npcHandler:parseMessage(parameters.text, parseInfo, player, message), npc, player) end if parameters.ungreet then @@ -195,7 +200,7 @@ if Modules == nil then return false end - local cost = (configManager.getBoolean(configKeys.TOGGLE_TRAVELS_FREE) and 0) or parameters.cost + local cost = (IsTravelFree() and 0) or parameters.cost if cost and cost > 0 then if parameters.discount then cost = cost - StdModule.travelDiscount(npc, player, parameters.discount) @@ -509,7 +514,7 @@ if Modules == nil then return false end - local cost = (configManager.getBoolean(configKeys.TOGGLE_TRAVELS_FREE) and 0) or parameters.cost + local cost = (IsTravelFree() and 0) or parameters.cost module.npcHandler:say(string.format("Do you want to travel to '%s' for '%d' gold coins?", keywords[1], cost), npc, player) return true @@ -523,7 +528,7 @@ if Modules == nil then local npcHandler = module.npcHandler - local cost = (configManager.getBoolean(configKeys.TOGGLE_TRAVELS_FREE) and 0) or parameters.cost + local cost = (IsTravelFree() and 0) or parameters.cost local destination = parameters.destination local premium = parameters.premium diff --git a/data/npclib/npc_system/npc_handler.lua b/data/npclib/npc_system/npc_handler.lua index d72dca40553..8f4d5f2ca48 100644 --- a/data/npclib/npc_system/npc_handler.lua +++ b/data/npclib/npc_system/npc_handler.lua @@ -221,7 +221,7 @@ if NpcHandler == nil then function NpcHandler:removeInteraction(npc, player) local playerId = player:getId() if Player(player) == nil then - return logger.error("[NpcHandler:removeInteraction] - Player parameter for npc '{}' is missing or nil", npc:getName()) + return logger.error("[{} NpcHandler:removeInteraction] - Player parameter for npc '{}' is missing or nil", npc:getName(), npc:getName()) end if self:getEventDelayedSay(playerId) then @@ -345,16 +345,29 @@ if NpcHandler == nil then end -- Translates all message tags found in msg using parseInfo - function NpcHandler:parseMessage(msg, parseInfo) + function NpcHandler:parseMessage(msg, parseInfo, player, message) local ret = msg if type(ret) == "string" then for search, replace in pairs(parseInfo) do - ret = string.gsub(ret, search, replace) + if type(replace) == "string" then + ret = string.gsub(ret, search, replace) + elseif type(replace) == "function" then + ret = string.gsub(ret, search, replace(player, message)) + else + ret = string.gsub(ret, search, replace) + end end else for i = 1, #ret do for search, replace in pairs(parseInfo) do ret[i] = string.gsub(ret[i], search, replace) + if type(replace) == "string" then + ret[i] = string.gsub(ret[i], search, replace) + elseif type(replace) == "function" then + ret = string.gsub(ret, search, replace(player, message)) + else + ret[i] = string.gsub(ret[i], search, replace) + end end end end diff --git a/data/scripts/eventcallbacks/monster/ondroploot__base.lua b/data/scripts/eventcallbacks/monster/ondroploot__base.lua index c30f0026316..cb7bc4207e8 100644 --- a/data/scripts/eventcallbacks/monster/ondroploot__base.lua +++ b/data/scripts/eventcallbacks/monster/ondroploot__base.lua @@ -1,10 +1,14 @@ local callback = EventCallback() +function Player:canReceiveLoot() + return self:getStamina() > 840 +end + function callback.monsterOnDropLoot(monster, corpse) local player = Player(corpse:getCorpseOwner()) local factor = 1.0 local msgSuffix = "" - if player and player:getStamina() > 840 then + if player and player:canReceiveLoot() then local config = player:calculateLootFactor(monster) factor = config.factor msgSuffix = config.msgSuffix diff --git a/data/scripts/eventcallbacks/monster/ondroploot_boosted.lua b/data/scripts/eventcallbacks/monster/ondroploot_boosted.lua index 613d1943f7b..1d94033a572 100644 --- a/data/scripts/eventcallbacks/monster/ondroploot_boosted.lua +++ b/data/scripts/eventcallbacks/monster/ondroploot_boosted.lua @@ -1,21 +1,22 @@ local callback = EventCallback() function callback.monsterOnDropLoot(monster, corpse) - if configManager.getNumber(configKeys.RATE_LOOT) == 0 then + if not monster or not corpse then return end - local mType = monster:getType() - if mType:isRewardBoss() then + if monster:getName():lower() ~= Game.getBoostedCreature():lower() then return end - if monster:getName():lower() ~= Game.getBoostedCreature():lower() then + local mType = monster:getType() + if mType:isRewardBoss() then return end local player = Player(corpse:getCorpseOwner()) - if not player then + if not player or not player:canReceiveLoot() then return end - if player:getStamina() <= 840 then + local mType = monster:getType() + if not mType then return end diff --git a/data/scripts/eventcallbacks/monster/ondroploot_hazard.lua b/data/scripts/eventcallbacks/monster/ondroploot_hazard.lua index ec9c7743176..ddcaeaee782 100644 --- a/data/scripts/eventcallbacks/monster/ondroploot_hazard.lua +++ b/data/scripts/eventcallbacks/monster/ondroploot_hazard.lua @@ -1,21 +1,15 @@ local callback = EventCallback() function callback.monsterOnDropLoot(monster, corpse) - if configManager.getNumber(configKeys.RATE_LOOT) == 0 then - return - end - local mType = monster:getType() - if mType:isRewardBoss() then - return - end if not monster:hazard() then return end local player = Player(corpse:getCorpseOwner()) - if not player then + if not player or not player:canReceiveLoot() then return end - if player:getStamina() <= 840 then + local mType = monster:getType() + if not mType then return end diff --git a/data/scripts/eventcallbacks/monster/ondroploot_prey.lua b/data/scripts/eventcallbacks/monster/ondroploot_prey.lua index 123401072c7..1f732f173d2 100644 --- a/data/scripts/eventcallbacks/monster/ondroploot_prey.lua +++ b/data/scripts/eventcallbacks/monster/ondroploot_prey.lua @@ -1,18 +1,12 @@ local callback = EventCallback() function callback.monsterOnDropLoot(monster, corpse) - if configManager.getNumber(configKeys.RATE_LOOT) == 0 then - return - end - local mType = monster:getType() - if mType:isRewardBoss() then - return - end local player = Player(corpse:getCorpseOwner()) - if not player then + if not player or not player:canReceiveLoot() then return end - if player:getStamina() <= 840 then + local mType = monster:getType() + if not mType then return end diff --git a/data/scripts/eventcallbacks/monster/ondroploot_wealth_duplex.lua b/data/scripts/eventcallbacks/monster/ondroploot_wealth_duplex.lua index 0cb45226827..20202c0b5cc 100644 --- a/data/scripts/eventcallbacks/monster/ondroploot_wealth_duplex.lua +++ b/data/scripts/eventcallbacks/monster/ondroploot_wealth_duplex.lua @@ -1,18 +1,12 @@ local callback = EventCallback() function callback.monsterOnDropLoot(monster, corpse) - if configManager.getNumber(configKeys.RATE_LOOT) == 0 then - return - end - local mType = monster:getType() - if mType:isRewardBoss() then - return - end local player = Player(corpse:getCorpseOwner()) - if not player then + if not player or not player:canReceiveLoot() then return end - if player:getStamina() <= 840 then + local mType = monster:getType() + if not mType then return end diff --git a/data/scripts/eventcallbacks/monster/postdroploot_analyzer.lua b/data/scripts/eventcallbacks/monster/postdroploot_analyzer.lua index 371bdd01b65..8214ac98ea1 100644 --- a/data/scripts/eventcallbacks/monster/postdroploot_analyzer.lua +++ b/data/scripts/eventcallbacks/monster/postdroploot_analyzer.lua @@ -2,10 +2,7 @@ local callback = EventCallback() function callback.monsterPostDropLoot(monster, corpse) local player = Player(corpse:getCorpseOwner()) - if not player then - return - end - if player:getStamina() <= 840 then + if not player or not player:canReceiveLoot() then return end local mType = monster:getType() diff --git a/data/scripts/talkactions/gm/teleport_to_player.lua b/data/scripts/talkactions/gm/teleport_to_player.lua index 1a59a0ffd12..786cfa7cbab 100644 --- a/data/scripts/talkactions/gm/teleport_to_player.lua +++ b/data/scripts/talkactions/gm/teleport_to_player.lua @@ -20,7 +20,7 @@ function teleportToCreature.onSay(player, words, param) local isGhost = targetPlayer:isInGhostMode() local isTraining = _G.OnExerciseTraining[targetPlayer:getId()] local isIdle = targetPlayer:getIdleTime() >= 5 * 60 * 1000 - local isInTrainingRoom = isInRange(targetPlayer:getPosition(), Position(1015, 1109, 7), Position(1094, 1738, 7)) + local isInTrainingRoom = targetPlayer:getPosition():isInRange(Position(1015, 1109, 7), Position(1094, 1738, 7)) local isActive = not isGhost and not isTraining and not isIdle and not isInTrainingRoom if isActive then table.insert(playerList, targetPlayer) diff --git a/data/scripts/talkactions/god/manage_kv.lua b/data/scripts/talkactions/god/manage_kv.lua index 6a2f4e6c6b7..d4c7f104c10 100644 --- a/data/scripts/talkactions/god/manage_kv.lua +++ b/data/scripts/talkactions/god/manage_kv.lua @@ -15,18 +15,8 @@ get:register() local set = TalkAction("/setkv") -local function splitFirst(str, delimiter) - local start, finish = string.find(str, delimiter) - if start == nil then - return str, nil - end - local firstPart = string.sub(str, 1, start - 1) - local secondPart = string.sub(str, finish + 1) - return firstPart, secondPart -end - function set.onSay(player, words, param) - local key, value = splitFirst(param, " ") + local key, value = string.splitFirst(param, " ") value = load("return " .. value)() kv.set(key, value) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "kv[" .. key .. "] = " .. PrettyString(value)) @@ -39,7 +29,7 @@ set:register() local bossCooldown = TalkAction("/clearcooldown") function bossCooldown.onSay(player, words, param) - local boss, playerName = splitFirst(param, ",") + local boss, playerName = string.splitFirst(param, ",") if not playerName then playerName = player:getName() end diff --git a/data/scripts/talkactions/god/zones.lua b/data/scripts/talkactions/god/zones.lua index fd2530c6ff8..1eaaf37a098 100644 --- a/data/scripts/talkactions/god/zones.lua +++ b/data/scripts/talkactions/god/zones.lua @@ -10,8 +10,15 @@ function zones.onSay(player, words, param) if cmd == "list" then local list = {} + local filter = params[2] and params[2]:trim() for _, zone in ipairs(Zone.getAll()) do + if filter then + if not zone:getName():lower():find(filter:lower()) then + goto continue + end + end table.insert(list, zone:getName()) + ::continue:: end player:sendTextMessage(MESSAGE_HEALED, "Zones:\n" .. table.concat(list, "\n ")) return true diff --git a/data/scripts/talkactions/player/buy_house.lua b/data/scripts/talkactions/player/buy_house.lua index 1d50956e71b..c3784d81a6b 100644 --- a/data/scripts/talkactions/player/buy_house.lua +++ b/data/scripts/talkactions/player/buy_house.lua @@ -50,6 +50,10 @@ function buyHouse.onSay(player, words, param) player:sendCancelMessage("You do not have enough money.") return true end + metrics.addCounter("balance_decrease", remainsPrice, { + player = player:getName(), + context = "house_purchase", + }) house:setHouseOwner(player:getGuid()) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have successfully bought this house, be sure to have the money for the rent in the bank.") From 6418f13a49f2b7f42f97852d1c3a9747623642e9 Mon Sep 17 00:00:00 2001 From: Luan Santos Date: Sun, 10 Dec 2023 15:23:06 -0800 Subject: [PATCH 17/28] feat: remember 'mount' state per player (#1996) Fixes #1810 --- src/creatures/players/player.cpp | 31 +++++++++++++++++++- src/creatures/players/player.hpp | 1 + src/game/game.cpp | 2 +- src/server/network/protocol/protocolgame.cpp | 4 +-- 4 files changed, 34 insertions(+), 4 deletions(-) diff --git a/src/creatures/players/player.cpp b/src/creatures/players/player.cpp index 45073f9d878..87070d95594 100644 --- a/src/creatures/players/player.cpp +++ b/src/creatures/players/player.cpp @@ -1685,6 +1685,12 @@ void Player::onCreatureAppear(std::shared_ptr creature, bool isLogin) } sendBlessStatus(); } + + if (getCurrentMount() != 0) { + toggleMount(true); + } + + g_game().changePlayerSpeed(static_self_cast(), 0); } } @@ -1717,6 +1723,12 @@ void Player::onChangeZone(ZoneType_t zone) { wasMounted = true; } } else { + int32_t ticks = g_configManager().getNumber(STAIRHOP_DELAY, __FUNCTION__); + if (ticks > 0) { + if (const auto &condition = Condition::createCondition(CONDITIONID_DEFAULT, CONDITION_PACIFIED, ticks, 0)) { + addCondition(condition); + } + } if (wasMounted) { toggleMount(true); wasMounted = false; @@ -4393,6 +4405,7 @@ void Player::onAddCondition(ConditionType_t type) { if (type == CONDITION_OUTFIT && isMounted()) { dismount(); + wasMounted = true; } sendIcons(); @@ -4466,6 +4479,10 @@ void Player::onEndCondition(ConditionType_t type) { } } + if (type == CONDITION_OUTFIT && wasMounted) { + toggleMount(true); + } + sendIcons(); } @@ -5610,6 +5627,14 @@ void Player::sendUnjustifiedPoints() { } } +uint8_t Player::getLastMount() const { + int32_t value = getStorageValue(PSTRG_MOUNTS_CURRENTMOUNT); + if (value > 0) { + return value; + } + return static_cast(kv()->get("last-mount")->get()); +} + uint8_t Player::getCurrentMount() const { int32_t value = getStorageValue(PSTRG_MOUNTS_CURRENTMOUNT); if (value > 0) { @@ -5668,7 +5693,7 @@ bool Player::toggleMount(bool mount) { return false; } - uint8_t currentMountId = getCurrentMount(); + uint8_t currentMountId = getLastMount(); if (currentMountId == 0) { sendOutfitWindow(); return false; @@ -5685,6 +5710,7 @@ bool Player::toggleMount(bool mount) { if (!hasMount(currentMount)) { setCurrentMount(0); + kv()->set("last-mount", 0); sendOutfitWindow(); return false; } @@ -5701,6 +5727,7 @@ bool Player::toggleMount(bool mount) { defaultOutfit.lookMount = currentMount->clientId; setCurrentMount(currentMount->id); + kv()->set("last-mount", currentMount->id); if (currentMount->speed != 0) { g_game().changeSpeed(static_self_cast(), currentMount->speed); @@ -5760,6 +5787,7 @@ bool Player::untameMount(uint8_t mountId) { } setCurrentMount(0); + kv()->set("last-mount", 0); } return true; @@ -5791,6 +5819,7 @@ void Player::dismount() { } defaultOutfit.lookMount = 0; + setCurrentMount(0); } bool Player::addOfflineTrainingTries(skills_t skill, uint64_t tries) { diff --git a/src/creatures/players/player.hpp b/src/creatures/players/player.hpp index 9f6c01252b2..a33c538c814 100644 --- a/src/creatures/players/player.hpp +++ b/src/creatures/players/player.hpp @@ -159,6 +159,7 @@ class Player final : public Creature, public Cylinder, public Bankable { return CREATURETYPE_PLAYER; } + uint8_t getLastMount() const; uint8_t getCurrentMount() const; void setCurrentMount(uint8_t mountId); bool isMounted() const { diff --git a/src/game/game.cpp b/src/game/game.cpp index bc758180bf6..a0028c1aa18 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -5479,7 +5479,7 @@ void Game::playerChangeOutfit(uint32_t playerId, Outfit_t outfit, uint8_t isMoun auto deltaSpeedChange = mount->speed; if (player->isMounted()) { - const auto prevMount = mounts.getMountByID(player->getCurrentMount()); + const auto prevMount = mounts.getMountByID(player->getLastMount()); if (prevMount) { deltaSpeedChange -= prevMount->speed; } diff --git a/src/server/network/protocol/protocolgame.cpp b/src/server/network/protocol/protocolgame.cpp index ad8b728ed05..b0f3c39e573 100644 --- a/src/server/network/protocol/protocolgame.cpp +++ b/src/server/network/protocol/protocolgame.cpp @@ -6411,7 +6411,7 @@ void ProtocolGame::sendOutfitWindow() { if (oldProtocol) { Outfit_t currentOutfit = player->getDefaultOutfit(); - const auto currentMount = g_game().mounts.getMountByID(player->getCurrentMount()); + const auto currentMount = g_game().mounts.getMountByID(player->getLastMount()); if (currentMount) { currentOutfit.lookMount = currentMount->clientId; } @@ -6471,7 +6471,7 @@ void ProtocolGame::sendOutfitWindow() { bool mounted = false; Outfit_t currentOutfit = player->getDefaultOutfit(); - const auto currentMount = g_game().mounts.getMountByID(player->getCurrentMount()); + const auto currentMount = g_game().mounts.getMountByID(player->getLastMount()); if (currentMount) { mounted = (currentOutfit.lookMount == currentMount->clientId); currentOutfit.lookMount = currentMount->clientId; From aea36aebf3094bd6a67e5d90cbc1a046419e27d4 Mon Sep 17 00:00:00 2001 From: Luan Santos Date: Sun, 10 Dec 2023 15:27:36 -0800 Subject: [PATCH 18/28] feat: cobra vizier chain attack (#2012) Fixes #592 --- data-otservbr-global/monster/humans/cobra_assassin.lua | 4 ++-- data-otservbr-global/monster/humans/cobra_vizier.lua | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/data-otservbr-global/monster/humans/cobra_assassin.lua b/data-otservbr-global/monster/humans/cobra_assassin.lua index d5616e5e0b0..a2206a77ad5 100644 --- a/data-otservbr-global/monster/humans/cobra_assassin.lua +++ b/data-otservbr-global/monster/humans/cobra_assassin.lua @@ -91,8 +91,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -450 }, { name = "wave t", interval = 2000, chance = 10, minDamage = -300, maxDamage = -380, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -280, maxDamage = -400, radius = 4, effect = CONST_ME_EXPLOSIONHIT, target = false }, - { name = "combat", interval = 2000, chance = 12, type = COMBAT_PHYSICALDAMAGE, minDamage = -250, maxDamage = -400, length = 5, spread = 3, effect = CONST_ME_BLOCKHIT, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -300, maxDamage = -500, radius = 4, effect = CONST_ME_EXPLOSIONHIT, target = false }, + { name = "combat", interval = 2000, chance = 12, type = COMBAT_PHYSICALDAMAGE, minDamage = -300, maxDamage = -500, length = 5, spread = 0, effect = CONST_ME_BLOCKHIT, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/humans/cobra_vizier.lua b/data-otservbr-global/monster/humans/cobra_vizier.lua index c510c4f4385..c6052ab7829 100644 --- a/data-otservbr-global/monster/humans/cobra_vizier.lua +++ b/data-otservbr-global/monster/humans/cobra_vizier.lua @@ -99,6 +99,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -480 }, { name = "explosion wave", interval = 2000, chance = 15, minDamage = -280, maxDamage = -400, target = false }, { name = "combat", interval = 2000, chance = 12, type = COMBAT_EARTHDAMAGE, minDamage = -350, maxDamage = -520, radius = 4, shootEffect = CONST_ANI_SMALLEARTH, effect = CONST_ME_GREEN_RINGS, target = true }, + { name = "death chain", interval = 4000, chance = 30, minDamage = -550, maxDamage = -800, range = 3, target = true }, } monster.defenses = { From b6d64817d25d7d157bf045bce6bc7ab7988b25c1 Mon Sep 17 00:00:00 2001 From: Luan Santos Date: Sun, 10 Dec 2023 15:31:41 -0800 Subject: [PATCH 19/28] fix: waves that should have been beams (#2013) Fixes #610 I cross checked against wiki for most. But because we're talking about ~300 monsters here it's possible I changed some waves that should've stayed waves. But this is more correct than not and we can go back and fix the missing ones as we find them. --- .../aquatics/deathling_spellsinger.lua | 2 +- .../monster/aquatics/manta_ray.lua | 2 +- .../monster/aquatics/quara_hydromancer.lua | 4 +- .../aquatics/quara_hydromancer_scout.lua | 4 +- .../monster/birds/demon_parrot.lua | 2 +- .../monster/bosses/apocalypse.lua | 2 +- data-otservbr-global/monster/bosses/bazir.lua | 2 +- .../monster/bosses/brain_head.lua | 119 ++++++++++++++++++ .../monster/bosses/gaffir.lua | 2 +- .../monster/bosses/gravelord_oshuran.lua | 4 +- .../monster/bosses/guard_captain_quaid.lua | 4 +- .../monster/bosses/koshei_the_deathless.lua | 2 +- .../monster/bosses/kroazur.lua | 2 +- .../monster/bosses/morshabaal.lua | 4 +- .../monster/bosses/splasher.lua | 4 +- .../monster/bosses/the_abomination.lua | 2 +- .../monster/bosses/the_astral_source.lua | 2 +- .../monster/bosses/the_book_of_death.lua | 2 +- .../monster/bosses/the_brainstealer.lua | 2 +- .../monster/bosses/the_collector.lua | 2 +- data-otservbr-global/monster/bosses/visco.lua | 2 +- .../monster/bosses/weakened_shlorg.lua | 2 +- .../monster/bosses/zarabustor.lua | 2 +- .../monster/bosses/zushuka.lua | 4 +- .../monster/constructs/ice_golem.lua | 2 +- .../monster/constructs/lava_golem.lua | 2 +- .../monster/constructs/magma_crawler.lua | 2 +- .../monster/constructs/metal_gargoyle.lua | 2 +- .../monster/constructs/stone_devourer.lua | 2 +- .../monster/constructs/walker.lua | 2 +- .../monster/constructs/weeper.lua | 4 +- .../monster/demons/askarak_demon.lua | 2 +- .../monster/demons/askarak_lord.lua | 2 +- .../monster/demons/askarak_prince.lua | 2 +- .../monster/demons/dawnfire_asura.lua | 9 +- data-otservbr-global/monster/demons/demon.lua | 2 +- .../monster/demons/demon_outcast.lua | 4 +- .../monster/demons/duskbringer.lua | 4 +- .../monster/demons/floating_savant.lua | 2 +- .../monster/demons/frost_flower_asura.lua | 2 +- data-otservbr-global/monster/demons/fury.lua | 4 +- .../monster/demons/grimeleech.lua | 8 +- .../monster/demons/hellfire_fighter.lua | 2 +- .../monster/demons/hellflayer.lua | 2 +- .../monster/demons/midnight_asura.lua | 13 +- .../monster/demons/shaburak_demon.lua | 2 +- .../monster/demons/shaburak_lord.lua | 2 +- .../monster/demons/shaburak_prince.lua | 2 +- .../monster/demons/true_dawnfire_asura.lua | 2 +- .../demons/true_frost_flower_asura.lua | 4 +- .../monster/demons/true_midnight_asura.lua | 4 +- .../monster/demons/vexclaw.lua | 4 +- .../monster/dragons/frost_dragon.lua | 2 +- .../monster/elementals/cliff_strider.lua | 2 +- .../monster/elementals/earth_elemental.lua | 2 +- .../monster/elementals/foam_stalker.lua | 2 +- .../monster/elementals/ironblight.lua | 4 +- .../monster/elementals/lava_lurker.lua | 4 +- .../elementals/massive_earth_elemental.lua | 2 +- .../elementals/massive_fire_elemental.lua | 2 +- .../monster/elementals/raging_fire.lua | 2 +- .../memory_of_a_frazzlemaw.lua | 2 +- .../memory_creatures/memory_of_a_fungus.lua | 4 +- .../memory_of_a_manticore.lua | 2 +- .../memory_creatures/memory_of_a_shaper.lua | 2 +- .../extra_dimensional/instable_sparkion.lua | 2 +- .../monster/extra_dimensional/sparkion.lua | 2 +- .../monster/extra_dimensional/yielothax.lua | 4 +- .../monster/familiars/druid_familiar.lua | 2 +- .../monster/familiars/sorcerer_familiar.lua | 4 +- .../monster/fey/arctic_faun.lua | 2 +- .../monster/giants/ogre_shaman.lua | 2 +- .../monster/humanoids/broken_shaper.lua | 2 +- .../humanoids/crazed_summer_vanguard.lua | 11 +- .../humanoids/crazed_winter_rearguard.lua | 7 +- .../humanoids/crazed_winter_vanguard.lua | 8 +- .../monster/humanoids/insane_siren.lua | 13 +- .../monster/humanoids/lost_exile.lua | 2 +- .../monster/humanoids/lost_husher.lua | 2 +- .../monster/humanoids/minotaur_amazon.lua | 2 +- .../monster/humanoids/mooh'tah_warrior.lua | 2 +- .../monster/humanoids/moohtant.lua | 2 +- .../humanoids/soul-broken_harbinger.lua | 6 +- .../monster/humanoids/twisted_shaper.lua | 2 +- .../monster/humans/blood_priest.lua | 2 +- .../monster/humans/burning_gladiator.lua | 2 +- .../humans/hardened_usurper_knight.lua | 2 +- .../monster/humans/hulking_carnisylvan.lua | 2 +- .../monster/humans/infernalist.lua | 2 +- .../monster/humans/usurper_knight.lua | 2 +- .../monster/humans/warlock.lua | 2 +- .../monster/lycanthropes/werebadger.lua | 2 +- .../monster/lycanthropes/werefox.lua | 2 +- .../monster/lycanthropes/werehyaena.lua | 2 +- .../lycanthropes/werehyaena_shaman.lua | 2 +- .../monster/magicals/bashmu.lua | 2 +- .../monster/magicals/burning_book.lua | 2 +- .../monster/magicals/choking_fear.lua | 2 +- .../monster/magicals/crypt_warden.lua | 2 +- .../monster/magicals/cursed_book.lua | 2 +- .../monster/magicals/energetic_book.lua | 2 +- .../monster/magicals/feral_sphinx.lua | 8 +- .../monster/magicals/feversleep.lua | 2 +- .../monster/magicals/frazzlemaw.lua | 2 +- .../monster/magicals/gryphon.lua | 2 +- .../monster/magicals/guardian_of_tales.lua | 2 +- .../monster/magicals/guzzlemaw.lua | 4 +- .../monster/magicals/icecold_book.lua | 2 +- .../monster/magicals/juvenile_bashmu.lua | 2 +- .../monster/magicals/manticore.lua | 28 +++-- .../monster/magicals/medusa.lua | 2 +- .../monster/magicals/menacing_carnivor.lua | 4 +- .../monster/magicals/rage_squid.lua | 2 +- .../monster/magicals/retching_horror.lua | 2 +- .../monster/magicals/shiversleep.lua | 2 +- .../monster/magicals/shock_head.lua | 2 +- .../monster/magicals/sight_of_surrender.lua | 2 +- .../monster/magicals/sphinx.lua | 6 +- .../monster/magicals/terrorsleep.lua | 2 +- .../monster/magicals/thanatursus.lua | 2 +- .../monster/magicals/venerable_girtablilu.lua | 2 +- .../monster/magicals/weakened_frazzlemaw.lua | 2 +- .../monster/mammals/doom_deer.lua | 2 +- .../monster/mammals/gore_horn.lua | 2 +- .../monster/mammals/vulcongra.lua | 2 +- data-otservbr-global/monster/mammals/yeti.lua | 2 +- .../monster/plants/haunted_treeling.lua | 2 +- .../monster/plants/hideous_fungus.lua | 2 +- .../monster/plants/humongous_fungus.lua | 4 +- .../monster/plants/omnivora.lua | 2 +- .../ratmiral_blackwhiskers.lua | 2 +- .../quests/annihilator/angry_demon.lua | 17 ++- .../bigfoots_burden/minion_of_versperoth.lua | 4 +- .../cults_of_tibia/animated_guzzlemaw.lua | 4 +- .../cults_of_tibia/animated_moohtant.lua | 2 +- .../bosses/essence_of_malice.lua | 2 +- .../bosses/the_corruptor_of_souls.lua | 4 +- .../bosses/the_remorseless_corruptor.lua | 6 +- .../bosses/the_souldespoiler.lua | 2 +- .../dangerous_depth/aggressive_matter.lua | 2 +- .../bosses/the_count_of_the_core.lua | 10 +- .../feaster_of_souls/irgix_the_flimsy.lua | 2 +- .../quests/feaster_of_souls/unaz_the_mean.lua | 2 +- .../feaster_of_souls/vok_the_freakish.lua | 2 +- .../bosses/destabilized_ferumbras.lua | 2 +- .../bosses/ferumbras_mortal_shell.lua | 2 +- .../bosses/ferumbras_soul_splinter.lua | 2 +- .../ferumbras_ascendant/disgusting_ooze.lua | 2 +- .../lovely/lovely_frazzlemaw.lua | 2 +- .../lovely/lovely_yielothax.lua | 4 +- .../summons/enthralled_demon.lua | 2 +- .../forgotten_knowledge/animated_sword.lua | 2 +- .../bosses/lady_tenebris.lua | 2 +- .../forgotten_knowledge/bosses/lloyd.lua | 2 +- .../bosses/mounted_thorn_knight.lua | 6 +- .../bosses/the_blazing_time_guardian.lua | 6 +- .../bosses/the_enraged_thorn_knight.lua | 6 +- .../bosses/the_freezing_time_guardian.lua | 6 +- .../bosses/the_last_lore_keeper.lua | 6 +- .../bosses/the_shielded_thorn_knight.lua | 6 +- .../bosses/the_time_guardian.lua | 6 +- .../sword_of_vengeance.lua | 2 +- .../the_distorted_astral_source.lua | 2 +- .../forgotten_knowledge/thorn_minion.lua | 2 +- .../forgotten_knowledge/unbound_demon.lua | 2 +- .../unbound_demon_outcast.lua | 4 +- .../grave_danger/bosses/count_vlarkorth.lua | 4 +- .../quests/grave_danger/bosses/duke_krule.lua | 4 +- .../quests/grave_danger/bosses/earl_osam.lua | 2 +- .../quests/grave_danger/bosses/king_zelos.lua | 4 +- .../grave_danger/bosses/lord_azaram.lua | 2 +- .../quests/grave_danger/bosses/sir_baeloc.lua | 2 +- .../grave_danger/bosses/sir_nictros.lua | 2 +- .../quests/grave_danger/shard_of_magnor.lua | 4 +- .../quests/grave_danger/vampiric_blood.lua | 4 +- .../heart_of_destruction/aftershock.lua | 2 +- .../quests/heart_of_destruction/anomaly.lua | 4 +- .../heart_of_destruction/charged_anomaly.lua | 4 +- .../charging_outburst.lua | 2 +- .../depolarized_crackler.lua | 2 +- .../heart_of_destruction/eradicator.lua | 4 +- .../heart_of_destruction/eradicator2.lua | 2 +- .../quests/heart_of_destruction/foreshock.lua | 6 +- .../quests/heart_of_destruction/greed.lua | 2 +- .../quests/heart_of_destruction/outburst.lua | 4 +- .../heart_of_destruction/overcharge.lua | 2 +- .../heart_of_destruction/realityquake.lua | 4 +- .../quests/heart_of_destruction/rupture.lua | 4 +- .../heart_of_destruction/the_destruction.lua | 6 +- .../heart_of_destruction/the_hunger.lua | 4 +- .../quests/heart_of_destruction/the_rage.lua | 4 +- .../heart_of_destruction/unstable_spark.lua | 2 +- .../heart_of_destruction/world_devourer.lua | 4 +- .../quests/hero_of_rathleton/deep_terror.lua | 2 +- .../hero_of_rathleton/glooth_horror.lua | 2 +- .../hero_of_rathleton/professor_maxxen.lua | 4 +- .../weakened_glooth_horror.lua | 2 +- .../quests/in_service_of_yalahar/azerus.lua | 2 +- .../quests/in_service_of_yalahar/azerus2.lua | 2 +- .../in_service_of_yalahar/rift_scythe.lua | 4 +- .../killing_in_the_name_of/bruise_payne.lua | 2 +- .../quests/kilmaresh/amenef_the_burning.lua | 2 +- .../reflection_of_mawhawk.lua | 2 +- .../primal_ordeal_quest/the_end_of_days.lua | 2 +- .../monster/quests/roshamuul/horadron.lua | 4 +- .../monster/quests/roshamuul/terofar.lua | 2 +- .../quests/soul_war/aspect_of_power.lua | 2 +- .../quests/soul_war/dreadful_harvester.lua | 4 +- .../quests/soul_war/goshnars_cruelty.lua | 2 +- .../quests/soul_war/goshnars_hatred.lua | 2 +- .../quests/soul_war/goshnars_megalomania.lua | 4 +- .../quests/soul_war/goshnars_spite.lua | 4 +- .../monster/quests/soul_war/hateful_soul.lua | 2 +- .../quests/soul_war/malicious_soul.lua | 2 +- .../warlord/fallen_mooh'tah_master_ghar.lua | 4 +- .../warlord/the_obliverator.lua | 2 +- .../quests/the_curse_spreads/black_vixen.lua | 2 +- .../quests/the_curse_spreads/bloodback.lua | 2 +- .../quests/the_curse_spreads/sharpclaw.lua | 2 +- .../the_dream_courts/bosses/alptramun.lua | 6 +- .../bosses/izcandar_the_banished.lua | 4 +- .../the_dream_courts/bosses/plagueroot.lua | 4 +- .../the_dream_courts/mind-wrecking_dream.lua | 4 +- .../the_dream_courts/plant_abomination.lua | 2 +- .../blistering_fire_elemental.lua | 2 +- .../the_elemental_spheres/earth_overlord.lua | 2 +- .../the_elemental_spheres/energy_overlord.lua | 2 +- .../the_elemental_spheres/fire_overlord.lua | 2 +- .../jagged_earth_elemental.lua | 2 +- .../muddy_earth_elemental.lua | 2 +- .../quests/the_inquisition/ungreez.lua | 2 +- .../bosses/ancient_lion_knight.lua | 4 +- .../quests/the_order_of_lion/bosses/drume.lua | 10 +- .../quests/the_order_of_lion/bosses/kesar.lua | 4 +- .../the_order_of_lion/usurper_commander.lua | 2 +- .../the_percht_queens_island/bonny_bunny.lua | 2 +- .../the_percht_queens_island/percht.lua | 4 +- .../the_percht_queens_island/schiach.lua | 4 +- .../quests/the_secret_library/biting_cold.lua | 2 +- .../quests/the_secret_library/bone_jaw.lua | 2 +- .../the_secret_library/bosses/ghulosh.lua | 4 +- .../bosses/grand_canon_dominus.lua | 2 +- .../bosses/grand_chaplain_gaunder.lua | 2 +- .../bosses/grand_commander_soeren.lua | 2 +- .../bosses/thawing_dragon_lord.lua | 2 +- .../bosses/the_scourge_of_oblivion.lua | 4 +- .../the_secret_library/brother_chill.lua | 2 +- .../the_secret_library/brother_freeze.lua | 2 +- .../the_secret_library/concentrated_death.lua | 2 +- .../the_secret_library/dazed_leaf_golem.lua | 2 +- .../quests/the_secret_library/demon_blood.lua | 2 +- .../quests/the_secret_library/demon_slave.lua | 2 +- .../the_secret_library/furious_scorpion.lua | 2 +- .../the_secret_library/imp_intruder.lua | 2 +- .../the_secret_library/invading_demon.lua | 2 +- .../quests/the_secret_library/jailer.lua | 2 +- .../quests/the_secret_library/librarian.lua | 2 +- .../the_secret_library/malicious_minion.lua | 2 +- .../quests/the_secret_library/mazzinor.lua | 4 +- .../quests/the_secret_library/mean_minion.lua | 2 +- .../ravenous_beyondling.lua | 2 +- .../the_secret_library/rift_breacher.lua | 2 +- .../quests/the_secret_library/rift_minion.lua | 2 +- .../quests/the_secret_library/rift_spawn.lua | 2 +- .../the_secret_library/spawn_of_havoc.lua | 2 +- .../stolen_knowledge_of_armor.lua | 2 +- .../stolen_knowledge_of_healing.lua | 2 +- .../stolen_knowledge_of_lifesteal.lua | 2 +- .../stolen_knowledge_of_spells.lua | 2 +- .../stolen_knowledge_of_summoning.lua | 2 +- .../the_secret_library/the_blazing_rose.lua | 2 +- .../the_book_of_secrets.lua | 2 +- .../the_devourer_of_secrets.lua | 2 +- .../the_diamond_blossom.lua | 2 +- .../the_secret_library/the_lily_of_night.lua | 2 +- .../the_secret_library/the_scion_of_havoc.lua | 2 +- .../the_secret_library/the_spellstealer.lua | 2 +- .../quests/the_secret_library/war_servant.lua | 2 +- .../the_secret_library/yalahari_despoiler.lua | 2 +- .../monster/raids/ferumbras.lua | 2 +- .../monster/raids/furyosa.lua | 6 +- .../monster/raids/ghazbaran.lua | 2 +- .../monster/raids/glooth_bomb.lua | 2 +- .../monster/raids/mawhawk.lua | 2 +- .../monster/reptiles/carnivostrich.lua | 12 +- .../monster/reptiles/young_goanna.lua | 6 +- .../monster/slimes/devourer.lua | 2 +- data-otservbr-global/monster/undeads/ahau.lua | 2 +- .../monster/undeads/bonebeast.lua | 2 +- .../monster/undeads/cursed_prospector.lua | 2 +- .../monster/undeads/evil_prospector.lua | 2 +- .../monster/undeads/falcon_knight.lua | 2 +- .../monster/undeads/falcon_paladin.lua | 2 +- .../monster/undeads/flimsy_lost_soul.lua | 2 +- .../monster/undeads/freakish_lost_soul.lua | 2 +- .../monster/undeads/grim_reaper.lua | 4 +- .../monster/undeads/iks_aucar.lua | 2 +- .../monster/undeads/iks_churrascan.lua | 2 +- .../monster/undeads/iks_pututu.lua | 2 +- data-otservbr-global/monster/undeads/lich.lua | 4 +- .../monster/undeads/lost_soul.lua | 2 +- .../monster/undeads/mean_lost_soul.lua | 2 +- .../monster/undeads/rot_elemental.lua | 2 +- .../monster/vermins/eyeless_devourer.lua | 2 +- .../monster/vermins/lavafungus.lua | 2 +- .../monster/vermins/tremendous_tyrant.lua | 2 +- 306 files changed, 589 insertions(+), 448 deletions(-) create mode 100644 data-otservbr-global/monster/bosses/brain_head.lua diff --git a/data-otservbr-global/monster/aquatics/deathling_spellsinger.lua b/data-otservbr-global/monster/aquatics/deathling_spellsinger.lua index d28ad9e1d5f..4324562c839 100644 --- a/data-otservbr-global/monster/aquatics/deathling_spellsinger.lua +++ b/data-otservbr-global/monster/aquatics/deathling_spellsinger.lua @@ -102,7 +102,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -300, effect = CONST_ME_DRAWBLOOD }, { name = "combat", interval = 4000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -400, range = 5, shootEffect = CONST_ANI_HUNTINGSPEAR, target = false }, { name = "combat", interval = 4000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -150, maxDamage = -300, range = 5, shootEffect = CONST_ANI_LARGEROCK, target = false }, - { name = "combat", interval = 2000, chance = 14, type = COMBAT_HOLYDAMAGE, minDamage = -400, maxDamage = -700, length = 8, spread = 3, effect = CONST_ME_BLOCKHIT, target = false }, + { name = "combat", interval = 2000, chance = 14, type = COMBAT_HOLYDAMAGE, minDamage = -400, maxDamage = -700, length = 8, spread = 1, effect = CONST_ME_HOLYAREA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/aquatics/manta_ray.lua b/data-otservbr-global/monster/aquatics/manta_ray.lua index 9dace51e40a..91254f37483 100644 --- a/data-otservbr-global/monster/aquatics/manta_ray.lua +++ b/data-otservbr-global/monster/aquatics/manta_ray.lua @@ -80,7 +80,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -110, effect = CONST_ME_DRAWBLOOD, condition = { type = CONDITION_POISON, totalDamage = 120, interval = 4000 } }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -75, maxDamage = -90, range = 7, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_ENERGYHIT, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -50, maxDamage = -110, length = 4, spread = 3, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -50, maxDamage = -110, length = 4, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/aquatics/quara_hydromancer.lua b/data-otservbr-global/monster/aquatics/quara_hydromancer.lua index 83d0b76ca8e..bcfff1bb973 100644 --- a/data-otservbr-global/monster/aquatics/quara_hydromancer.lua +++ b/data-otservbr-global/monster/aquatics/quara_hydromancer.lua @@ -95,9 +95,9 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -80, effect = CONST_ME_DRAWBLOOD, condition = { type = CONDITION_POISON, totalDamage = 100, interval = 4000 } }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -180, length = 8, spread = 3, effect = CONST_ME_BUBBLES, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -180, length = 8, spread = 1, effect = CONST_ME_BUBBLES, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_ICEDAMAGE, minDamage = -90, maxDamage = -150, radius = 3, effect = CONST_ME_BUBBLES, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -170, maxDamage = -240, length = 8, spread = 3, effect = CONST_ME_HITBYPOISON, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -170, maxDamage = -240, length = 8, spread = 1, effect = CONST_ME_HITBYPOISON, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -170, range = 7, effect = CONST_ME_MAGIC_RED, target = true }, { name = "speed", interval = 2000, chance = 15, speedChange = -600, range = 7, effect = CONST_ME_MAGIC_RED, target = false, duration = 15000 }, } diff --git a/data-otservbr-global/monster/aquatics/quara_hydromancer_scout.lua b/data-otservbr-global/monster/aquatics/quara_hydromancer_scout.lua index 7e67e0bab45..b3ced121354 100644 --- a/data-otservbr-global/monster/aquatics/quara_hydromancer_scout.lua +++ b/data-otservbr-global/monster/aquatics/quara_hydromancer_scout.lua @@ -96,9 +96,9 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -80, effect = CONST_ME_DRAWBLOOD, condition = { type = CONDITION_POISON, totalDamage = 100, interval = 4000 } }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -180, length = 8, spread = 3, effect = CONST_ME_HITBYPOISON, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -180, length = 8, spread = 1, effect = CONST_ME_HITBYPOISON, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_ICEDAMAGE, minDamage = -90, maxDamage = -150, radius = 3, effect = CONST_ME_BUBBLES, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -170, maxDamage = -240, length = 8, spread = 3, effect = CONST_ME_BUBBLES, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -170, maxDamage = -240, length = 8, spread = 1, effect = CONST_ME_BUBBLES, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -170, range = 7, effect = CONST_ME_MAGIC_RED, target = true }, { name = "speed", interval = 2000, chance = 15, speedChange = -600, range = 7, effect = CONST_ME_MAGIC_RED, target = false, duration = 15000 }, } diff --git a/data-otservbr-global/monster/birds/demon_parrot.lua b/data-otservbr-global/monster/birds/demon_parrot.lua index a606e4efe18..16490049cb8 100644 --- a/data-otservbr-global/monster/birds/demon_parrot.lua +++ b/data-otservbr-global/monster/birds/demon_parrot.lua @@ -83,7 +83,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 1200, chance = 100, minDamage = 0, maxDamage = -100 }, - { name = "drunk", interval = 1000, chance = 30, length = 5, spread = 3, effect = CONST_ME_SOUND_RED, target = false }, + { name = "drunk", interval = 1000, chance = 30, length = 5, spread = 1, effect = CONST_ME_SOUND_RED, target = false }, { name = "combat", interval = 1000, chance = 30, type = COMBAT_LIFEDRAIN, minDamage = -25, maxDamage = -45, range = 5, shootEffect = CONST_ANI_SUDDENDEATH, target = false }, { name = "combat", interval = 1000, chance = 30, type = COMBAT_LIFEDRAIN, minDamage = -15, maxDamage = -45, range = 1, target = false }, } diff --git a/data-otservbr-global/monster/bosses/apocalypse.lua b/data-otservbr-global/monster/bosses/apocalypse.lua index 77ad2d660c4..dd126524c83 100644 --- a/data-otservbr-global/monster/bosses/apocalypse.lua +++ b/data-otservbr-global/monster/bosses/apocalypse.lua @@ -110,7 +110,7 @@ monster.attacks = { { name = "strength", interval = 1000, chance = 10, minDamage = -600, maxDamage = -1450, radius = 5, effect = CONST_ME_HITAREA, target = false }, { name = "combat", interval = 3000, chance = 13, type = COMBAT_FIREDAMAGE, minDamage = -300, maxDamage = -800, range = 7, radius = 7, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true }, { name = "combat", interval = 3000, chance = 8, type = COMBAT_MANADRAIN, minDamage = -600, maxDamage = -700, radius = 10, effect = CONST_ME_ENERGYAREA, target = false }, - { name = "combat", interval = 2000, chance = 9, type = COMBAT_ENERGYDAMAGE, minDamage = -400, maxDamage = -800, length = 8, spread = 3, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 9, type = COMBAT_ENERGYDAMAGE, minDamage = -400, maxDamage = -800, length = 8, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, -- poison { name = "condition", type = CONDITION_POISON, interval = 5000, chance = 18, minDamage = -800, maxDamage = -1000, effect = CONST_ME_HITBYPOISON, target = false }, { name = "combat", interval = 2000, chance = 6, type = COMBAT_LIFEDRAIN, minDamage = -600, maxDamage = -1200, radius = 14, effect = CONST_ME_MAGIC_GREEN, target = false }, diff --git a/data-otservbr-global/monster/bosses/bazir.lua b/data-otservbr-global/monster/bosses/bazir.lua index 5fc46367c42..dc0f8a4d326 100644 --- a/data-otservbr-global/monster/bosses/bazir.lua +++ b/data-otservbr-global/monster/bosses/bazir.lua @@ -145,7 +145,7 @@ monster.attacks = { { name = "outfit", interval = 1000, chance = 2, radius = 8, effect = CONST_ME_LOSEENERGY, target = false, duration = 5000, outfitMonster = "demon" }, { name = "outfit", interval = 1000, chance = 2, radius = 8, effect = CONST_ME_LOSEENERGY, target = false, duration = 5000, outfitItem = 3058 }, { name = "combat", interval = 1000, chance = 34, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -900, range = 7, radius = 7, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true }, - { name = "combat", interval = 1000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -500, maxDamage = -850, length = 8, spread = 3, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 1000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -500, maxDamage = -850, length = 8, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/bosses/brain_head.lua b/data-otservbr-global/monster/bosses/brain_head.lua new file mode 100644 index 00000000000..b070aba7140 --- /dev/null +++ b/data-otservbr-global/monster/bosses/brain_head.lua @@ -0,0 +1,119 @@ +local mType = Game.createMonsterType("Brain Head") +local monster = {} + +monster.description = "Brain Head" +monster.experience = 0 +monster.outfit = { + lookTypeEx = 32418, +} + +monster.health = 75000 +monster.maxHealth = monster.health +monster.race = "undead" +monster.corpse = 32272 +monster.speed = 0 + +monster.changeTarget = { + interval = 4000, + chance = 10, +} + +monster.bosstiary = { + bossRaceId = 1862, + bossRace = RARITY_ARCHFOE, +} + +monster.flags = { + summonable = false, + attackable = true, + hostile = true, + convinceable = false, + pushable = false, + rewardBoss = true, + illusionable = false, + canPushItems = true, + canPushCreatures = true, + staticAttackChance = 90, + targetDistance = 1, + runHealth = 0, + healthHidden = false, + canWalkOnEnergy = true, + canWalkOnFire = true, + canWalkOnPoison = true, +} + +monster.loot = { + { name = "crystal coin", chance = 96300, maxCount = 3 }, + { name = "diamond", chance = 55560, maxCount = 2 }, + { name = "ultimate mana potion", chance = 51850, maxCount = 6 }, + { name = "white gem", chance = 51850, maxCount = 2 }, + { name = "supreme health potion", chance = 29630 }, + { name = "mastermind potion", chance = 22220 }, + { name = "cursed bone", chance = 22220 }, + { name = "berserk potion", chance = 18520 }, + { name = "death toll", chance = 18520, maxCount = 2 }, + { name = "ivory comb", chance = 18520 }, + { name = "bullseye potion", chance = 14810, maxCount = 10 }, + { name = "ultimate spirit potion", chance = 14810, maxCount = 6 }, + { name = "moonstone", chance = 14810 }, + { name = "spooky hood", chance = 8520 }, + { name = "silver hand mirror", chance = 7410 }, + { name = "amber with a dragonfly", chance = 7410 }, + { name = "phantasmal axe", chance = 3700 }, + { name = "ghost claw", chance = 3700 }, + { name = "giant amethyst", chance = 3700 }, + { id = 32621, chance = 3200 }, -- ring of souls +} + +monster.attacks = { + { name = "combat", type = COMBAT_DEATHDAMAGE, interval = 2000, chance = 80, minDamage = -700, maxDamage = -1200, effect = CONST_ME_MORTAREA, shootEffect = CONST_ANI_SUDDENDEATH, target = true, range = 7 }, + { name = "combat", type = COMBAT_LIFEDRAIN, interval = 2000, chance = 20, length = 8, spread = 1, minDamage = -900, maxDamage = -1300, effect = CONST_ME_ELECTRICALSPARK }, +} + +monster.defenses = { + defense = 78, + armor = 78, + mitigation = 3.27, +} + +monster.elements = { + { type = COMBAT_PHYSICALDAMAGE, percent = 0 }, + { type = COMBAT_ENERGYDAMAGE, percent = 0 }, + { type = COMBAT_EARTHDAMAGE, percent = 0 }, + { type = COMBAT_FIREDAMAGE, percent = 0 }, + { type = COMBAT_LIFEDRAIN, percent = 0 }, + { type = COMBAT_MANADRAIN, percent = 0 }, + { type = COMBAT_DROWNDAMAGE, percent = 0 }, + { type = COMBAT_ICEDAMAGE, percent = -30 }, + { type = COMBAT_HOLYDAMAGE, percent = 0 }, + { type = COMBAT_DEATHDAMAGE, percent = 0 }, +} + +monster.immunities = { + { type = "paralyze", condition = true }, + { type = "invisible", condition = true }, +} + +monster.voices = { + interval = 5000, + chance = 10, + { text = "Feel the power of death unleashed!", yell = false }, + { text = "I will rule again and my realm of death will span the world!", yell = false }, + { text = "My lich-knights will conquer this world for me!", yell = false }, +} + +mType.onThink = function(monster, interval) end + +mType.onAppear = function(monster, creature) + if monster:getType():isRewardBoss() then + monster:setReward(true) + end +end + +mType.onDisappear = function(monster, creature) end + +mType.onMove = function(monster, creature, fromPosition, toPosition) end + +mType.onSay = function(monster, creature, type, message) end + +mType:register(monster) diff --git a/data-otservbr-global/monster/bosses/gaffir.lua b/data-otservbr-global/monster/bosses/gaffir.lua index 3370cb9b08b..9eab5e3466c 100644 --- a/data-otservbr-global/monster/bosses/gaffir.lua +++ b/data-otservbr-global/monster/bosses/gaffir.lua @@ -109,7 +109,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -550 }, { name = "combat", interval = 2000, chance = 8, type = COMBAT_PHYSICALDAMAGE, minDamage = -450, maxDamage = -650, radius = 3, effect = CONST_ME_GROUNDSHAKER, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -400, maxDamage = -580, length = 5, spread = 3, effect = CONST_ME_EXPLOSIONHIT, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -400, maxDamage = -580, length = 5, spread = 1, effect = CONST_ME_EXPLOSIONHIT, target = false }, { name = "combat", interval = 3000, chance = 14, type = COMBAT_FIREDAMAGE, minDamage = -500, maxDamage = -750, shootEffect = CONST_ANI_FIRE, target = true }, { name = "combat", interval = 2000, chance = 16, type = COMBAT_EARTHDAMAGE, minDamage = -500, maxDamage = -620, radius = 4, shootEffect = CONST_ANI_EARTH, effect = CONST_ME_GREEN_RINGS, target = true }, { name = "combat", interval = 3000, chance = 12, type = COMBAT_EARTHDAMAGE, minDamage = -320, maxDamage = -500, radius = 2, effect = CONST_ME_GREEN_RINGS, target = false }, diff --git a/data-otservbr-global/monster/bosses/gravelord_oshuran.lua b/data-otservbr-global/monster/bosses/gravelord_oshuran.lua index fd5abe25a3f..a03db9c4b1b 100644 --- a/data-otservbr-global/monster/bosses/gravelord_oshuran.lua +++ b/data-otservbr-global/monster/bosses/gravelord_oshuran.lua @@ -90,8 +90,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -250 }, { name = "speed", interval = 2000, chance = 25, speedChange = -300, range = 7, effect = CONST_ME_MAGIC_RED, target = false, duration = 30000 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -180, maxDamage = -300, length = 7, spread = 3, effect = CONST_ME_MAGIC_RED, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -100, maxDamage = -350, length = 7, spread = 3, effect = CONST_ME_HITBYPOISON, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -180, maxDamage = -300, length = 7, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -100, maxDamage = -350, length = 7, spread = 1, effect = CONST_ME_HITBYPOISON, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -200, maxDamage = -245, range = 1, effect = CONST_ME_MAGIC_RED, target = true }, } diff --git a/data-otservbr-global/monster/bosses/guard_captain_quaid.lua b/data-otservbr-global/monster/bosses/guard_captain_quaid.lua index e712117a732..e9a4dd322da 100644 --- a/data-otservbr-global/monster/bosses/guard_captain_quaid.lua +++ b/data-otservbr-global/monster/bosses/guard_captain_quaid.lua @@ -94,9 +94,9 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -580 }, { name = "combat", interval = 2000, chance = 18, type = COMBAT_EARTHDAMAGE, minDamage = -500, maxDamage = -620, radius = 4, shootEffect = CONST_ANI_EARTH, effect = CONST_ME_GREEN_RINGS, target = true }, { name = "combat", interval = 2000, chance = 22, type = COMBAT_PHYSICALDAMAGE, minDamage = -450, maxDamage = -700, shootEffect = CONST_ANI_THROWINGKNIFE, target = true }, - { name = "combat", interval = 2000, chance = 14, type = COMBAT_PHYSICALDAMAGE, minDamage = -350, maxDamage = -550, length = 5, spread = 3, effect = CONST_ME_EXPLOSIONHIT, target = false }, + { name = "combat", interval = 2000, chance = 14, type = COMBAT_PHYSICALDAMAGE, minDamage = -350, maxDamage = -550, length = 5, spread = 1, effect = CONST_ME_EXPLOSIONHIT, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -400, maxDamage = -550, radius = 1, shootEffect = CONST_ANI_BURSTARROW, effect = CONST_ME_FIREAREA, target = true }, - { name = "combat", interval = 2000, chance = 12, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -480, length = 5, spread = 3, effect = CONST_ME_EXPLOSIONHIT, target = false }, + { name = "combat", interval = 2000, chance = 12, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -480, length = 5, spread = 1, effect = CONST_ME_EXPLOSIONHIT, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -450, radius = 3, effect = CONST_ME_GREEN_RINGS, target = false }, } diff --git a/data-otservbr-global/monster/bosses/koshei_the_deathless.lua b/data-otservbr-global/monster/bosses/koshei_the_deathless.lua index 5ad88a01c71..660a10942da 100644 --- a/data-otservbr-global/monster/bosses/koshei_the_deathless.lua +++ b/data-otservbr-global/monster/bosses/koshei_the_deathless.lua @@ -83,7 +83,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -170, condition = { type = CONDITION_POISON, totalDamage = 300, interval = 4000 } }, { name = "combat", interval = 3000, chance = 9, type = COMBAT_LIFEDRAIN, minDamage = -60, maxDamage = -250, range = 1, effect = CONST_ME_MAGIC_BLUE, target = false }, { name = "combat", interval = 1000, chance = 11, type = COMBAT_LIFEDRAIN, minDamage = -70, maxDamage = -135, radius = 3, effect = CONST_ME_MAGIC_RED, target = false }, - { name = "combat", interval = 2000, chance = 9, type = COMBAT_DEATHDAMAGE, minDamage = -50, maxDamage = -140, length = 8, spread = 3, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 9, type = COMBAT_DEATHDAMAGE, minDamage = -50, maxDamage = -140, length = 8, spread = 1, effect = CONST_ME_MORTAREA, target = false }, -- curse { name = "condition", type = CONDITION_CURSED, interval = 3000, chance = 15, minDamage = -54, maxDamage = -54, range = 1, target = false }, { name = "speed", interval = 2000, chance = 15, speedChange = -900, range = 7, effect = CONST_ME_MAGIC_RED, target = false, duration = 30000 }, diff --git a/data-otservbr-global/monster/bosses/kroazur.lua b/data-otservbr-global/monster/bosses/kroazur.lua index 14740f8f522..478bc61bc8d 100644 --- a/data-otservbr-global/monster/bosses/kroazur.lua +++ b/data-otservbr-global/monster/bosses/kroazur.lua @@ -95,7 +95,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 200, chance = 20, minDamage = 0, maxDamage = -650 }, { name = "combat", interval = 200, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -500, target = false }, - { name = "combat", interval = 500, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -200, maxDamage = -300, length = 8, spread = 3, effect = CONST_ME_MORTAREA, target = true }, + { name = "combat", interval = 500, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -200, maxDamage = -300, length = 8, spread = 1, effect = CONST_ME_MORTAREA, target = true }, { name = "combat", interval = 500, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -250, maxDamage = -300, radius = 8, effect = CONST_ME_MORTAREA, target = false }, } diff --git a/data-otservbr-global/monster/bosses/morshabaal.lua b/data-otservbr-global/monster/bosses/morshabaal.lua index b177e932c65..c3e2da38cf8 100644 --- a/data-otservbr-global/monster/bosses/morshabaal.lua +++ b/data-otservbr-global/monster/bosses/morshabaal.lua @@ -97,7 +97,7 @@ monster.loot = { } monster.attacks = { - { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -5500, length = 8, spread = 0, effect = CONST_ME_GREYCHAIN }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -5500, length = 8, spread = 1, effect = CONST_ME_GREYCHAIN }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_ICEDAMAGE, minDamage = -4000, maxDamage = -30000, effect = CONST_ME_ICEATTACK }, { name = "melee", interval = 2000, chance = 100, skill = 200, attack = 250 }, { name = "combat", interval = 1000, chance = 7, type = COMBAT_MANADRAIN, minDamage = -100, maxDamage = -1000, range = 7, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_POFF, target = false }, @@ -110,7 +110,7 @@ monster.attacks = { { name = "outfit", interval = 1000, chance = 2, radius = 8, effect = CONST_ME_LOSEENERGY, target = false, duration = 5000, outfitMonster = "demon" }, { name = "outfit", interval = 1000, chance = 2, radius = 8, effect = CONST_ME_LOSEENERGY, target = false, duration = 5000, outfitItem = 3058 }, { name = "combat", interval = 1000, chance = 34, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -900, range = 7, radius = 7, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true }, - { name = "combat", interval = 1000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -500, maxDamage = -850, length = 8, spread = 3, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 1000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -500, maxDamage = -850, length = 8, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/bosses/splasher.lua b/data-otservbr-global/monster/bosses/splasher.lua index b579d921327..570575b09f1 100644 --- a/data-otservbr-global/monster/bosses/splasher.lua +++ b/data-otservbr-global/monster/bosses/splasher.lua @@ -77,8 +77,8 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -109, condition = { type = CONDITION_POISON, totalDamage = 5, interval = 4000 } }, { name = "combat", interval = 2000, chance = 8, type = COMBAT_LIFEDRAIN, minDamage = -106, maxDamage = -169, range = 7, effect = CONST_ME_MAGIC_RED, target = true }, - { name = "combat", interval = 2000, chance = 7, type = COMBAT_LIFEDRAIN, minDamage = -162, maxDamage = -228, length = 8, spread = 3, effect = CONST_ME_HITBYPOISON, target = false }, - { name = "combat", interval = 2000, chance = 9, type = COMBAT_ICEDAMAGE, minDamage = -134, maxDamage = -148, length = 8, spread = 3, effect = CONST_ME_BUBBLES, target = false }, + { name = "combat", interval = 2000, chance = 7, type = COMBAT_LIFEDRAIN, minDamage = -162, maxDamage = -228, length = 8, spread = 1, effect = CONST_ME_HITBYPOISON, target = false }, + { name = "combat", interval = 2000, chance = 9, type = COMBAT_ICEDAMAGE, minDamage = -134, maxDamage = -148, length = 8, spread = 1, effect = CONST_ME_BUBBLES, target = false }, { name = "combat", interval = 2000, chance = 12, type = COMBAT_ICEDAMAGE, minDamage = -101, maxDamage = -149, radius = 3, effect = CONST_ME_BUBBLES, target = false }, { name = "speed", interval = 2000, chance = 20, speedChange = -300, range = 1, effect = CONST_ME_MAGIC_RED, target = false, duration = 3000 }, } diff --git a/data-otservbr-global/monster/bosses/the_abomination.lua b/data-otservbr-global/monster/bosses/the_abomination.lua index 54df2943528..1195b6ba10e 100644 --- a/data-otservbr-global/monster/bosses/the_abomination.lua +++ b/data-otservbr-global/monster/bosses/the_abomination.lua @@ -95,7 +95,7 @@ monster.attacks = { { name = "speed", interval = 1000, chance = 12, speedChange = -800, radius = 6, effect = CONST_ME_POISONAREA, target = false, duration = 10000 }, { name = "combat", interval = 1000, chance = 9, type = COMBAT_EARTHDAMAGE, minDamage = -200, maxDamage = -650, radius = 4, effect = CONST_ME_POISONAREA, target = false }, { name = "combat", interval = 1000, chance = 11, type = COMBAT_LIFEDRAIN, minDamage = -400, maxDamage = -900, radius = 4, shootEffect = CONST_ANI_POISON, effect = CONST_ME_SOUND_GREEN, target = true }, - { name = "combat", interval = 2000, chance = 19, type = COMBAT_PHYSICALDAMAGE, minDamage = -350, maxDamage = -850, length = 7, spread = 3, shootEffect = CONST_ANI_POISON, target = false }, + { name = "combat", interval = 2000, chance = 19, type = COMBAT_PHYSICALDAMAGE, minDamage = -350, maxDamage = -850, length = 7, spread = 1, shootEffect = CONST_ANI_POISON, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/bosses/the_astral_source.lua b/data-otservbr-global/monster/bosses/the_astral_source.lua index 6be4ef6fba7..8a8e02dcac9 100644 --- a/data-otservbr-global/monster/bosses/the_astral_source.lua +++ b/data-otservbr-global/monster/bosses/the_astral_source.lua @@ -66,7 +66,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -330 }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -500, range = 7, radius = 6, shootEffect = CONST_ANI_ENERGYBALL, effect = CONST_ME_PURPLEENERGY, target = true }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -500, range = 7, radius = 6, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_ENERGYHIT, target = true }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -400, length = 5, spread = 3, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -400, length = 5, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_MANADRAIN, minDamage = -200, maxDamage = -400, radius = 5, effect = CONST_ME_MAGIC_BLUE, target = false }, } diff --git a/data-otservbr-global/monster/bosses/the_book_of_death.lua b/data-otservbr-global/monster/bosses/the_book_of_death.lua index c6445b9f45c..8b65e1d0a48 100644 --- a/data-otservbr-global/monster/bosses/the_book_of_death.lua +++ b/data-otservbr-global/monster/bosses/the_book_of_death.lua @@ -67,7 +67,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/bosses/the_brainstealer.lua b/data-otservbr-global/monster/bosses/the_brainstealer.lua index 57a4beba537..2010de7b5c5 100644 --- a/data-otservbr-global/monster/bosses/the_brainstealer.lua +++ b/data-otservbr-global/monster/bosses/the_brainstealer.lua @@ -93,7 +93,7 @@ monster.attacks = { { name = "melee", type = COMBAT_PHYSICALDAMAGE, interval = 2000, minDamage = 0, maxDamage = -900 }, { name = "combat", type = COMBAT_DEATHDAMAGE, interval = 2000, chance = 20, radius = 4, minDamage = -1200, maxDamage = -1900, effect = CONST_ME_MORTAREA, shootEffect = CONST_ANI_SUDDENDEATH, target = true, range = 7 }, { name = "combat", type = COMBAT_LIFEDRAIN, interval = 2000, chance = 20, radius = 4, minDamage = -700, maxDamage = -1000, effect = CONST_ME_DRAWBLOOD }, - { name = "combat", type = COMBAT_LIFEDRAIN, interval = 2000, chance = 10, length = 8, spread = 0, minDamage = -1200, maxDamage = -1600, effect = CONST_ME_ELECTRICALSPARK }, + { name = "combat", type = COMBAT_LIFEDRAIN, interval = 2000, chance = 10, length = 8, spread = 1, minDamage = -1200, maxDamage = -1600, effect = CONST_ME_ELECTRICALSPARK }, } monster.defenses = { diff --git a/data-otservbr-global/monster/bosses/the_collector.lua b/data-otservbr-global/monster/bosses/the_collector.lua index 3dd239b3ed0..8b506a4ce68 100644 --- a/data-otservbr-global/monster/bosses/the_collector.lua +++ b/data-otservbr-global/monster/bosses/the_collector.lua @@ -67,7 +67,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 100, attack = 40 }, - { name = "speed", interval = 1000, chance = 13, speedChange = -800, length = 8, spread = 3, effect = CONST_ME_ENERGYHIT, target = false, duration = 20000 }, + { name = "speed", interval = 1000, chance = 13, speedChange = -800, length = 8, spread = 1, effect = CONST_ME_ENERGYHIT, target = false, duration = 20000 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -85, range = 7, shootEffect = CONST_ANI_LARGEROCK, target = false }, { name = "melee", interval = 2000, chance = 15, minDamage = -10, maxDamage = -80 }, } diff --git a/data-otservbr-global/monster/bosses/visco.lua b/data-otservbr-global/monster/bosses/visco.lua index 6b4d0adb1a0..3eb61243d45 100644 --- a/data-otservbr-global/monster/bosses/visco.lua +++ b/data-otservbr-global/monster/bosses/visco.lua @@ -92,7 +92,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 200, attack = 200 }, - { name = "combat", interval = 2000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -500, maxDamage = -1500, length = 8, spread = 3, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -500, maxDamage = -1500, length = 8, spread = 1, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 2000, chance = 30, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -1300, radius = 3, effect = CONST_ME_POISONAREA, target = false }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_MANADRAIN, minDamage = -50, maxDamage = -130, range = 7, effect = CONST_ME_MAGIC_GREEN, target = true }, { name = "speed", interval = 2000, chance = 20, speedChange = -500, range = 7, effect = CONST_ME_MAGIC_RED, target = false, duration = 20000 }, diff --git a/data-otservbr-global/monster/bosses/weakened_shlorg.lua b/data-otservbr-global/monster/bosses/weakened_shlorg.lua index af96e3d5389..986ab7b836f 100644 --- a/data-otservbr-global/monster/bosses/weakened_shlorg.lua +++ b/data-otservbr-global/monster/bosses/weakened_shlorg.lua @@ -89,7 +89,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 150, attack = 50, condition = { type = CONDITION_POISON, totalDamage = 180, interval = 4000 } }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -90, maxDamage = -180, length = 4, spread = 3, effect = CONST_ME_MAGIC_GREEN, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -90, maxDamage = -180, length = 4, spread = 1, effect = CONST_ME_MAGIC_GREEN, target = false }, { name = "combat", interval = 2000, chance = 14, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -150, radius = 5, effect = CONST_ME_GREEN_RINGS, target = false }, -- poison { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 13, minDamage = -360, maxDamage = -440, radius = 5, effect = CONST_ME_GREEN_RINGS, target = false }, diff --git a/data-otservbr-global/monster/bosses/zarabustor.lua b/data-otservbr-global/monster/bosses/zarabustor.lua index a9e7f9b3fc8..e0019ad46e0 100644 --- a/data-otservbr-global/monster/bosses/zarabustor.lua +++ b/data-otservbr-global/monster/bosses/zarabustor.lua @@ -95,7 +95,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = 0, maxDamage = -250, range = 7, radius = 3, shootEffect = CONST_ANI_BURSTARROW, effect = CONST_ME_FIREAREA, target = true }, { name = "firefield", interval = 2000, chance = 10, range = 7, radius = 2, shootEffect = CONST_ANI_FIRE, target = true }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -250, range = 7, shootEffect = CONST_ANI_ENERGY, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -130, maxDamage = -350, length = 8, spread = 3, effect = CONST_ME_BIGCLOUDS, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -130, maxDamage = -350, length = 8, spread = 1, effect = CONST_ME_BIGCLOUDS, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = 0, maxDamage = -250, range = 7, target = false }, { name = "speed", interval = 2000, chance = 15, speedChange = -330, range = 7, effect = CONST_ME_MAGIC_RED, target = false, duration = 20000 }, { name = "warlock skill reducer", interval = 2000, chance = 5, range = 5, target = false }, diff --git a/data-otservbr-global/monster/bosses/zushuka.lua b/data-otservbr-global/monster/bosses/zushuka.lua index 968e0c3c2dc..8e37a23f312 100644 --- a/data-otservbr-global/monster/bosses/zushuka.lua +++ b/data-otservbr-global/monster/bosses/zushuka.lua @@ -110,9 +110,9 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -560 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_ICEDAMAGE, minDamage = 0, maxDamage = -100, length = 8, spread = 3, effect = CONST_ME_ICEATTACK, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_ICEDAMAGE, minDamage = 0, maxDamage = -100, length = 8, spread = 1, effect = CONST_ME_ICEATTACK, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_ICEDAMAGE, minDamage = 0, maxDamage = -110, range = 7, shootEffect = CONST_ANI_SNOWBALL, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_ICEDAMAGE, minDamage = -300, maxDamage = -750, length = 8, spread = 3, effect = CONST_ME_ICEAREA, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_ICEDAMAGE, minDamage = -300, maxDamage = -750, length = 8, spread = 1, effect = CONST_ME_ICEAREA, target = false }, { name = "outfit", interval = 2000, chance = 10, range = 7, effect = CONST_ME_MAGIC_BLUE, target = false, duration = 4000, outfitItem = 7172 }, { name = "speed", interval = 2000, chance = 15, speedChange = -330, range = 7, effect = CONST_ME_ICETORNADO, target = false, duration = 20000 }, } diff --git a/data-otservbr-global/monster/constructs/ice_golem.lua b/data-otservbr-global/monster/constructs/ice_golem.lua index 7e7d42d0643..2f3a9d654ff 100644 --- a/data-otservbr-global/monster/constructs/ice_golem.lua +++ b/data-otservbr-global/monster/constructs/ice_golem.lua @@ -94,7 +94,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -220 }, - { name = "speed", interval = 1000, chance = 13, speedChange = -800, length = 8, spread = 3, effect = CONST_ME_ENERGYHIT, target = false, duration = 20000 }, + { name = "speed", interval = 1000, chance = 13, speedChange = -800, length = 8, spread = 1, effect = CONST_ME_ENERGYHIT, target = false, duration = 20000 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_ICEDAMAGE, minDamage = -50, maxDamage = -85, range = 7, shootEffect = CONST_ANI_SMALLICE, effect = CONST_ME_ICEATTACK, target = false }, { name = "ice golem skill reducer", interval = 2000, chance = 10, target = false }, } diff --git a/data-otservbr-global/monster/constructs/lava_golem.lua b/data-otservbr-global/monster/constructs/lava_golem.lua index 0aa0548574e..ec449392669 100644 --- a/data-otservbr-global/monster/constructs/lava_golem.lua +++ b/data-otservbr-global/monster/constructs/lava_golem.lua @@ -108,7 +108,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400 }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -350, maxDamage = -700, length = 8, spread = 3, effect = CONST_ME_FIREATTACK, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -350, maxDamage = -700, length = 8, spread = 1, effect = CONST_ME_FIREATTACK, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -600, maxDamage = -1300, length = 8, spread = 3, effect = CONST_ME_MORTAREA, target = false }, { name = "lava golem soulfire", interval = 2000, chance = 15, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -220, maxDamage = -350, radius = 4, effect = CONST_ME_FIREAREA, target = true }, diff --git a/data-otservbr-global/monster/constructs/magma_crawler.lua b/data-otservbr-global/monster/constructs/magma_crawler.lua index d9c5c44080b..c15ff702315 100644 --- a/data-otservbr-global/monster/constructs/magma_crawler.lua +++ b/data-otservbr-global/monster/constructs/magma_crawler.lua @@ -106,7 +106,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -203 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -1100, length = 8, spread = 3, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -1100, length = 8, spread = 1, effect = CONST_ME_MORTAREA, target = false }, { name = "magma crawler wave", interval = 2000, chance = 15, minDamage = -290, maxDamage = -800, target = false }, { name = "magma crawler soulfire", interval = 2000, chance = 20, target = false }, { name = "soulfire rune", interval = 2000, chance = 10, target = false }, diff --git a/data-otservbr-global/monster/constructs/metal_gargoyle.lua b/data-otservbr-global/monster/constructs/metal_gargoyle.lua index 206346bf4f2..6629b83bf4a 100644 --- a/data-otservbr-global/monster/constructs/metal_gargoyle.lua +++ b/data-otservbr-global/monster/constructs/metal_gargoyle.lua @@ -97,7 +97,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 84, attack = 50 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -125, maxDamage = -230, length = 8, spread = 3, effect = CONST_ME_YELLOWENERGY, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -125, maxDamage = -230, length = 8, spread = 1, effect = CONST_ME_YELLOWENERGY, target = false }, { name = "combat", interval = 2000, chance = 9, type = COMBAT_LIFEDRAIN, minDamage = -85, maxDamage = -150, range = 7, radius = 3, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = true }, { name = "metal gargoyle curse", interval = 2000, chance = 13, target = false }, } diff --git a/data-otservbr-global/monster/constructs/stone_devourer.lua b/data-otservbr-global/monster/constructs/stone_devourer.lua index 4af345b23d7..8746e73f612 100644 --- a/data-otservbr-global/monster/constructs/stone_devourer.lua +++ b/data-otservbr-global/monster/constructs/stone_devourer.lua @@ -105,7 +105,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -990 }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -230, maxDamage = -460, range = 7, shootEffect = CONST_ANI_SMALLEARTH, effect = CONST_ME_STONES, target = true }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -650, range = 7, shootEffect = CONST_ANI_LARGEROCK, target = true }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -150, maxDamage = -260, length = 5, spread = 3, effect = CONST_ME_STONES, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -150, maxDamage = -260, length = 5, spread = 1, effect = CONST_ME_STONES, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/constructs/walker.lua b/data-otservbr-global/monster/constructs/walker.lua index 3ebcd2cc468..77cdf37192a 100644 --- a/data-otservbr-global/monster/constructs/walker.lua +++ b/data-otservbr-global/monster/constructs/walker.lua @@ -94,7 +94,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 70, attack = 50 }, { name = "walker skill reducer", interval = 2000, chance = 21, target = false }, - { name = "combat", interval = 2000, chance = 17, type = COMBAT_FIREDAMAGE, minDamage = -125, maxDamage = -245, length = 8, spread = 3, effect = CONST_ME_EXPLOSIONHIT, target = false }, + { name = "combat", interval = 2000, chance = 17, type = COMBAT_FIREDAMAGE, minDamage = -125, maxDamage = -245, length = 8, spread = 1, effect = CONST_ME_EXPLOSIONHIT, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/constructs/weeper.lua b/data-otservbr-global/monster/constructs/weeper.lua index 29633af26e2..cb09e9c5862 100644 --- a/data-otservbr-global/monster/constructs/weeper.lua +++ b/data-otservbr-global/monster/constructs/weeper.lua @@ -99,9 +99,9 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -450 }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -400, maxDamage = -1000, length = 8, spread = 3, effect = CONST_ME_FIREATTACK, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -400, maxDamage = -1000, length = 8, spread = 1, effect = CONST_ME_FIREATTACK, target = false }, { name = "combat", interval = 3000, chance = 100, type = COMBAT_FIREDAMAGE, minDamage = -80, maxDamage = -250, radius = 3, effect = CONST_ME_HITBYFIRE, target = false }, - { name = "speed", interval = 2000, chance = 10, speedChange = -800, length = 5, spread = 3, effect = CONST_ME_BLOCKHIT, target = false, duration = 30000 }, + { name = "speed", interval = 2000, chance = 10, speedChange = -800, length = 5, spread = 1, effect = CONST_ME_BLOCKHIT, target = false, duration = 30000 }, } monster.defenses = { diff --git a/data-otservbr-global/monster/demons/askarak_demon.lua b/data-otservbr-global/monster/demons/askarak_demon.lua index 4802c5306ad..c9f9148febb 100644 --- a/data-otservbr-global/monster/demons/askarak_demon.lua +++ b/data-otservbr-global/monster/demons/askarak_demon.lua @@ -101,7 +101,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -143 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -20, maxDamage = -60, range = 7, radius = 6, shootEffect = CONST_ANI_POISON, effect = CONST_ME_GREEN_RINGS, target = false }, { name = "askarak wave", interval = 2000, chance = 15, minDamage = -75, maxDamage = -140, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -130, maxDamage = -170, length = 4, spread = 0, effect = CONST_ME_GREEN_RINGS, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -130, maxDamage = -170, length = 4, spread = 1, effect = CONST_ME_GREEN_RINGS, target = false }, { name = "speed", interval = 2000, chance = 10, speedChange = -600, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 15000 }, } diff --git a/data-otservbr-global/monster/demons/askarak_lord.lua b/data-otservbr-global/monster/demons/askarak_lord.lua index c16d893f0f9..407b90269a3 100644 --- a/data-otservbr-global/monster/demons/askarak_lord.lua +++ b/data-otservbr-global/monster/demons/askarak_lord.lua @@ -101,7 +101,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -186 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -40, maxDamage = -80, range = 7, radius = 6, shootEffect = CONST_ANI_POISON, effect = CONST_ME_GREEN_RINGS, target = false }, { name = "askarak wave", interval = 2000, chance = 15, minDamage = -95, maxDamage = -180, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -130, maxDamage = -180, length = 4, spread = 0, effect = CONST_ME_GREEN_RINGS, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -130, maxDamage = -180, length = 4, spread = 1, effect = CONST_ME_GREEN_RINGS, target = false }, { name = "speed", interval = 2000, chance = 15, speedChange = -650, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 15000 }, } diff --git a/data-otservbr-global/monster/demons/askarak_prince.lua b/data-otservbr-global/monster/demons/askarak_prince.lua index 227ac9542ee..b679df698fb 100644 --- a/data-otservbr-global/monster/demons/askarak_prince.lua +++ b/data-otservbr-global/monster/demons/askarak_prince.lua @@ -101,7 +101,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -353 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -70, maxDamage = -250, range = 7, radius = 6, shootEffect = CONST_ANI_POISON, effect = CONST_ME_GREEN_RINGS, target = false }, { name = "askarak wave", interval = 2000, chance = 15, minDamage = -100, maxDamage = -200, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -100, maxDamage = -200, length = 4, spread = 0, effect = CONST_ME_GREEN_RINGS, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -100, maxDamage = -200, length = 4, spread = 1, effect = CONST_ME_GREEN_RINGS, target = false }, { name = "speed", interval = 2000, chance = 15, speedChange = -700, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 15000 }, } diff --git a/data-otservbr-global/monster/demons/dawnfire_asura.lua b/data-otservbr-global/monster/demons/dawnfire_asura.lua index 30fa645b924..2b58deba78d 100644 --- a/data-otservbr-global/monster/demons/dawnfire_asura.lua +++ b/data-otservbr-global/monster/demons/dawnfire_asura.lua @@ -107,11 +107,10 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -269 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = 0, maxDamage = -70, range = 7, target = false }, - { name = "firefield", interval = 2000, chance = 10, range = 7, radius = 1, shootEffect = CONST_ANI_FIRE, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -50, maxDamage = -200, length = 8, spread = 3, effect = CONST_ME_PURPLEENERGY, target = false }, - { name = "energy strike", interval = 2000, chance = 10, minDamage = -10, maxDamage = -100, range = 1, target = false }, - { name = "speed", interval = 2000, chance = 15, speedChange = -100, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 30000 }, + { name = "combat", interval = 3700, chance = 17, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -300, length = 8, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false }, + { name = "combat", interval = 3200, chance = 25, type = COMBAT_DEATHDAMAGE, minDamage = -100, maxDamage = -350, radius = 4, range = 5, target = true, effect = CONST_ME_MORTAREA }, + { name = "combat", interval = 2700, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -95, maxDamage = -180, range = 3, shootEffect = CONST_ANI_FIRE, target = true }, + { name = "speed", interval = 2000, chance = 20, speedChange = -800, radius = 1, shootEffect = CONST_ANI_EXPLOSION, effect = CONST_ME_SLEEP, target = true, duration = 15000 }, } monster.defenses = { diff --git a/data-otservbr-global/monster/demons/demon.lua b/data-otservbr-global/monster/demons/demon.lua index 3a1208c210b..db0e6362102 100644 --- a/data-otservbr-global/monster/demons/demon.lua +++ b/data-otservbr-global/monster/demons/demon.lua @@ -132,7 +132,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = 0, maxDamage = -120, range = 7, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -150, maxDamage = -250, range = 7, radius = 7, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true }, { name = "firefield", interval = 2000, chance = 10, range = 7, radius = 1, shootEffect = CONST_ANI_FIRE, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -490, length = 8, spread = 0, effect = CONST_ME_PURPLEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -490, length = 8, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -210, maxDamage = -300, range = 1, shootEffect = CONST_ANI_ENERGY, target = true }, { name = "speed", interval = 2000, chance = 15, speedChange = -700, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 30000 }, } diff --git a/data-otservbr-global/monster/demons/demon_outcast.lua b/data-otservbr-global/monster/demons/demon_outcast.lua index 10827c7d5a4..18ddfc4c268 100644 --- a/data-otservbr-global/monster/demons/demon_outcast.lua +++ b/data-otservbr-global/monster/demons/demon_outcast.lua @@ -115,8 +115,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -250, maxDamage = -450, length = 6, spread = 3, effect = CONST_ME_PURPLEENERGY, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -350, maxDamage = -550, length = 8, spread = 3, effect = CONST_ME_YELLOWENERGY, target = true }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -250, maxDamage = -450, length = 6, spread = 1, effect = CONST_ME_PURPLEENERGY, target = true }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -350, maxDamage = -550, length = 8, spread = 1, effect = CONST_ME_YELLOWENERGY, target = true }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -100, maxDamage = -250, radius = 3, effect = CONST_ME_ENERGYHIT, target = true }, { name = "demon outcast skill reducer", interval = 2000, chance = 10, range = 5, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -80, maxDamage = -150, radius = 4, effect = CONST_ME_MAGIC_GREEN, target = false }, diff --git a/data-otservbr-global/monster/demons/duskbringer.lua b/data-otservbr-global/monster/demons/duskbringer.lua index 91a8230c84c..476ca99beeb 100644 --- a/data-otservbr-global/monster/demons/duskbringer.lua +++ b/data-otservbr-global/monster/demons/duskbringer.lua @@ -82,8 +82,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -350 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -165, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -350, maxDamage = -720, length = 8, spread = 3, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -300, length = 7, spread = 3, effect = CONST_ME_EXPLOSIONAREA, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -350, maxDamage = -720, length = 8, spread = 1, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -300, length = 7, spread = 1, effect = CONST_ME_EXPLOSIONAREA, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -225, maxDamage = -275, radius = 4, target = false }, } diff --git a/data-otservbr-global/monster/demons/floating_savant.lua b/data-otservbr-global/monster/demons/floating_savant.lua index 0e63eb84602..facdb6cbd12 100644 --- a/data-otservbr-global/monster/demons/floating_savant.lua +++ b/data-otservbr-global/monster/demons/floating_savant.lua @@ -97,7 +97,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -390, maxDamage = -480, range = 7, shootEffect = CONST_ANI_FIRE, target = false }, { name = "combat", interval = 2000, chance = 14, type = COMBAT_ENERGYDAMAGE, minDamage = -390, maxDamage = -480, range = 7, shootEffect = CONST_ANI_ENERGY, target = false }, { name = "combat", interval = 2000, chance = 12, type = COMBAT_FIREDAMAGE, minDamage = -300, maxDamage = -400, radius = 3, effect = CONST_ME_EXPLOSIONAREA, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -490, maxDamage = -630, length = 4, spread = 3, effect = CONST_ME_HITBYFIRE, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -490, maxDamage = -630, length = 4, spread = 1, effect = CONST_ME_HITBYFIRE, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/demons/frost_flower_asura.lua b/data-otservbr-global/monster/demons/frost_flower_asura.lua index 6013179e970..55a65961372 100644 --- a/data-otservbr-global/monster/demons/frost_flower_asura.lua +++ b/data-otservbr-global/monster/demons/frost_flower_asura.lua @@ -107,7 +107,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -110, maxDamage = -400 }, - { name = "combat", interval = 1300, chance = 14, type = COMBAT_HOLYDAMAGE, minDamage = -185, maxDamage = -210, length = 8, spread = 3, effect = CONST_ME_ICETORNADO, target = false }, + { name = "combat", interval = 1300, chance = 14, type = COMBAT_HOLYDAMAGE, minDamage = -185, maxDamage = -210, length = 8, spread = 1, effect = CONST_ME_ICETORNADO, target = false }, { name = "combat", interval = 1000, chance = 9, type = COMBAT_ICEDAMAGE, minDamage = -120, maxDamage = -200, range = 7, shootEffect = CONST_ANI_SMALLICE, effect = CONST_ME_ICEATTACK, target = true }, } diff --git a/data-otservbr-global/monster/demons/fury.lua b/data-otservbr-global/monster/demons/fury.lua index 7c990c16b5e..cdaad15cf8f 100644 --- a/data-otservbr-global/monster/demons/fury.lua +++ b/data-otservbr-global/monster/demons/fury.lua @@ -102,8 +102,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -510 }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -200, maxDamage = -300, length = 8, spread = 3, effect = CONST_ME_EXPLOSIONAREA, target = false }, - { name = "combat", interval = 2000, chance = 5, type = COMBAT_DEATHDAMAGE, minDamage = -120, maxDamage = -700, length = 8, spread = 3, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -120, maxDamage = -300, radius = 4, target = false }, + { name = "combat", interval = 2000, chance = 5, type = COMBAT_DEATHDAMAGE, minDamage = -120, maxDamage = -700, length = 8, spread = 3, effect = CONST_ME_DRAWBLOOD, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -120, maxDamage = -300, radius = 4, effect = CONST_ME_DRAWBLOOD, target = false }, { name = "fury skill reducer", interval = 2000, chance = 5, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -120, maxDamage = -300, radius = 3, effect = CONST_ME_HITAREA, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -125, maxDamage = -250, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_SMALLCLOUDS, target = false }, diff --git a/data-otservbr-global/monster/demons/grimeleech.lua b/data-otservbr-global/monster/demons/grimeleech.lua index 8ef43ffadcc..e4754df99ff 100644 --- a/data-otservbr-global/monster/demons/grimeleech.lua +++ b/data-otservbr-global/monster/demons/grimeleech.lua @@ -113,10 +113,10 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 70, attack = 80 }, { name = "melee", interval = 2000, chance = 2, skill = 153, attack = 100 }, - { name = "combat", interval = 2000, chance = 14, type = COMBAT_PHYSICALDAMAGE, minDamage = 100, maxDamage = -565, range = 7, shootEffect = CONST_ANI_DEATH, effect = CONST_ME_MORTAREA, target = true }, - { name = "combat", interval = 2000, chance = 12, type = COMBAT_DEATHDAMAGE, minDamage = -150, maxDamage = -220, length = 8, spread = 3, target = false }, - { name = "combat", interval = 2000, chance = 13, type = COMBAT_DEATHDAMAGE, minDamage = -225, maxDamage = -375, radius = 4, target = false }, - { name = "combat", interval = 2000, chance = 9, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -300, length = 8, spread = 3, effect = CONST_ME_EXPLOSIONAREA, target = false }, + { name = "combat", interval = 2000, chance = 14, type = COMBAT_LIFEDRAINDAMAGE, minDamage = 100, maxDamage = -565, range = 7, shootEffect = CONST_ANI_DEATH, effect = CONST_ME_MORTAREA, target = true }, + { name = "combat", interval = 2000, chance = 12, type = COMBAT_LIFEDRAINDAMAGE, minDamage = -150, maxDamage = -220, length = 8, spread = 1, effect = CONST_ME_MAGIC_GREEN, target = false }, + { name = "combat", interval = 2000, chance = 13, type = COMBAT_DEATHDAMAGE, minDamage = -225, maxDamage = -375, radius = 4, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 9, type = COMBAT_MANADRAINDAMAGE, minDamage = 0, maxDamage = -300, length = 8, spread = 3, effect = CONST_ME_MAGIC_RED, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/demons/hellfire_fighter.lua b/data-otservbr-global/monster/demons/hellfire_fighter.lua index 1d6610844b5..00edc695381 100644 --- a/data-otservbr-global/monster/demons/hellfire_fighter.lua +++ b/data-otservbr-global/monster/demons/hellfire_fighter.lua @@ -98,7 +98,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -520 }, { name = "firefield", interval = 2000, chance = 10, range = 7, radius = 3, shootEffect = CONST_ANI_FIRE, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -392, maxDamage = -1500, length = 8, spread = 3, effect = CONST_ME_FIREATTACK, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -392, maxDamage = -1500, length = 8, spread = 1, effect = CONST_ME_FIREATTACK, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -60, maxDamage = -330, range = 7, radius = 3, effect = CONST_ME_HITBYFIRE, target = false }, { name = "hellfire fighter soulfire", interval = 2000, chance = 15, target = false }, } diff --git a/data-otservbr-global/monster/demons/hellflayer.lua b/data-otservbr-global/monster/demons/hellflayer.lua index f0b8b29df5c..54e2877f77b 100644 --- a/data-otservbr-global/monster/demons/hellflayer.lua +++ b/data-otservbr-global/monster/demons/hellflayer.lua @@ -114,7 +114,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -170, maxDamage = -300, range = 7, shootEffect = CONST_ANI_POISON, target = false }, { name = "choking fear drown", interval = 2000, chance = 20, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -250, maxDamage = -500, radius = 4, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -50, maxDamage = -200, length = 8, spread = 3, effect = CONST_ME_PURPLEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -50, maxDamage = -200, length = 8, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -300, maxDamage = -550, radius = 1, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREATTACK, target = true }, { name = "warlock skill reducer", interval = 2000, chance = 5, range = 5, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = 300, maxDamage = -500, radius = 1, shootEffect = CONST_ANI_EXPLOSION, effect = CONST_ME_SLEEP, target = true }, diff --git a/data-otservbr-global/monster/demons/midnight_asura.lua b/data-otservbr-global/monster/demons/midnight_asura.lua index 6eb53ae84a1..d852da98af3 100644 --- a/data-otservbr-global/monster/demons/midnight_asura.lua +++ b/data-otservbr-global/monster/demons/midnight_asura.lua @@ -112,12 +112,13 @@ monster.loot = { } monster.attacks = { - { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -269 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = 0, maxDamage = -70, range = 7, target = false }, - { name = "firefield", interval = 2000, chance = 10, range = 7, radius = 1, shootEffect = CONST_ANI_FIRE, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -50, maxDamage = -200, length = 8, spread = 3, effect = CONST_ME_PURPLEENERGY, target = false }, - { name = "energy strike", interval = 2000, chance = 10, minDamage = -10, maxDamage = -100, range = 1, target = false }, - { name = "speed", interval = 2000, chance = 15, speedChange = -100, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 30000 }, + { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -387 }, + { name = "combat", interval = 3300, chance = 10, type = COMBAT_MANADRAIN, minDamage = 0, maxDamage = -70, range = 7, target = true }, + { name = "combat", interval = 3700, chance = 17, type = COMBAT_ENERGYDAMAGE, minDamage = -150, maxDamage = -200, length = 5, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false }, + { name = "combat", interval = 4100, chance = 27, type = COMBAT_DEATHDAMAGE, minDamage = -150, maxDamage = -300, length = 8, spread = 1, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2700, chance = 15, type = COMBAT_DEATHDAMAGE, minDamage = -50, maxDamage = -200, range = 5, shootEffect = CONST_ANI_SUDDENDEATH, target = true }, + { name = "combat", interval = 3100, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -50, maxDamage = -100, range = 1, shootEffect = CONST_ANI_ENERGY, target = true }, + { name = "speed", interval = 2000, chance = 20, speedChange = -800, radius = 1, shootEffect = CONST_ANI_EXPLOSION, effect = CONST_ME_SLEEP, target = true, duration = 15000 }, } monster.defenses = { diff --git a/data-otservbr-global/monster/demons/shaburak_demon.lua b/data-otservbr-global/monster/demons/shaburak_demon.lua index 043fd39641b..ffa616ce2a8 100644 --- a/data-otservbr-global/monster/demons/shaburak_demon.lua +++ b/data-otservbr-global/monster/demons/shaburak_demon.lua @@ -100,7 +100,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -113 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -20, maxDamage = -60, range = 7, radius = 6, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREATTACK, target = false }, { name = "shaburak wave", interval = 2000, chance = 15, minDamage = -70, maxDamage = -140, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -130, maxDamage = -170, length = 4, spread = 0, effect = CONST_ME_FIREATTACK, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -130, maxDamage = -170, length = 4, spread = 1, effect = CONST_ME_FIREATTACK, target = false }, { name = "speed", interval = 2000, chance = 10, speedChange = -600, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 15000 }, } diff --git a/data-otservbr-global/monster/demons/shaburak_lord.lua b/data-otservbr-global/monster/demons/shaburak_lord.lua index 3da72894836..7c07b202a96 100644 --- a/data-otservbr-global/monster/demons/shaburak_lord.lua +++ b/data-otservbr-global/monster/demons/shaburak_lord.lua @@ -100,7 +100,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -251 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -30, maxDamage = -75, range = 7, radius = 6, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREATTACK, target = false }, { name = "shaburak wave", interval = 2000, chance = 15, minDamage = -80, maxDamage = -170, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -140, maxDamage = -200, length = 4, spread = 0, effect = CONST_ME_FIREATTACK, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -140, maxDamage = -200, length = 4, spread = 1, effect = CONST_ME_FIREATTACK, target = false }, { name = "speed", interval = 2000, chance = 10, speedChange = -650, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 15000 }, } diff --git a/data-otservbr-global/monster/demons/shaburak_prince.lua b/data-otservbr-global/monster/demons/shaburak_prince.lua index 7885b5b086f..3044648a469 100644 --- a/data-otservbr-global/monster/demons/shaburak_prince.lua +++ b/data-otservbr-global/monster/demons/shaburak_prince.lua @@ -102,7 +102,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -319 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -40, maxDamage = -90, range = 7, radius = 6, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREATTACK, target = false }, { name = "shaburak wave", interval = 2000, chance = 15, minDamage = -100, maxDamage = -200, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -150, maxDamage = -250, length = 4, spread = 0, effect = CONST_ME_HITBYFIRE, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -150, maxDamage = -250, length = 4, spread = 1, effect = CONST_ME_HITBYFIRE, target = false }, { name = "speed", interval = 2000, chance = 15, speedChange = -700, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 15000 }, } diff --git a/data-otservbr-global/monster/demons/true_dawnfire_asura.lua b/data-otservbr-global/monster/demons/true_dawnfire_asura.lua index b434eb8be72..20dba37c7e2 100644 --- a/data-otservbr-global/monster/demons/true_dawnfire_asura.lua +++ b/data-otservbr-global/monster/demons/true_dawnfire_asura.lua @@ -105,7 +105,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -700, condition = { type = CONDITION_FIRE, totalDamage = 500, interval = 4000 } }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -50, maxDamage = -300, range = 7, target = false }, -- mana drain beam - { name = "combat", interval = 1000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -450, maxDamage = -830, length = 1, spread = 0, effect = CONST_ME_HITBYFIRE, target = false }, -- fire missile + { name = "combat", interval = 1000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -450, maxDamage = -830, length = 1, spread = 1, effect = CONST_ME_HITBYFIRE, target = false }, -- fire missile { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -550, maxDamage = -750, radius = 4, effect = CONST_ME_BLACKSMOKE, target = false }, -- death ball { name = "speed", interval = 2000, chance = 15, speedChange = -200, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 30000 }, -- smoke berserk } diff --git a/data-otservbr-global/monster/demons/true_frost_flower_asura.lua b/data-otservbr-global/monster/demons/true_frost_flower_asura.lua index 7a5a6998cf1..19a231c7168 100644 --- a/data-otservbr-global/monster/demons/true_frost_flower_asura.lua +++ b/data-otservbr-global/monster/demons/true_frost_flower_asura.lua @@ -110,8 +110,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -500, condition = { type = CONDITION_FREEZING, totalDamage = 400, interval = 4000 } }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = 0, maxDamage = -250, range = 7, target = false }, - { name = "combat", interval = 1000, chance = 10, type = COMBAT_ICEDAMAGE, minDamage = -550, maxDamage = -780, length = 8, spread = 3, effect = CONST_ME_ICETORNADO, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -300, length = 8, spread = 3, effect = CONST_ME_PURPLEENERGY, target = false }, + { name = "combat", interval = 1000, chance = 10, type = COMBAT_ICEDAMAGE, minDamage = -550, maxDamage = -780, length = 8, spread = 1, effect = CONST_ME_ICETORNADO, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -300, length = 8, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false }, { name = "speed", interval = 2000, chance = 15, speedChange = -100, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 30000 }, } diff --git a/data-otservbr-global/monster/demons/true_midnight_asura.lua b/data-otservbr-global/monster/demons/true_midnight_asura.lua index 1327b384f97..48b05183a19 100644 --- a/data-otservbr-global/monster/demons/true_midnight_asura.lua +++ b/data-otservbr-global/monster/demons/true_midnight_asura.lua @@ -112,8 +112,8 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -450 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -500, maxDamage = -650, range = 5, effect = CONST_ME_MORTAREA, target = true }, --Death Missile { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -50, maxDamage = -280, range = 7, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -240, length = 8, spread = 3, effect = CONST_ME_PURPLEENERGY, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -500, maxDamage = -700, length = 8, spread = 3, effect = CONST_ME_BLACKSMOKE, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -240, length = 8, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -500, maxDamage = -700, length = 8, spread = 1, effect = CONST_ME_BLACKSMOKE, target = false }, { name = "speed", interval = 2000, chance = 15, speedChange = -100, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 30000 }, } diff --git a/data-otservbr-global/monster/demons/vexclaw.lua b/data-otservbr-global/monster/demons/vexclaw.lua index d13f5a5087d..fa940a06bd1 100644 --- a/data-otservbr-global/monster/demons/vexclaw.lua +++ b/data-otservbr-global/monster/demons/vexclaw.lua @@ -121,9 +121,9 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -150, maxDamage = -250, range = 7, radius = 7, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true }, { name = "choking fear drown", interval = 2000, chance = 20, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -150, maxDamage = -400, radius = 4, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -50, maxDamage = -200, length = 8, spread = 3, effect = CONST_ME_PURPLEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -50, maxDamage = -200, length = 8, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false }, { name = "firefield", interval = 2000, chance = 10, range = 7, radius = 1, shootEffect = CONST_ANI_FIRE, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -490, length = 8, spread = 3, effect = CONST_ME_PURPLEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -490, length = 8, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false }, { name = "energy strike", interval = 2000, chance = 10, minDamage = -210, maxDamage = -300, range = 1, target = false }, { name = "speed", interval = 2000, chance = 15, speedChange = -300, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 30000 }, } diff --git a/data-otservbr-global/monster/dragons/frost_dragon.lua b/data-otservbr-global/monster/dragons/frost_dragon.lua index 34814c4f569..0456307325a 100644 --- a/data-otservbr-global/monster/dragons/frost_dragon.lua +++ b/data-otservbr-global/monster/dragons/frost_dragon.lua @@ -107,7 +107,7 @@ monster.attacks = { { name = "speed", interval = 2000, chance = 15, speedChange = -850, length = 7, spread = 3, effect = CONST_ME_ICEATTACK, target = false, duration = 18000 }, { name = "combat", interval = 2000, chance = 5, type = COMBAT_ICEDAMAGE, minDamage = -60, maxDamage = -120, radius = 3, effect = CONST_ME_ICETORNADO, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -240, radius = 4, effect = CONST_ME_ICEAREA, target = true }, - { name = "combat", interval = 2000, chance = 5, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -220, length = 1, spread = 0, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 2000, chance = 5, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -220, length = 1, spread = 3, effect = CONST_ME_POFF, target = false }, { name = "speed", interval = 2000, chance = 20, speedChange = -600, radius = 4, effect = CONST_ME_ICEAREA, target = true, duration = 12000 }, } diff --git a/data-otservbr-global/monster/elementals/cliff_strider.lua b/data-otservbr-global/monster/elementals/cliff_strider.lua index b03a7f25932..ffd9d0771fb 100644 --- a/data-otservbr-global/monster/elementals/cliff_strider.lua +++ b/data-otservbr-global/monster/elementals/cliff_strider.lua @@ -118,7 +118,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -800, radius = 4, shootEffect = CONST_ANI_LARGEROCK, effect = CONST_ME_STONES, target = true }, { name = "cliff strider skill reducer", interval = 2000, chance = 10, target = false }, { name = "cliff strider electrify", interval = 2000, chance = 15, range = 1, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -1000, length = 6, spread = 3, effect = CONST_ME_GROUNDSHAKER, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -1000, length = 6, spread = 1, effect = CONST_ME_GROUNDSHAKER, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_MANADRAIN, minDamage = -100, maxDamage = -300, radius = 4, effect = CONST_ME_YELLOWENERGY, target = false }, } diff --git a/data-otservbr-global/monster/elementals/earth_elemental.lua b/data-otservbr-global/monster/elementals/earth_elemental.lua index 84ab9418e29..618618b5344 100644 --- a/data-otservbr-global/monster/elementals/earth_elemental.lua +++ b/data-otservbr-global/monster/elementals/earth_elemental.lua @@ -96,7 +96,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -72, maxDamage = -105, range = 7, shootEffect = CONST_ANI_SMALLEARTH, effect = CONST_ME_GREEN_RINGS, target = true }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -100, range = 7, radius = 2, shootEffect = CONST_ANI_LARGEROCK, effect = CONST_ME_POFF, target = true }, -- poison - { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 20, minDamage = -200, maxDamage = -260, length = 6, spread = 3, effect = CONST_ME_BIGPLANTS, target = false }, + { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 20, minDamage = -200, maxDamage = -260, length = 6, spread = 1, effect = CONST_ME_BIGPLANTS, target = false }, -- poison { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -100, maxDamage = -140, radius = 5, shootEffect = CONST_ANI_POISON, effect = CONST_ME_POISONAREA, target = false }, { name = "speed", interval = 2000, chance = 10, speedChange = -330, range = 5, effect = CONST_ME_SMALLPLANTS, target = true, duration = 5000 }, diff --git a/data-otservbr-global/monster/elementals/foam_stalker.lua b/data-otservbr-global/monster/elementals/foam_stalker.lua index 5668eb0e29d..1c98af0c129 100644 --- a/data-otservbr-global/monster/elementals/foam_stalker.lua +++ b/data-otservbr-global/monster/elementals/foam_stalker.lua @@ -93,7 +93,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -300 }, { name = "foamsplash", interval = 5000, chance = 50, minDamage = -100, maxDamage = -300 }, - { name = "combat", interval = 2500, chance = 35, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -300, length = 6, spread = 0, effect = CONST_ME_LOSEENERGY }, + { name = "combat", interval = 2500, chance = 35, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -300, length = 6, spread = 1, effect = CONST_ME_LOSEENERGY }, { name = "combat", interval = 2000, chance = 45, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -300, range = 4, radius = 1, target = true, effect = CONST_ME_ICEATTACK, shootEffect = CONST_ANI_ICE }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -300, radius = 4, target = false, effect = CONST_ME_ICEAREA }, } diff --git a/data-otservbr-global/monster/elementals/ironblight.lua b/data-otservbr-global/monster/elementals/ironblight.lua index f6391182c10..4a1e81c1f66 100644 --- a/data-otservbr-global/monster/elementals/ironblight.lua +++ b/data-otservbr-global/monster/elementals/ironblight.lua @@ -108,9 +108,9 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -300 }, -- poison { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -460, maxDamage = -480, radius = 6, shootEffect = CONST_ANI_POISON, effect = CONST_ME_POISONAREA, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_ICEDAMAGE, minDamage = -260, maxDamage = -350, length = 7, spread = 3, shootEffect = CONST_ANI_ICE, effect = CONST_ME_ICEATTACK, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_ICEDAMAGE, minDamage = -260, maxDamage = -350, length = 7, spread = 1, shootEffect = CONST_ANI_ICE, effect = CONST_ME_ICEATTACK, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -180, maxDamage = -250, radius = 2, shootEffect = CONST_ANI_GREENSTAR, effect = CONST_ME_BIGPLANTS, target = true }, - { name = "speed", interval = 2000, chance = 10, speedChange = -800, length = 5, spread = 3, effect = CONST_ME_BLOCKHIT, target = false, duration = 30000 }, + { name = "speed", interval = 2000, chance = 10, speedChange = -800, length = 5, spread = 1, effect = CONST_ME_BLOCKHIT, target = false, duration = 30000 }, } monster.defenses = { diff --git a/data-otservbr-global/monster/elementals/lava_lurker.lua b/data-otservbr-global/monster/elementals/lava_lurker.lua index 675d807fa9e..ff9125a958d 100644 --- a/data-otservbr-global/monster/elementals/lava_lurker.lua +++ b/data-otservbr-global/monster/elementals/lava_lurker.lua @@ -81,8 +81,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, - { name = "combat", interval = 1000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -70, maxDamage = -300, range = 7, length = 3, spread = 3, effect = CONST_ME_HITBYFIRE, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_FIREDAMAGE, minDamage = 0, maxDamage = -100, range = 7, length = 6, spread = 3, effect = CONST_ME_HITBYFIRE, target = false }, + { name = "combat", interval = 1000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -70, maxDamage = -300, range = 7, length = 3, spread = 1, effect = CONST_ME_HITBYFIRE, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_FIREDAMAGE, minDamage = 0, maxDamage = -100, range = 7, length = 6, spread = 1, effect = CONST_ME_HITBYFIRE, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/elementals/massive_earth_elemental.lua b/data-otservbr-global/monster/elementals/massive_earth_elemental.lua index 674a26d553e..f698324ba27 100644 --- a/data-otservbr-global/monster/elementals/massive_earth_elemental.lua +++ b/data-otservbr-global/monster/elementals/massive_earth_elemental.lua @@ -98,7 +98,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -99, maxDamage = -145, range = 7, shootEffect = CONST_ANI_SMALLEARTH, effect = CONST_ME_GREEN_RINGS, target = true }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = -95, maxDamage = -169, range = 7, radius = 2, shootEffect = CONST_ANI_LARGEROCK, effect = CONST_ME_POFF, target = true }, -- poison - { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 15, minDamage = -300, maxDamage = -320, length = 6, spread = 3, effect = CONST_ME_BIGPLANTS, target = false }, + { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 15, minDamage = -300, maxDamage = -320, length = 6, spread = 1, effect = CONST_ME_BIGPLANTS, target = false }, -- poison { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -200, maxDamage = -220, radius = 5, shootEffect = CONST_ANI_POISON, effect = CONST_ME_POISONAREA, target = false }, { name = "speed", interval = 2000, chance = 20, speedChange = -330, range = 5, effect = CONST_ME_SMALLPLANTS, target = true, duration = 5000 }, diff --git a/data-otservbr-global/monster/elementals/massive_fire_elemental.lua b/data-otservbr-global/monster/elementals/massive_fire_elemental.lua index ab29c321263..f12696a35f8 100644 --- a/data-otservbr-global/monster/elementals/massive_fire_elemental.lua +++ b/data-otservbr-global/monster/elementals/massive_fire_elemental.lua @@ -90,7 +90,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -300 }, { name = "firefield", interval = 2000, chance = 10, range = 7, radius = 3, shootEffect = CONST_ANI_FIRE, target = false }, { name = "firefield", interval = 2000, chance = 10, range = 7, radius = 3, shootEffect = CONST_ANI_FIRE, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -200, maxDamage = -700, length = 7, spread = 3, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -200, maxDamage = -700, length = 7, spread = 1, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -60, maxDamage = -250, radius = 3, effect = CONST_ME_EXPLOSIONHIT, target = false }, { name = "massive fire elemental soulfire", interval = 2000, chance = 15, target = false }, } diff --git a/data-otservbr-global/monster/elementals/raging_fire.lua b/data-otservbr-global/monster/elementals/raging_fire.lua index a5da1da9fe1..87e8f37de82 100644 --- a/data-otservbr-global/monster/elementals/raging_fire.lua +++ b/data-otservbr-global/monster/elementals/raging_fire.lua @@ -77,7 +77,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 60, attack = 100 }, - { name = "combat", interval = 2000, chance = 9, type = COMBAT_FIREDAMAGE, minDamage = -65, maxDamage = -605, length = 7, spread = 3, target = false }, + { name = "combat", interval = 2000, chance = 9, type = COMBAT_FIREDAMAGE, minDamage = -65, maxDamage = -605, length = 7, spread = 1, target = false }, { name = "massive fire elemental soulfire", interval = 2000, chance = 12, target = false }, { name = "firefield", interval = 2000, chance = 11, range = 7, radius = 3, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_EXPLOSIONHIT, target = true }, { name = "firefield", interval = 2000, chance = 11, radius = 3, effect = CONST_ME_HITBYFIRE, target = false }, diff --git a/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_frazzlemaw.lua b/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_frazzlemaw.lua index c8181abc4e0..aed8ef34d48 100644 --- a/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_frazzlemaw.lua +++ b/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_frazzlemaw.lua @@ -80,7 +80,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -100 }, -- bleed { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 10, minDamage = -50, maxDamage = -120, radius = 3, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -110, length = 5, spread = 3, effect = CONST_ME_EXPLOSIONAREA, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -110, length = 5, spread = 1, effect = CONST_ME_EXPLOSIONAREA, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -100, radius = 2, shootEffect = CONST_ANI_LARGEROCK, effect = CONST_ME_STONES, target = true }, { name = "speed", interval = 2000, chance = 15, speedChange = -600, radius = 5, effect = CONST_ME_MAGIC_RED, target = false, duration = 15000 }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -80, maxDamage = -150, radius = 4, effect = CONST_ME_MAGIC_RED, target = false }, diff --git a/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_fungus.lua b/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_fungus.lua index 781372f05bc..951a19a9196 100644 --- a/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_fungus.lua +++ b/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_fungus.lua @@ -77,8 +77,8 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -50, maxDamage = -150, range = 7, shootEffect = CONST_ANI_SMALLEARTH, effect = CONST_ME_SMALLPLANTS, target = false }, { name = "poisonfield", interval = 2000, chance = 20, radius = 4, target = false }, -- poison - { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -30, maxDamage = -150, length = 8, spread = 3, effect = CONST_ME_GREEN_RINGS, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -80, maxDamage = -130, length = 5, spread = 3, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -30, maxDamage = -150, length = 8, spread = 1, effect = CONST_ME_GREEN_RINGS, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -80, maxDamage = -130, length = 5, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, -- poison { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -50, maxDamage = -180, range = 7, radius = 3, effect = CONST_ME_HITBYPOISON, target = false }, } diff --git a/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_manticore.lua b/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_manticore.lua index 83811f94d61..24f0cfdd8ab 100644 --- a/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_manticore.lua +++ b/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_manticore.lua @@ -70,7 +70,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -100 }, - { name = "combat", interval = 2000, chance = 13, type = COMBAT_FIREDAMAGE, minDamage = -50, maxDamage = -150, length = 8, spread = 3, effect = CONST_ME_HITBYFIRE, target = false }, + { name = "combat", interval = 2000, chance = 13, type = COMBAT_FIREDAMAGE, minDamage = -50, maxDamage = -150, length = 8, spread = 1, effect = CONST_ME_HITBYFIRE, target = false }, { name = "combat", interval = 4000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -50, maxDamage = -150, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, effect = CONST_ME_GREEN_RINGS, target = true }, { name = "combat", interval = 2000, chance = 22, type = COMBAT_FIREDAMAGE, minDamage = -10, maxDamage = -100, range = 4, shootEffect = CONST_ANI_BURSTARROW, target = true }, } diff --git a/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_shaper.lua b/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_shaper.lua index ba877ecbfe6..b6dbeb3e46d 100644 --- a/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_shaper.lua +++ b/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_shaper.lua @@ -76,7 +76,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = -50, maxDamage = -100, range = 7, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_ENERGYHIT, target = true }, - { name = "combat", interval = 2000, chance = 35, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -100, length = 5, spread = 3, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 35, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -100, length = 5, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -50, maxDamage = -100, radius = 7, effect = CONST_ME_MAGIC_BLUE, target = false }, { name = "speed", interval = 2000, chance = 9, speedChange = -440, effect = CONST_ME_GIANTICE, target = true, duration = 7000 }, } diff --git a/data-otservbr-global/monster/extra_dimensional/instable_sparkion.lua b/data-otservbr-global/monster/extra_dimensional/instable_sparkion.lua index 9ad49260b0d..3844eda9275 100644 --- a/data-otservbr-global/monster/extra_dimensional/instable_sparkion.lua +++ b/data-otservbr-global/monster/extra_dimensional/instable_sparkion.lua @@ -95,7 +95,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -250 }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -250, maxDamage = -350, length = 6, spread = 3, effect = CONST_ME_GROUNDSHAKER, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -250, maxDamage = -350, length = 6, spread = 1, effect = CONST_ME_GROUNDSHAKER, target = false }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -150, maxDamage = -200, range = 5, shootEffect = CONST_ANI_ENERGYBALL, effect = CONST_ME_ENERGYHIT, target = true }, -- energy damage { name = "condition", type = CONDITION_ENERGY, interval = 2000, chance = 20, minDamage = -300, maxDamage = -600, range = 6, radius = 4, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_PURPLEENERGY, target = true }, diff --git a/data-otservbr-global/monster/extra_dimensional/sparkion.lua b/data-otservbr-global/monster/extra_dimensional/sparkion.lua index f11b76bce6b..df175e251d9 100644 --- a/data-otservbr-global/monster/extra_dimensional/sparkion.lua +++ b/data-otservbr-global/monster/extra_dimensional/sparkion.lua @@ -105,7 +105,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400 }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -250, maxDamage = -400, length = 6, spread = 3, effect = CONST_ME_GROUNDSHAKER, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -250, maxDamage = -400, length = 6, spread = 1, effect = CONST_ME_GROUNDSHAKER, target = false }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -200, maxDamage = -400, range = 5, shootEffect = CONST_ANI_ENERGYBALL, effect = CONST_ME_ENERGYHIT, target = true }, -- energy damage { name = "condition", type = CONDITION_ENERGY, interval = 2000, chance = 20, minDamage = -300, maxDamage = -600, range = 6, radius = 4, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_PURPLEENERGY, target = true }, diff --git a/data-otservbr-global/monster/extra_dimensional/yielothax.lua b/data-otservbr-global/monster/extra_dimensional/yielothax.lua index 487a8d5c30d..0896666ebe3 100644 --- a/data-otservbr-global/monster/extra_dimensional/yielothax.lua +++ b/data-otservbr-global/monster/extra_dimensional/yielothax.lua @@ -104,10 +104,10 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 1000, chance = 100, minDamage = 0, maxDamage = -203 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -130, length = 4, spread = 3, effect = CONST_ME_ENERGYAREA, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -130, length = 4, spread = 1, effect = CONST_ME_ENERGYAREA, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -150, maxDamage = -250, radius = 3, effect = CONST_ME_HITBYPOISON, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -70, maxDamage = -120, radius = 3, effect = CONST_ME_HITBYPOISON, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -50, maxDamage = -150, length = 4, spread = 3, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -50, maxDamage = -150, length = 4, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/familiars/druid_familiar.lua b/data-otservbr-global/monster/familiars/druid_familiar.lua index 4e3861b5ba8..3531af0921b 100644 --- a/data-otservbr-global/monster/familiars/druid_familiar.lua +++ b/data-otservbr-global/monster/familiars/druid_familiar.lua @@ -68,7 +68,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -300 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -230, maxDamage = -260, range = 5, shootEffect = CONST_ANI_EARTH, effect = CONST_ME_STONES, target = true }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_EARTHDAMAGE, minDamage = -90, maxDamage = -150, length = 2, spread = 0, effect = CONST_ME_GROUNDSHAKER, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_EARTHDAMAGE, minDamage = -90, maxDamage = -150, length = 2, spread = 1, effect = CONST_ME_GROUNDSHAKER, target = false }, { name = "summon challenge", interval = 2000, chance = 40, target = false }, } diff --git a/data-otservbr-global/monster/familiars/sorcerer_familiar.lua b/data-otservbr-global/monster/familiars/sorcerer_familiar.lua index b4685c8763c..5c0463674f8 100644 --- a/data-otservbr-global/monster/familiars/sorcerer_familiar.lua +++ b/data-otservbr-global/monster/familiars/sorcerer_familiar.lua @@ -67,8 +67,8 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -280 }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_LIFEDRAIN, minDamage = -90, maxDamage = -150, length = 2, spread = 0, target = false }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -190, maxDamage = -210, length = 2, spread = 0, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_LIFEDRAIN, minDamage = -90, maxDamage = -150, length = 2, spread = 1, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -190, maxDamage = -210, length = 2, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, { name = "summon challenge", interval = 2000, chance = 40, target = false }, } diff --git a/data-otservbr-global/monster/fey/arctic_faun.lua b/data-otservbr-global/monster/fey/arctic_faun.lua index 89eb567738c..28970675211 100644 --- a/data-otservbr-global/monster/fey/arctic_faun.lua +++ b/data-otservbr-global/monster/fey/arctic_faun.lua @@ -101,7 +101,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/giants/ogre_shaman.lua b/data-otservbr-global/monster/giants/ogre_shaman.lua index 332230e478f..6e185f36aae 100644 --- a/data-otservbr-global/monster/giants/ogre_shaman.lua +++ b/data-otservbr-global/monster/giants/ogre_shaman.lua @@ -114,7 +114,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -269, condition = { type = CONDITION_FIRE, totalDamage = 6, interval = 9000 } }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -70, maxDamage = -180, range = 7, shootEffect = CONST_ANI_POISON, target = false }, { name = "outfit", interval = 2000, chance = 8, range = 7, effect = CONST_ME_MAGIC_BLUE, target = false, duration = 4000, outfitMonster = "chicken" }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -15, maxDamage = -120, length = 8, spread = 3, effect = CONST_ME_CARNIPHILA, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -15, maxDamage = -120, length = 8, spread = 1, effect = CONST_ME_CARNIPHILA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/humanoids/broken_shaper.lua b/data-otservbr-global/monster/humanoids/broken_shaper.lua index a829ba02969..cefb789bb57 100644 --- a/data-otservbr-global/monster/humanoids/broken_shaper.lua +++ b/data-otservbr-global/monster/humanoids/broken_shaper.lua @@ -105,7 +105,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 2000, chance = 35, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -150, range = 7, shootEffect = CONST_ANI_SMALLSTONE, target = true }, - { name = "combat", interval = 2000, chance = 35, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -100, length = 5, spread = 3, effect = CONST_ME_SOUND_RED, target = false }, + { name = "combat", interval = 2000, chance = 35, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -100, length = 5, spread = 1, effect = CONST_ME_SOUND_RED, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/humanoids/crazed_summer_vanguard.lua b/data-otservbr-global/monster/humanoids/crazed_summer_vanguard.lua index 8c9e3f361fc..e3e334fc775 100644 --- a/data-otservbr-global/monster/humanoids/crazed_summer_vanguard.lua +++ b/data-otservbr-global/monster/humanoids/crazed_summer_vanguard.lua @@ -96,11 +96,12 @@ monster.loot = { } monster.attacks = { - { name = "melee", interval = 2000, chance = 100, minDamage = -160, maxDamage = -530 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -270, maxDamage = -710, length = 3, spread = 0, effect = CONST_ME_FIREAREA, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -250, maxDamage = -300, range = 7, shootEffect = CONST_ANI_FIRE, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -350, maxDamage = -380, radius = 5, effect = CONST_ME_EXPLOSIONHIT, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -200, maxDamage = -350, radius = 5, effect = CONST_ME_EXPLOSIONAREA, target = true }, + { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -450 }, + { name = "combat", interval = 2500, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -300, length = 3, spread = 1, effect = CONST_ME_FIREAREA, target = false }, + { name = "combat", interval = 3000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -300, radius = 1, effect = CONST_ME_FIREAREA, target = false }, + { name = "combat", interval = 3500, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -250, maxDamage = -300, range = 7, shootEffect = CONST_ANI_FIRE, target = false }, + { name = "combat", interval = 4000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -300, radius = 3, effect = CONST_ME_EXPLOSIONHIT, target = true }, + { name = "sparks chain", interval = 4500, chance = 20, minDamage = -100, maxDamage = -250, range = 3, target = true }, } monster.defenses = { diff --git a/data-otservbr-global/monster/humanoids/crazed_winter_rearguard.lua b/data-otservbr-global/monster/humanoids/crazed_winter_rearguard.lua index 17fce82c98e..696c3535b01 100644 --- a/data-otservbr-global/monster/humanoids/crazed_winter_rearguard.lua +++ b/data-otservbr-global/monster/humanoids/crazed_winter_rearguard.lua @@ -99,9 +99,10 @@ monster.loot = { } monster.attacks = { - { name = "melee", interval = 2000, chance = 100, minDamage = -110, maxDamage = -400 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_ICEDAMAGE, minDamage = -200, maxDamage = -300, radius = 3, effect = CONST_ME_ICEAREA, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_ICEDAMAGE, minDamage = -250, maxDamage = -300, range = 7, shootEffect = CONST_ANI_ICE, target = false }, + { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400 }, + { name = "combat", interval = 2500, chance = 20, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -300, range = 5, radius = 1, effect = CONST_ME_ICEAREA, target = true }, + { name = "combat", interval = 3000, chance = 25, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -300, length = 4, spread = 1, effect = CONST_ME_GIANTICE, target = false }, + { name = "combat", interval = 3500, chance = 25, type = COMBAT_ICEDAMAGE, minDamage = -250, maxDamage = -300, radius = 3, effect = CONST_ME_ICEAREA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/humanoids/crazed_winter_vanguard.lua b/data-otservbr-global/monster/humanoids/crazed_winter_vanguard.lua index b324bd32223..be072031382 100644 --- a/data-otservbr-global/monster/humanoids/crazed_winter_vanguard.lua +++ b/data-otservbr-global/monster/humanoids/crazed_winter_vanguard.lua @@ -95,10 +95,10 @@ monster.loot = { } monster.attacks = { - { name = "melee", interval = 2000, chance = 100, minDamage = -150, maxDamage = -400 }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_ICEDAMAGE, minDamage = -200, maxDamage = -300, radius = 5, effect = CONST_ME_ICEAREA, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_ICEDAMAGE, minDamage = -240, maxDamage = -300, length = 4, spread = 3, effect = CONST_ME_GIANTICE, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_ICEDAMAGE, minDamage = -250, maxDamage = -300, range = 7, shootEffect = CONST_ANI_ICE, target = false }, + { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400 }, + { name = "combat", interval = 2500, chance = 30, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -300, range = 5, radius = 1, effect = CONST_ME_ICEAREA, target = true }, + { name = "combat", interval = 3000, chance = 20, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -300, length = 4, spread = 1, effect = CONST_ME_GIANTICE, target = false }, + { name = "combat", interval = 3500, chance = 20, type = COMBAT_ICEDAMAGE, minDamage = -250, maxDamage = -300, radius = 3, effect = CONST_ME_ICEAREA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/humanoids/insane_siren.lua b/data-otservbr-global/monster/humanoids/insane_siren.lua index 1ded28143d0..3df81ea68f4 100644 --- a/data-otservbr-global/monster/humanoids/insane_siren.lua +++ b/data-otservbr-global/monster/humanoids/insane_siren.lua @@ -94,11 +94,14 @@ monster.loot = { } monster.attacks = { - { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -530 }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -270, maxDamage = -710, length = 3, spread = 0, effect = CONST_ME_FIREAREA, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -250, maxDamage = -300, range = 7, shootEffect = CONST_ANI_FIRE, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -350, maxDamage = -380, radius = 5, effect = CONST_ME_EXPLOSIONHIT, target = true }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -200, maxDamage = -350, radius = 5, effect = CONST_ME_EXPLOSIONAREA, target = true }, + { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -450 }, + { name = "combat", interval = 2300, chance = 17, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -300, length = 3, spread = 1, effect = CONST_ME_FIREAREA, target = false }, + { name = "combat", interval = 2600, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -300, radius = 1, effect = CONST_ME_FIREAREA, target = false }, + { name = "combat", interval = 2900, chance = 17, type = COMBAT_FIREDAMAGE, minDamage = -250, maxDamage = -300, range = 7, shootEffect = CONST_ANI_FIRE, target = false }, + { name = "combat", interval = 3200, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -300, radius = 3, effect = CONST_ME_EXPLOSIONHIT, target = true }, + { name = "combat", interval = 3500, chance = 17, type = COMBAT_FIREDAMAGE, minDamage = -150, maxDamage = -300, range = 6, effect = CONST_ME_FIREATTACK, target = true }, + { name = "combat", interval = 3800, chance = 17, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -300, range = 6, radius = 2, effect = CONST_ME_FIREAREA, target = true }, + { name = "sparks chain", interval = 4100, chance = 17, minDamage = -100, maxDamage = -200, range = 3, target = true }, } monster.defenses = { diff --git a/data-otservbr-global/monster/humanoids/lost_exile.lua b/data-otservbr-global/monster/humanoids/lost_exile.lua index d1bb52aaa09..d1eeeea20ae 100644 --- a/data-otservbr-global/monster/humanoids/lost_exile.lua +++ b/data-otservbr-global/monster/humanoids/lost_exile.lua @@ -114,7 +114,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -120 }, - { name = "sudden death rune", interval = 2000, chance = 15, minDamage = -150, maxDamage = -350, range = 3, length = 6, spread = 3, effect = CONST_ME_MORTAREA, target = false }, + { name = "sudden death rune", interval = 2000, chance = 15, minDamage = -150, maxDamage = -350, range = 3, length = 6, spread = 1, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_MANADRAIN, minDamage = -150, maxDamage = -250, range = 3, length = 5, spread = 5, effect = CONST_ME_SMOKE, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -150, maxDamage = -290, range = 3, length = 5, spread = 5, shootEffect = CONST_ANI_LARGEROCK, effect = CONST_ME_POISONAREA, target = false }, { name = "sudden death rune", interval = 2000, chance = 15, minDamage = -70, maxDamage = -250, range = 7, target = false }, diff --git a/data-otservbr-global/monster/humanoids/lost_husher.lua b/data-otservbr-global/monster/humanoids/lost_husher.lua index 6961a18cde7..e62611fff84 100644 --- a/data-otservbr-global/monster/humanoids/lost_husher.lua +++ b/data-otservbr-global/monster/humanoids/lost_husher.lua @@ -102,7 +102,7 @@ monster.loot = { } monster.attacks = { - { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -150, maxDamage = -300, length = 6, spread = 3, effect = CONST_ME_BLACKSMOKE, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -150, maxDamage = -300, length = 6, spread = 1, effect = CONST_ME_BLACKSMOKE, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -150, maxDamage = -250, radius = 5, effect = CONST_ME_BLACKSMOKE, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -150, maxDamage = -200, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -150, maxDamage = -250, range = 7, radius = 2, shootEffect = CONST_ANI_SMALLEARTH, effect = CONST_ME_MAGIC_GREEN, target = true }, diff --git a/data-otservbr-global/monster/humanoids/minotaur_amazon.lua b/data-otservbr-global/monster/humanoids/minotaur_amazon.lua index 2eb8043163f..5fae57a6df1 100644 --- a/data-otservbr-global/monster/humanoids/minotaur_amazon.lua +++ b/data-otservbr-global/monster/humanoids/minotaur_amazon.lua @@ -104,7 +104,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 50, attack = 50 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -50, maxDamage = -305, length = 8, spread = 3, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -50, maxDamage = -305, length = 8, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, { name = "combat", interval = 2000, chance = 16, type = COMBAT_LIFEDRAIN, minDamage = -50, maxDamage = -150, radius = 4, effect = CONST_ME_MAGIC_RED, target = false }, { name = "combat", interval = 2000, chance = 22, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -150, range = 7, shootEffect = CONST_ANI_HUNTINGSPEAR, effect = CONST_ME_EXPLOSIONAREA, target = false }, -- bleed diff --git a/data-otservbr-global/monster/humanoids/mooh'tah_warrior.lua b/data-otservbr-global/monster/humanoids/mooh'tah_warrior.lua index ada61e26268..6efa23ca5dc 100644 --- a/data-otservbr-global/monster/humanoids/mooh'tah_warrior.lua +++ b/data-otservbr-global/monster/humanoids/mooh'tah_warrior.lua @@ -99,7 +99,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 45, attack = 80 }, - { name = "combat", interval = 2000, chance = 14, type = COMBAT_ENERGYDAMAGE, minDamage = -150, maxDamage = -200, length = 4, spread = 3, effect = CONST_ME_YELLOWENERGY, target = false }, + { name = "combat", interval = 2000, chance = 14, type = COMBAT_ENERGYDAMAGE, minDamage = -150, maxDamage = -200, length = 4, spread = 1, effect = CONST_ME_YELLOWENERGY, target = false }, { name = "combat", interval = 2000, chance = 11, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -135, range = 7, shootEffect = CONST_ANI_LARGEROCK, effect = CONST_ME_EXPLOSIONAREA, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -50, maxDamage = -150, radius = 3, effect = CONST_ME_HITAREA, target = false }, { name = "mooh'tah master skill reducer", interval = 2000, chance = 19, range = 7, target = false }, diff --git a/data-otservbr-global/monster/humanoids/moohtant.lua b/data-otservbr-global/monster/humanoids/moohtant.lua index dc730c4f488..f871a077ed8 100644 --- a/data-otservbr-global/monster/humanoids/moohtant.lua +++ b/data-otservbr-global/monster/humanoids/moohtant.lua @@ -96,7 +96,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 110, attack = 50 }, - { name = "combat", interval = 2000, chance = 13, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -230, length = 3, spread = 0, effect = CONST_ME_GROUNDSHAKER, target = false }, + { name = "combat", interval = 2000, chance = 13, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -230, length = 3, spread = 1, effect = CONST_ME_GROUNDSHAKER, target = false }, { name = "combat", interval = 2000, chance = 12, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -200, radius = 3, effect = CONST_ME_GROUNDSHAKER, target = false }, { name = "combat", interval = 2000, chance = 19, type = COMBAT_LIFEDRAIN, minDamage = -50, maxDamage = -225, radius = 5, effect = CONST_ME_MAGIC_RED, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -150, maxDamage = -235, range = 7, radius = 4, shootEffect = CONST_ANI_LARGEROCK, effect = CONST_ME_EXPLOSIONAREA, target = true }, diff --git a/data-otservbr-global/monster/humanoids/soul-broken_harbinger.lua b/data-otservbr-global/monster/humanoids/soul-broken_harbinger.lua index d07eae7ff16..845a3419548 100644 --- a/data-otservbr-global/monster/humanoids/soul-broken_harbinger.lua +++ b/data-otservbr-global/monster/humanoids/soul-broken_harbinger.lua @@ -93,8 +93,10 @@ monster.loot = { } monster.attacks = { - { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -240 }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -120, range = 7, shootEffect = CONST_ANI_ARROW, target = false }, + { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400 }, + { name = "combat", interval = 2100, chance = 40, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -300, range = 5, radius = 1, effect = CONST_ME_ICEAREA, target = true }, + { name = "combat", interval = 2600, chance = 30, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -300, length = 4, spread = 1, effect = CONST_ME_GIANTICE, target = false }, + { name = "combat", interval = 3100, chance = 20, type = COMBAT_ICEDAMAGE, minDamage = -250, maxDamage = -300, radius = 3, effect = CONST_ME_ICEAREA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/humanoids/twisted_shaper.lua b/data-otservbr-global/monster/humanoids/twisted_shaper.lua index 63540262085..c5f6f7fecb9 100644 --- a/data-otservbr-global/monster/humanoids/twisted_shaper.lua +++ b/data-otservbr-global/monster/humanoids/twisted_shaper.lua @@ -98,7 +98,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = -50, maxDamage = -100, range = 7, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_ENERGYHIT, target = true }, - { name = "combat", interval = 2000, chance = 35, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -100, length = 5, spread = 3, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 35, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -100, length = 5, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -50, maxDamage = -100, radius = 7, effect = CONST_ME_MAGIC_BLUE, target = false }, { name = "speed", interval = 2000, chance = 9, speedChange = -440, effect = CONST_ME_GIANTICE, target = true, duration = 7000 }, } diff --git a/data-otservbr-global/monster/humans/blood_priest.lua b/data-otservbr-global/monster/humans/blood_priest.lua index 26aec7facee..822d15b06e1 100644 --- a/data-otservbr-global/monster/humans/blood_priest.lua +++ b/data-otservbr-global/monster/humans/blood_priest.lua @@ -100,7 +100,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -80, condition = { type = CONDITION_POISON, totalDamage = 100, interval = 4000 } }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -60, maxDamage = -100, range = 7, shootEffect = CONST_ANI_DEATH, effect = CONST_ME_SMALLCLOUDS, target = true }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -40, maxDamage = -60, radius = 4, effect = CONST_ME_MAGIC_RED, target = false }, - { name = "combat", interval = 3000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -80, maxDamage = -130, range = 1, length = 7, spread = 3, effect = CONST_ME_HITAREA, target = true }, + { name = "combat", interval = 3000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -80, maxDamage = -130, range = 1, length = 7, spread = 1, effect = CONST_ME_HITAREA, target = true }, -- bleed { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 5, minDamage = -160, maxDamage = -290, range = 1, radius = 1, target = true }, } diff --git a/data-otservbr-global/monster/humans/burning_gladiator.lua b/data-otservbr-global/monster/humans/burning_gladiator.lua index 8923d0928cb..a14d8061470 100644 --- a/data-otservbr-global/monster/humans/burning_gladiator.lua +++ b/data-otservbr-global/monster/humans/burning_gladiator.lua @@ -108,7 +108,7 @@ monster.attacks = { { name = "firering", interval = 2000, chance = 10, minDamage = -300, maxDamage = -500, target = false }, { name = "firex", interval = 2000, chance = 15, minDamage = -300, maxDamage = -500, target = false }, { name = "combat", interval = 2000, chance = 17, type = COMBAT_FIREDAMAGE, minDamage = -300, maxDamage = -500, radius = 2, effect = CONST_ME_FIREATTACK, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -500, length = 3, spread = 0, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -500, length = 3, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/humans/hardened_usurper_knight.lua b/data-otservbr-global/monster/humans/hardened_usurper_knight.lua index 341b85f2de2..3bb4fb98b6d 100644 --- a/data-otservbr-global/monster/humans/hardened_usurper_knight.lua +++ b/data-otservbr-global/monster/humans/hardened_usurper_knight.lua @@ -67,7 +67,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -500, effect = CONST_ME_DRAWBLOOD }, { name = "combat", interval = 6000, chance = 9, type = COMBAT_DEATHDAMAGE, minDamage = -150, maxDamage = -300, radius = 3, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 6000, chance = 13, type = COMBAT_ICEDAMAGE, minDamage = -150, maxDamage = -400, length = 4, spread = 0, effect = CONST_ME_ICEATTACK, target = false }, + { name = "combat", interval = 6000, chance = 13, type = COMBAT_ICEDAMAGE, minDamage = -150, maxDamage = -400, length = 4, spread = 1, effect = CONST_ME_ICEATTACK, target = false }, { name = "singlecloudchain", interval = 8000, chance = 12, minDamage = -200, maxDamage = -450, range = 4, effect = CONST_ME_ENERGYHIT, target = true }, } diff --git a/data-otservbr-global/monster/humans/hulking_carnisylvan.lua b/data-otservbr-global/monster/humans/hulking_carnisylvan.lua index 46cd198afc0..27585b39b85 100644 --- a/data-otservbr-global/monster/humans/hulking_carnisylvan.lua +++ b/data-otservbr-global/monster/humans/hulking_carnisylvan.lua @@ -93,7 +93,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -300 }, { name = "combat", interval = 2000, chance = 60, type = COMBAT_EARTHDAMAGE, minDamage = -350, maxDamage = -450, range = 5, shootEffect = CONST_ANI_SMALLEARTH, effect = CONST_ME_POISONAREA, target = true }, { name = "combat", interval = 2000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -600, maxDamage = -800, radius = 4, effect = CONST_ME_EXPLOSIONHIT, target = false }, - { name = "combat", interval = 2000, chance = 30, type = COMBAT_PHYSICALDAMAGE, minDamage = -350, maxDamage = -400, length = 4, spread = 0, effect = CONST_ME_EXPLOSIONHIT, target = false }, + { name = "combat", interval = 2000, chance = 30, type = COMBAT_PHYSICALDAMAGE, minDamage = -350, maxDamage = -400, length = 4, spread = 1, effect = CONST_ME_EXPLOSIONHIT, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/humans/infernalist.lua b/data-otservbr-global/monster/humans/infernalist.lua index d662f5fa270..c1df6e1d267 100644 --- a/data-otservbr-global/monster/humans/infernalist.lua +++ b/data-otservbr-global/monster/humans/infernalist.lua @@ -110,7 +110,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -90, maxDamage = -180, range = 7, radius = 3, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_MANADRAIN, minDamage = -53, maxDamage = -120, range = 7, radius = 3, shootEffect = CONST_ANI_ENERGYBALL, effect = CONST_ME_TELEPORT, target = true }, { name = "firefield", interval = 2000, chance = 15, range = 7, radius = 3, shootEffect = CONST_ANI_FIRE, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -150, maxDamage = -250, length = 8, spread = 3, effect = CONST_ME_FIREATTACK, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -150, maxDamage = -250, length = 8, spread = 1, effect = CONST_ME_FIREATTACK, target = false }, { name = "combat", interval = 2000, chance = 5, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -150, radius = 2, effect = CONST_ME_EXPLOSIONAREA, target = false }, } diff --git a/data-otservbr-global/monster/humans/usurper_knight.lua b/data-otservbr-global/monster/humans/usurper_knight.lua index 7116b67fbfa..52f737e675a 100644 --- a/data-otservbr-global/monster/humans/usurper_knight.lua +++ b/data-otservbr-global/monster/humans/usurper_knight.lua @@ -96,7 +96,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -500, effect = CONST_ME_DRAWBLOOD }, { name = "combat", interval = 6000, chance = 14, type = COMBAT_DEATHDAMAGE, minDamage = -150, maxDamage = -300, radius = 3, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 6000, chance = 20, type = COMBAT_ICEDAMAGE, minDamage = -150, maxDamage = -400, length = 4, spread = 0, effect = CONST_ME_ICEATTACK, target = false }, + { name = "combat", interval = 6000, chance = 20, type = COMBAT_ICEDAMAGE, minDamage = -150, maxDamage = -400, length = 4, spread = 1, effect = CONST_ME_ICEATTACK, target = false }, { name = "singlecloudchain", interval = 8000, chance = 17, minDamage = -200, maxDamage = -450, range = 4, effect = CONST_ME_ENERGYHIT, target = true }, } diff --git a/data-otservbr-global/monster/humans/warlock.lua b/data-otservbr-global/monster/humans/warlock.lua index 6e09184297b..2f3def2a200 100644 --- a/data-otservbr-global/monster/humans/warlock.lua +++ b/data-otservbr-global/monster/humans/warlock.lua @@ -118,7 +118,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = 0, maxDamage = -120, range = 7, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -50, maxDamage = -180, range = 7, radius = 3, shootEffect = CONST_ANI_BURSTARROW, effect = CONST_ME_FIREAREA, target = true }, { name = "firefield", interval = 2000, chance = 10, range = 7, radius = 2, shootEffect = CONST_ANI_FIRE, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -150, maxDamage = -230, length = 8, spread = 3, effect = CONST_ME_BIGCLOUDS, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -150, maxDamage = -230, length = 8, spread = 1, effect = CONST_ME_BIGCLOUDS, target = false }, { name = "speed", interval = 2000, chance = 15, speedChange = -600, range = 7, effect = CONST_ME_MAGIC_RED, target = false, duration = 20000 }, } diff --git a/data-otservbr-global/monster/lycanthropes/werebadger.lua b/data-otservbr-global/monster/lycanthropes/werebadger.lua index 1f8243b9520..1e052aed9e9 100644 --- a/data-otservbr-global/monster/lycanthropes/werebadger.lua +++ b/data-otservbr-global/monster/lycanthropes/werebadger.lua @@ -101,7 +101,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 50, attack = 60, condition = { type = CONDITION_POISON, totalDamage = 140, interval = 4000 } }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -21, maxDamage = -150, range = 7, shootEffect = CONST_ANI_EARTH, effect = CONST_ME_CARNIPHILA, target = true }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -10, maxDamage = -100, length = 8, spread = 3, effect = CONST_ME_CARNIPHILA, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -10, maxDamage = -100, length = 8, spread = 1, effect = CONST_ME_CARNIPHILA, target = false }, { name = "speed", interval = 4000, chance = 20, radius = 7, effect = CONST_ME_POFF, target = true }, } diff --git a/data-otservbr-global/monster/lycanthropes/werefox.lua b/data-otservbr-global/monster/lycanthropes/werefox.lua index 81905188e30..fff16330124 100644 --- a/data-otservbr-global/monster/lycanthropes/werefox.lua +++ b/data-otservbr-global/monster/lycanthropes/werefox.lua @@ -107,7 +107,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -290 }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -200, shootEffect = CONST_ANI_GREENSTAR, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -225, range = 7, radius = 4, effect = CONST_ME_MAGIC_RED, target = true }, - { name = "combat", interval = 2000, chance = 14, type = COMBAT_DEATHDAMAGE, minDamage = -100, maxDamage = -700, length = 5, spread = 3, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 14, type = COMBAT_DEATHDAMAGE, minDamage = -100, maxDamage = -700, length = 5, spread = 1, effect = CONST_ME_MORTAREA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/lycanthropes/werehyaena.lua b/data-otservbr-global/monster/lycanthropes/werehyaena.lua index 62a890f771f..e55cf22d9a5 100644 --- a/data-otservbr-global/monster/lycanthropes/werehyaena.lua +++ b/data-otservbr-global/monster/lycanthropes/werehyaena.lua @@ -97,7 +97,7 @@ monster.attacks = { { name = "melee", type = COMBAT_PHYSICALDAMAGE, interval = 2 * 1000, minDamage = 0, maxDamage = -300 }, { name = "combat", type = COMBAT_EARTHDAMAGE, interval = 2 * 1000, chance = 17, minDamage = -175, maxDamage = -255, radius = 3, effect = CONST_ME_HITBYPOISON }, { name = "combat", type = COMBAT_DEATHDAMAGE, interval = 2 * 1000, chance = 15, minDamage = -330, maxDamage = -370, target = true, range = 5, radius = 1, shootEffect = CONST_ANI_LARGEROCK, effect = CONST_ME_MORTAREA }, - { name = "combat", type = COMBAT_DEATHDAMAGE, interval = 2 * 1000, chance = 13, minDamage = -225, maxDamage = -275, length = 3, spread = 0, effect = CONST_ME_MORTAREA }, + { name = "combat", type = COMBAT_DEATHDAMAGE, interval = 2 * 1000, chance = 13, minDamage = -225, maxDamage = -275, length = 3, spread = 1, effect = CONST_ME_MORTAREA }, } monster.defenses = { diff --git a/data-otservbr-global/monster/lycanthropes/werehyaena_shaman.lua b/data-otservbr-global/monster/lycanthropes/werehyaena_shaman.lua index 184a4c56e05..6cb0c872167 100644 --- a/data-otservbr-global/monster/lycanthropes/werehyaena_shaman.lua +++ b/data-otservbr-global/monster/lycanthropes/werehyaena_shaman.lua @@ -96,7 +96,7 @@ monster.attacks = { { name = "combat", type = COMBAT_DEATHDAMAGE, interval = 2 * 1000, chance = 10, minDamage = -280, maxDamage = -325, radius = 3, effect = CONST_ME_HITBYPOISON }, { name = "combat", type = COMBAT_EARTHDAMAGE, interval = 2 * 1000, chance = 17, minDamage = -280, maxDamage = -315, range = 5, radius = 4, target = true, shootEffect = CONST_ANI_EARTH, effect = CONST_ME_GREEN_RINGS }, { name = "combat", type = COMBAT_DEATHDAMAGE, interval = 2 * 1000, chance = 15, minDamage = -370, maxDamage = -430, range = 5, radius = 1, target = true, shootEffect = CONST_ANI_DEATH, effect = CONST_ME_MORTAREA }, - { name = "combat", type = COMBAT_DEATHDAMAGE, interval = 2 * 1000, chance = 13, minDamage = -280, maxDamage = -325, length = 3, spread = 0, effect = CONST_ME_MORTAREA }, + { name = "combat", type = COMBAT_DEATHDAMAGE, interval = 2 * 1000, chance = 13, minDamage = -280, maxDamage = -325, length = 3, spread = 1, effect = CONST_ME_MORTAREA }, } monster.defenses = { diff --git a/data-otservbr-global/monster/magicals/bashmu.lua b/data-otservbr-global/monster/magicals/bashmu.lua index 31be5b2a61d..04c27209288 100644 --- a/data-otservbr-global/monster/magicals/bashmu.lua +++ b/data-otservbr-global/monster/magicals/bashmu.lua @@ -97,7 +97,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -600 }, - { name = "combat", interval = 2000, chance = 50, type = COMBAT_ENERGYDAMAGE, minDamage = -400, maxDamage = -800, length = 4, spread = 0, effect = CONST_ME_ENERGYAREA, target = false }, + { name = "combat", interval = 2000, chance = 50, type = COMBAT_ENERGYDAMAGE, minDamage = -400, maxDamage = -800, length = 4, spread = 1, effect = CONST_ME_ENERGYAREA, target = false }, { name = "combat", interval = 2000, chance = 40, type = COMBAT_ENERGYDAMAGE, minDamage = -400, maxDamage = -500, range = 3, radius = 3, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -400, maxDamage = -800, range = 7, shootEffect = CONST_ANI_EARTHARROW, target = true }, } diff --git a/data-otservbr-global/monster/magicals/burning_book.lua b/data-otservbr-global/monster/magicals/burning_book.lua index ce7ceac08f7..2edca67ee46 100644 --- a/data-otservbr-global/monster/magicals/burning_book.lua +++ b/data-otservbr-global/monster/magicals/burning_book.lua @@ -94,7 +94,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -200, maxDamage = -700 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -500, maxDamage = -780, range = 7, shootEffect = CONST_ANI_FLAMMINGARROW, effect = CONST_ME_HITBYFIRE, target = false }, { name = "combat", interval = 1500, chance = 12, type = COMBAT_PHYSICALDAMAGE, minDamage = -500, maxDamage = -900, radius = 3, effect = CONST_ME_EXPLOSIONAREA, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -400, maxDamage = -850, length = 5, spread = 3, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -400, maxDamage = -850, length = 5, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, { name = "combat", interval = 2000, chance = 12, type = COMBAT_FIREDAMAGE, minDamage = -400, maxDamage = -775, radius = 3, effect = CONST_ME_HITBYFIRE, target = false }, } diff --git a/data-otservbr-global/monster/magicals/choking_fear.lua b/data-otservbr-global/monster/magicals/choking_fear.lua index 4cfa9bb0b37..9b0ddc1f49b 100644 --- a/data-otservbr-global/monster/magicals/choking_fear.lua +++ b/data-otservbr-global/monster/magicals/choking_fear.lua @@ -107,7 +107,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -499, condition = { type = CONDITION_POISON, totalDamage = 600, interval = 4000 } }, -- poison - { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -700, maxDamage = -900, length = 5, spread = 3, effect = CONST_ME_HITBYPOISON, target = false }, + { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -700, maxDamage = -900, length = 5, spread = 1, effect = CONST_ME_HITBYPOISON, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -300, radius = 1, shootEffect = CONST_ANI_EXPLOSION, effect = CONST_ME_SLEEP, target = true }, { name = "speed", interval = 2000, chance = 20, speedChange = -800, radius = 1, shootEffect = CONST_ANI_EXPLOSION, effect = CONST_ME_SLEEP, target = true, duration = 15000 }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -130, maxDamage = -300, radius = 4, effect = CONST_ME_SOUND_RED, target = false }, diff --git a/data-otservbr-global/monster/magicals/crypt_warden.lua b/data-otservbr-global/monster/magicals/crypt_warden.lua index 1b5fd2a9adb..b5b319728ab 100644 --- a/data-otservbr-global/monster/magicals/crypt_warden.lua +++ b/data-otservbr-global/monster/magicals/crypt_warden.lua @@ -95,7 +95,7 @@ monster.attacks = { { name = "warden x", interval = 2000, chance = 15, minDamage = -250, maxDamage = -430, target = false }, { name = "warden ring", interval = 2000, chance = 8, minDamage = -250, maxDamage = -380, target = false }, { name = "combat", interval = 2000, chance = 12, type = COMBAT_EARTHDAMAGE, minDamage = -200, maxDamage = -480, radius = 2, effect = CONST_ME_GROUNDSHAKER, target = false }, - { name = "combat", interval = 2000, chance = 13, type = COMBAT_HOLYDAMAGE, minDamage = -300, maxDamage = -450, length = 5, spread = 3, effect = CONST_ME_HOLYAREA, target = false }, + { name = "combat", interval = 2000, chance = 13, type = COMBAT_HOLYDAMAGE, minDamage = -300, maxDamage = -450, length = 5, spread = 1, effect = CONST_ME_HOLYAREA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/magicals/cursed_book.lua b/data-otservbr-global/monster/magicals/cursed_book.lua index 3066f09a9d6..f9a517b03a2 100644 --- a/data-otservbr-global/monster/magicals/cursed_book.lua +++ b/data-otservbr-global/monster/magicals/cursed_book.lua @@ -95,7 +95,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -400, maxDamage = -680, range = 7, shootEffect = CONST_ANI_EARTHARROW, target = false }, - { name = "combat", interval = 1000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -400, maxDamage = -575, length = 5, spread = 3, effect = CONST_ME_POISONAREA, target = false }, + { name = "combat", interval = 1000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -400, maxDamage = -575, length = 5, spread = 1, effect = CONST_ME_POISONAREA, target = false }, { name = "combat", interval = 1000, chance = 12, type = COMBAT_PHYSICALDAMAGE, minDamage = -230, maxDamage = -880, range = 7, radius = 3, effect = CONST_ME_GROUNDSHAKER, target = false }, } diff --git a/data-otservbr-global/monster/magicals/energetic_book.lua b/data-otservbr-global/monster/magicals/energetic_book.lua index 1412e998bd2..782bb395081 100644 --- a/data-otservbr-global/monster/magicals/energetic_book.lua +++ b/data-otservbr-global/monster/magicals/energetic_book.lua @@ -96,7 +96,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -200 }, { name = "combat", interval = 2000, chance = 14, type = COMBAT_ENERGYDAMAGE, minDamage = -200, maxDamage = -680, range = 7, shootEffect = CONST_ANI_ENERGY, target = false }, { name = "combat", interval = 2000, chance = 40, type = COMBAT_ENERGYDAMAGE, minDamage = -200, maxDamage = -505, radius = 3, effect = CONST_ME_ENERGYAREA, target = false }, - { name = "combat", interval = 1500, chance = 30, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -700, length = 8, spread = 3, effect = CONST_ME_STUN, target = false }, + { name = "combat", interval = 1500, chance = 30, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -700, length = 8, spread = 1, effect = CONST_ME_STUN, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/magicals/feral_sphinx.lua b/data-otservbr-global/monster/magicals/feral_sphinx.lua index bbcafcf1d9c..8f64bea4816 100644 --- a/data-otservbr-global/monster/magicals/feral_sphinx.lua +++ b/data-otservbr-global/monster/magicals/feral_sphinx.lua @@ -89,10 +89,10 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -450 }, - { name = "fire wave", interval = 2000, chance = 15, minDamage = -350, maxDamage = -500, length = 1, spread = 0, target = true }, - { name = "combat", interval = 2000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -500, radius = 4, effect = CONST_ME_ENERGYAREA, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -350, maxDamage = -550, range = 1, shootEffect = CONST_ANI_FIRE, target = false }, - { name = "combat", interval = 2000, chance = 8, type = COMBAT_HOLYDAMAGE, minDamage = -400, maxDamage = -580, length = 6, spread = 3, effect = CONST_ME_HOLYAREA, target = false }, + { name = "fire wave", interval = 2000, chance = 15, minDamage = -350, maxDamage = -500, length = 1, spread = 1, target = true }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -500, radius = 4, effect = CONST_ME_ENERGYAREA, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -350, maxDamage = -550, range = 1, shootEffect = CONST_ANI_FIRE, target = false }, + { name = "combat", interval = 2000, chance = 18, type = COMBAT_HOLYDAMAGE, minDamage = -400, maxDamage = -580, length = 6, spread = 3, effect = CONST_ME_HOLYAREA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/magicals/feversleep.lua b/data-otservbr-global/monster/magicals/feversleep.lua index c99daf92382..4da09ad0943 100644 --- a/data-otservbr-global/monster/magicals/feversleep.lua +++ b/data-otservbr-global/monster/magicals/feversleep.lua @@ -97,7 +97,7 @@ monster.attacks = { { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 20, minDamage = -800, maxDamage = -1000, radius = 7, effect = CONST_ME_YELLOW_RINGS, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -70, maxDamage = -100, radius = 5, effect = CONST_ME_MAGIC_RED, target = false }, { name = "feversleep skill reducer", interval = 2000, chance = 10, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -250, maxDamage = -300, length = 6, spread = 3, effect = CONST_ME_YELLOWENERGY, target = true }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -250, maxDamage = -300, length = 6, spread = 1, effect = CONST_ME_YELLOWENERGY, target = true }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_DEATHDAMAGE, minDamage = -150, maxDamage = -300, radius = 1, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = true }, } diff --git a/data-otservbr-global/monster/magicals/frazzlemaw.lua b/data-otservbr-global/monster/magicals/frazzlemaw.lua index 32a053b1dcc..d2a4334a0fb 100644 --- a/data-otservbr-global/monster/magicals/frazzlemaw.lua +++ b/data-otservbr-global/monster/magicals/frazzlemaw.lua @@ -119,7 +119,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400 }, -- bleed { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 10, minDamage = -300, maxDamage = -400, radius = 3, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -700, length = 5, spread = 3, effect = CONST_ME_EXPLOSIONAREA, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -700, length = 5, spread = 1, effect = CONST_ME_EXPLOSIONAREA, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -400, radius = 2, shootEffect = CONST_ANI_LARGEROCK, effect = CONST_ME_STONES, target = true }, { name = "speed", interval = 2000, chance = 15, speedChange = -600, radius = 5, effect = CONST_ME_MAGIC_RED, target = false, duration = 15000 }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -80, maxDamage = -150, radius = 4, effect = CONST_ME_MAGIC_RED, target = false }, diff --git a/data-otservbr-global/monster/magicals/gryphon.lua b/data-otservbr-global/monster/magicals/gryphon.lua index 39e919e600f..77830131175 100644 --- a/data-otservbr-global/monster/magicals/gryphon.lua +++ b/data-otservbr-global/monster/magicals/gryphon.lua @@ -77,7 +77,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = 350 }, { name = "combat", interval = 2000, chance = 13, type = COMBAT_HOLYDAMAGE, minDamage = -250, maxDamage = -450, radius = 3, effect = CONST_ME_HOLYAREA, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -200, maxDamage = -300, length = 3, spread = 0, effect = CONST_ME_HITBYFIRE, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -200, maxDamage = -300, length = 3, spread = 1, effect = CONST_ME_HITBYFIRE, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/magicals/guardian_of_tales.lua b/data-otservbr-global/monster/magicals/guardian_of_tales.lua index e34153ea79e..25c8556a77e 100644 --- a/data-otservbr-global/monster/magicals/guardian_of_tales.lua +++ b/data-otservbr-global/monster/magicals/guardian_of_tales.lua @@ -92,7 +92,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -200, maxDamage = -550 }, { name = "combat", interval = 2000, chance = 13, type = COMBAT_ENERGYDAMAGE, minDamage = -200, maxDamage = -605, radius = 3, effect = CONST_ME_ENERGYAREA, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -375, maxDamage = -500, length = 5, spread = 3, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -375, maxDamage = -500, length = 5, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, { name = "combat", interval = 2000, chance = 12, type = COMBAT_FIREDAMAGE, minDamage = -400, maxDamage = -775, radius = 3, effect = CONST_ME_HITBYFIRE, target = false }, } diff --git a/data-otservbr-global/monster/magicals/guzzlemaw.lua b/data-otservbr-global/monster/magicals/guzzlemaw.lua index 5f5aad15c41..9941e56d161 100644 --- a/data-otservbr-global/monster/magicals/guzzlemaw.lua +++ b/data-otservbr-global/monster/magicals/guzzlemaw.lua @@ -111,10 +111,10 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -499 }, -- bleed { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 10, minDamage = -500, maxDamage = -1000, radius = 3, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -900, length = 8, spread = 3, effect = CONST_ME_EXPLOSIONAREA, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -900, length = 8, spread = 1, effect = CONST_ME_EXPLOSIONAREA, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -500, radius = 2, shootEffect = CONST_ANI_LARGEROCK, effect = CONST_ME_STONES, target = true }, { name = "speed", interval = 2000, chance = 15, speedChange = -800, radius = 6, effect = CONST_ME_MAGIC_RED, target = false, duration = 15000 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -800, length = 8, spread = 3, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -800, length = 8, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/magicals/icecold_book.lua b/data-otservbr-global/monster/magicals/icecold_book.lua index 789cc58b3c2..e3acf422ef6 100644 --- a/data-otservbr-global/monster/magicals/icecold_book.lua +++ b/data-otservbr-global/monster/magicals/icecold_book.lua @@ -100,7 +100,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 10, type = COMBAT_ICEDAMAGE, minDamage = -700, maxDamage = -850, range = 7, shootEffect = CONST_ANI_SMALLICE, effect = CONST_ME_ICEATTACK, target = false }, { name = "combat", interval = 1000, chance = 10, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -380, range = 7, shootEffect = CONST_ANI_SMALLICE, effect = CONST_ME_ICEATTACK, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_ICEDAMAGE, minDamage = -350, maxDamage = -980, length = 5, spread = 3, shootEffect = CONST_ANI_SMALLICE, effect = CONST_ME_ICEATTACK, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_ICEDAMAGE, minDamage = -350, maxDamage = -980, length = 5, spread = 1, shootEffect = CONST_ANI_SMALLICE, effect = CONST_ME_ICEATTACK, target = false }, { name = "combat", interval = 1000, chance = 12, type = COMBAT_ICEDAMAGE, minDamage = -230, maxDamage = -880, range = 7, radius = 3, shootEffect = CONST_ANI_SMALLICE, effect = CONST_ME_ICETORNADO, target = false }, } diff --git a/data-otservbr-global/monster/magicals/juvenile_bashmu.lua b/data-otservbr-global/monster/magicals/juvenile_bashmu.lua index fe7bb499bb0..fa1e7f881f4 100644 --- a/data-otservbr-global/monster/magicals/juvenile_bashmu.lua +++ b/data-otservbr-global/monster/magicals/juvenile_bashmu.lua @@ -99,7 +99,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400 }, - { name = "combat", interval = 2000, chance = 50, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -400, length = 4, spread = 0, effect = CONST_ME_ENERGYAREA, target = false }, + { name = "combat", interval = 2000, chance = 50, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -400, length = 4, spread = 1, effect = CONST_ME_ENERGYAREA, target = false }, { name = "combat", interval = 2000, chance = 40, type = COMBAT_ENERGYDAMAGE, minDamage = -400, maxDamage = -500, range = 3, radius = 3, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -400, maxDamage = -500, range = 7, shootEffect = CONST_ANI_EARTHARROW, target = true }, } diff --git a/data-otservbr-global/monster/magicals/manticore.lua b/data-otservbr-global/monster/magicals/manticore.lua index 97eba9ff118..86c2b5810d3 100644 --- a/data-otservbr-global/monster/magicals/manticore.lua +++ b/data-otservbr-global/monster/magicals/manticore.lua @@ -75,17 +75,23 @@ monster.voices = { monster.loot = { { name = "platinum coin", chance = 100000, maxCount = 3 }, - { name = "flaming arrow", chance = 4090, maxCount = 11 }, - { name = "royal star", chance = 1120, maxCount = 4 }, - { name = "manticore tail", chance = 8550 }, - { name = "manticore ear", chance = 6690 }, - { name = "magma legs", chance = 740 }, - { name = "magma monocle", chance = 1860 }, - { name = "magma boots", chance = 370 }, - { name = "magma coat", chance = 2970 }, - { name = "wand of everblazing", chance = 1120 }, - { name = "wand of dragonbreath", chance = 740 }, - { name = "wand of draconia", chance = 370 }, + { name = "manticore tail", chance = 10250 }, + { name = "manticore ear", chance = 7390 }, + { name = "small emerald", chance = 5880 }, + { name = "green crystal fragment", chance = 5710 }, + { name = "flaming arrow", chance = 4870, maxCount = 9 }, + { name = "prismatic quartz", chance = 4370 }, + { name = "rainbow quartz", chance = 3700, maxCount = 3 }, + { name = "magma coat", chance = 3190 }, + { name = "violet gem", chance = 3030 }, + { name = "magma boots", chance = 2860 }, + { name = "magma monocle", chance = 2020 }, + { name = "wand of dragonbreath", chance = 1680 }, + { name = "wand of draconia", chance = 1180 }, + { name = "royal star", chance = 1010, maxCount = 3 }, + { name = "wand of everblazing", chance = 1010 }, + { name = "magma legs", chance = 340 }, + spread = 1, } monster.attacks = { diff --git a/data-otservbr-global/monster/magicals/medusa.lua b/data-otservbr-global/monster/magicals/medusa.lua index a828ace46eb..de4bf5139d2 100644 --- a/data-otservbr-global/monster/magicals/medusa.lua +++ b/data-otservbr-global/monster/magicals/medusa.lua @@ -99,7 +99,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -450, condition = { type = CONDITION_POISON, totalDamage = 840, interval = 4000 } }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -21, maxDamage = -350, range = 7, shootEffect = CONST_ANI_EARTH, effect = CONST_ME_CARNIPHILA, target = true }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -250, maxDamage = -500, length = 8, spread = 3, effect = CONST_ME_CARNIPHILA, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -250, maxDamage = -500, length = 8, spread = 1, effect = CONST_ME_CARNIPHILA, target = false }, { name = "speed", interval = 2000, chance = 25, radius = 7, effect = CONST_ME_POFF, target = true }, { name = "outfit", interval = 2000, chance = 1, range = 7, target = true, duration = 3000, outfitMonster = "clay guardian" }, } diff --git a/data-otservbr-global/monster/magicals/menacing_carnivor.lua b/data-otservbr-global/monster/magicals/menacing_carnivor.lua index 91a1772c42a..6ff42fe9202 100644 --- a/data-otservbr-global/monster/magicals/menacing_carnivor.lua +++ b/data-otservbr-global/monster/magicals/menacing_carnivor.lua @@ -102,8 +102,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -300, maxDamage = -450 }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -180, length = 4, spread = 3, effect = CONST_ME_SMOKE, target = false }, - { name = "combat", interval = 2000, chance = 14, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -200, length = 4, spread = 3, effect = CONST_ME_POISONAREA, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -180, length = 4, spread = 1, effect = CONST_ME_SMOKE, target = false }, + { name = "combat", interval = 2000, chance = 14, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -200, length = 4, spread = 1, effect = CONST_ME_POISONAREA, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -150, maxDamage = -330, radius = 4, effect = CONST_ME_GROUNDSHAKER, target = false }, } diff --git a/data-otservbr-global/monster/magicals/rage_squid.lua b/data-otservbr-global/monster/magicals/rage_squid.lua index 8fcba91d567..ae28f557d1e 100644 --- a/data-otservbr-global/monster/magicals/rage_squid.lua +++ b/data-otservbr-global/monster/magicals/rage_squid.lua @@ -107,7 +107,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -500 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -200, maxDamage = -280, range = 7, shootEffect = CONST_ANI_FLAMMINGARROW, effect = CONST_ME_HITBYFIRE, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -200, maxDamage = -380, range = 7, shootEffect = CONST_ANI_FIRE, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -175, maxDamage = -200, length = 5, spread = 3, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -175, maxDamage = -200, length = 5, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, { name = "combat", interval = 2000, chance = 12, type = COMBAT_FIREDAMAGE, minDamage = -200, maxDamage = -475, radius = 3, effect = CONST_ME_HITBYFIRE, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -200, maxDamage = -475, radius = 2, effect = CONST_ME_FIREAREA, target = false }, } diff --git a/data-otservbr-global/monster/magicals/retching_horror.lua b/data-otservbr-global/monster/magicals/retching_horror.lua index 7646ddfa8a3..696c7cfa8b9 100644 --- a/data-otservbr-global/monster/magicals/retching_horror.lua +++ b/data-otservbr-global/monster/magicals/retching_horror.lua @@ -99,7 +99,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400 }, - { name = "drunk", interval = 2000, chance = 10, length = 4, spread = 3, effect = CONST_ME_MAGIC_GREEN, target = true, duration = 5000 }, + { name = "drunk", interval = 2000, chance = 10, length = 4, spread = 1, effect = CONST_ME_MAGIC_GREEN, target = true, duration = 5000 }, { name = "speed", interval = 2000, chance = 15, speedChange = -700, radius = 4, shootEffect = CONST_ANI_WHIRLWINDCLUB, effect = CONST_ME_STUN, target = true, duration = 15000 }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -110, radius = 4, effect = CONST_ME_HITAREA, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -200, radius = 1, shootEffect = CONST_ANI_SNIPERARROW, target = true }, diff --git a/data-otservbr-global/monster/magicals/shiversleep.lua b/data-otservbr-global/monster/magicals/shiversleep.lua index dbfb4942830..da35f00b265 100644 --- a/data-otservbr-global/monster/magicals/shiversleep.lua +++ b/data-otservbr-global/monster/magicals/shiversleep.lua @@ -66,7 +66,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -450 }, - { name = "combat", interval = 1800, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -685, length = 7, spread = 3, effect = CONST_ME_STONES, target = false }, + { name = "combat", interval = 1800, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -685, length = 7, spread = 1, effect = CONST_ME_STONES, target = false }, { name = "combat", interval = 2000, chance = 9, type = COMBAT_EARTHDAMAGE, minDamage = -250, maxDamage = -590, radius = 6, effect = CONST_ME_BIGPLANTS, target = false }, } diff --git a/data-otservbr-global/monster/magicals/shock_head.lua b/data-otservbr-global/monster/magicals/shock_head.lua index 8b621dd6f4f..b211f9fb9b9 100644 --- a/data-otservbr-global/monster/magicals/shock_head.lua +++ b/data-otservbr-global/monster/magicals/shock_head.lua @@ -86,7 +86,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -798 }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_DEATHDAMAGE, minDamage = -200, maxDamage = -300, length = 5, spread = 2, effect = CONST_ME_BLACKSMOKE, target = false }, - { name = "speed", interval = 2000, chance = 15, speedChange = -800, length = 8, spread = 3, effect = CONST_ME_PURPLEENERGY, target = false, duration = 7500 }, + { name = "speed", interval = 2000, chance = 15, speedChange = -800, length = 8, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false, duration = 7500 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -350, radius = 4, shootEffect = CONST_ANI_EARTH, effect = CONST_ME_STONES, target = true }, { name = "shock head skill reducer 1", interval = 2000, chance = 5, range = 5, target = false }, { name = "shock head skill reducer 2", interval = 2000, chance = 5, target = false }, diff --git a/data-otservbr-global/monster/magicals/sight_of_surrender.lua b/data-otservbr-global/monster/magicals/sight_of_surrender.lua index 2db33a6e802..f225c132200 100644 --- a/data-otservbr-global/monster/magicals/sight_of_surrender.lua +++ b/data-otservbr-global/monster/magicals/sight_of_surrender.lua @@ -110,7 +110,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -1100 }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -500, maxDamage = -800, length = 8, spread = 3, effect = CONST_ME_YELLOWENERGY, target = true }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -500, maxDamage = -800, length = 8, spread = 1, effect = CONST_ME_YELLOWENERGY, target = true }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -500, radius = 1, shootEffect = CONST_ANI_LARGEROCK, target = true }, } diff --git a/data-otservbr-global/monster/magicals/sphinx.lua b/data-otservbr-global/monster/magicals/sphinx.lua index f6d42943ee7..3e65180f75a 100644 --- a/data-otservbr-global/monster/magicals/sphinx.lua +++ b/data-otservbr-global/monster/magicals/sphinx.lua @@ -91,9 +91,9 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400 }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -200, maxDamage = -500, length = 6, spread = 3, effect = CONST_ME_FIREAREA, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_HOLYDAMAGE, minDamage = -100, maxDamage = -350, range = 5, radius = 3, shootEffect = CONST_ANI_SMALLHOLY, effect = CONST_ME_HOLYAREA, target = true }, - { name = "combat", interval = 2000, chance = 18, type = COMBAT_ENERGYDAMAGE, minDamage = -200, maxDamage = -400, radius = 3, effect = CONST_ME_ENERGYAREA, target = false }, + { name = "combat", interval = 2000, chance = 30, type = COMBAT_FIREDAMAGE, minDamage = -200, maxDamage = -500, length = 6, spread = 1, effect = CONST_ME_FIREAREA, target = false }, + { name = "combat", interval = 2000, chance = 35, type = COMBAT_HOLYDAMAGE, minDamage = -100, maxDamage = -350, range = 5, radius = 3, shootEffect = CONST_ANI_SMALLHOLY, effect = CONST_ME_HOLYAREA, target = true }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -200, maxDamage = -400, radius = 3, effect = CONST_ME_ENERGYAREA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/magicals/terrorsleep.lua b/data-otservbr-global/monster/magicals/terrorsleep.lua index f4bca2b0395..0fef7bc832e 100644 --- a/data-otservbr-global/monster/magicals/terrorsleep.lua +++ b/data-otservbr-global/monster/magicals/terrorsleep.lua @@ -106,7 +106,7 @@ monster.attacks = { { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 20, minDamage = -1000, maxDamage = -1500, radius = 7, effect = CONST_ME_YELLOW_RINGS, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -100, maxDamage = -300, radius = 5, effect = CONST_ME_MAGIC_RED, target = false }, { name = "feversleep skill reducer", interval = 2000, chance = 10, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -350, maxDamage = -500, length = 6, spread = 3, effect = CONST_ME_YELLOWENERGY, target = true }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -350, maxDamage = -500, length = 6, spread = 1, effect = CONST_ME_YELLOWENERGY, target = true }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -200, maxDamage = -450, radius = 1, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = true }, } diff --git a/data-otservbr-global/monster/magicals/thanatursus.lua b/data-otservbr-global/monster/magicals/thanatursus.lua index cda3e1ed7e7..80d21c1c2cc 100644 --- a/data-otservbr-global/monster/magicals/thanatursus.lua +++ b/data-otservbr-global/monster/magicals/thanatursus.lua @@ -103,7 +103,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -200, maxDamage = -450 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_HOLYDAMAGE, minDamage = -250, maxDamage = -400, radius = 3, effect = CONST_ME_HOLYAREA, target = true }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -280, maxDamage = -450, length = 4, spread = 3, effect = CONST_ME_ENERGYAREA, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -280, maxDamage = -450, length = 4, spread = 1, effect = CONST_ME_ENERGYAREA, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -250, maxDamage = -400, radius = 6, effect = CONST_ME_BLOCKHIT, target = true }, } diff --git a/data-otservbr-global/monster/magicals/venerable_girtablilu.lua b/data-otservbr-global/monster/magicals/venerable_girtablilu.lua index 558aaffee4a..0b50c26edb9 100644 --- a/data-otservbr-global/monster/magicals/venerable_girtablilu.lua +++ b/data-otservbr-global/monster/magicals/venerable_girtablilu.lua @@ -103,7 +103,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -550, effect = CONST_ME_DRAWBLOOD }, { name = "combat", interval = 2750, chance = 30, type = COMBAT_DEATHDAMAGE, minDamage = -200, maxDamage = -500, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = true }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -200, maxDamage = -400, length = 4, spread = 3, effect = CONST_ME_HITBYPOISON, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -200, maxDamage = -400, length = 4, spread = 1, effect = CONST_ME_HITBYPOISON, target = false }, { name = "combat", interval = 2000, chance = 40, type = COMBAT_EARTHDAMAGE, minDamage = -200, maxDamage = -400, radius = 3, effect = CONST_ME_HITBYPOISON, target = false }, { name = "girtablilu poison wave", interval = 2000, chance = 30, minDamage = -200, maxDamage = -400 }, } diff --git a/data-otservbr-global/monster/magicals/weakened_frazzlemaw.lua b/data-otservbr-global/monster/magicals/weakened_frazzlemaw.lua index d7e8eba093f..4cdeb53b528 100644 --- a/data-otservbr-global/monster/magicals/weakened_frazzlemaw.lua +++ b/data-otservbr-global/monster/magicals/weakened_frazzlemaw.lua @@ -108,7 +108,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 90, attack = 80 }, -- bleed { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 10, minDamage = -80, maxDamage = -200, radius = 3, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -200, length = 5, spread = 3, effect = CONST_ME_EXPLOSIONAREA, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -200, length = 5, spread = 1, effect = CONST_ME_EXPLOSIONAREA, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -100, radius = 2, shootEffect = CONST_ANI_LARGEROCK, effect = CONST_ME_STONES, target = true }, { name = "speed", interval = 2000, chance = 15, speedChange = -600, radius = 5, effect = CONST_ME_MAGIC_RED, target = false, duration = 15000 }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -80, maxDamage = -50, radius = 4, effect = CONST_ME_MAGIC_RED, target = false }, diff --git a/data-otservbr-global/monster/mammals/doom_deer.lua b/data-otservbr-global/monster/mammals/doom_deer.lua index 02dfda0bcd8..7ba33d128c6 100644 --- a/data-otservbr-global/monster/mammals/doom_deer.lua +++ b/data-otservbr-global/monster/mammals/doom_deer.lua @@ -79,7 +79,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -100 }, - { name = "combat", interval = 4000, chance = 30, type = COMBAT_ENERGYDAMAGE, minDamage = -35, maxDamage = -55, length = 5, spread = 3, effect = CONST_ME_BIGCLOUDS, target = false }, + { name = "combat", interval = 4000, chance = 30, type = COMBAT_ENERGYDAMAGE, minDamage = -35, maxDamage = -55, length = 5, spread = 1, effect = CONST_ME_BIGCLOUDS, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/mammals/gore_horn.lua b/data-otservbr-global/monster/mammals/gore_horn.lua index 37ca6c70b2b..708f327934f 100644 --- a/data-otservbr-global/monster/mammals/gore_horn.lua +++ b/data-otservbr-global/monster/mammals/gore_horn.lua @@ -87,7 +87,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -1000 }, - { name = "combat", interval = 3500, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -450, maxDamage = -750, length = 7, spread = 0, effect = CONST_ME_ENERGYAREA, target = false }, + { name = "combat", interval = 3500, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -450, maxDamage = -750, length = 7, spread = 1, effect = CONST_ME_ENERGYAREA, target = false }, { name = "combat", interval = 4100, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -500, maxDamage = -900, radius = 7, effect = CONST_ME_EXPLOSIONAREA, target = false }, { name = "combat", interval = 2700, chance = 35, type = COMBAT_ENERGYDAMAGE, minDamage = -500, maxDamage = -850, range = 1, shootEffect = CONST_ANI_ENERGY, target = true }, { name = "root", interval = 2000, chance = 1, target = true }, diff --git a/data-otservbr-global/monster/mammals/vulcongra.lua b/data-otservbr-global/monster/mammals/vulcongra.lua index 04218b3e464..90674dbef96 100644 --- a/data-otservbr-global/monster/mammals/vulcongra.lua +++ b/data-otservbr-global/monster/mammals/vulcongra.lua @@ -100,7 +100,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -235 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -195, maxDamage = -340, length = 8, spread = 3, effect = CONST_ME_EXPLOSIONHIT, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -195, maxDamage = -340, length = 8, spread = 1, effect = CONST_ME_EXPLOSIONHIT, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -200, range = 7, shootEffect = CONST_ANI_FIRE, target = true }, { name = "vulcongra soulfire", interval = 3000, chance = 100, target = false }, } diff --git a/data-otservbr-global/monster/mammals/yeti.lua b/data-otservbr-global/monster/mammals/yeti.lua index 33447765d34..853dfa5a140 100644 --- a/data-otservbr-global/monster/mammals/yeti.lua +++ b/data-otservbr-global/monster/mammals/yeti.lua @@ -87,7 +87,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/plants/haunted_treeling.lua b/data-otservbr-global/monster/plants/haunted_treeling.lua index 15bf394b1b0..b419db0400c 100644 --- a/data-otservbr-global/monster/plants/haunted_treeling.lua +++ b/data-otservbr-global/monster/plants/haunted_treeling.lua @@ -96,7 +96,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -150 }, { name = "combat", interval = 2000, chance = 5, type = COMBAT_MANADRAIN, minDamage = -30, maxDamage = -100, radius = 4, effect = CONST_ME_GREEN_RINGS, target = false }, - { name = "speed", interval = 2000, chance = 15, speedChange = -700, length = 5, spread = 3, effect = CONST_ME_SMALLPLANTS, target = false, duration = 15000 }, + { name = "speed", interval = 2000, chance = 15, speedChange = -700, length = 5, spread = 1, effect = CONST_ME_SMALLPLANTS, target = false, duration = 15000 }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -100, range = 7, radius = 1, shootEffect = CONST_ANI_SMALLEARTH, effect = CONST_ME_CARNIPHILA, target = true }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -55, maxDamage = -100, radius = 4, effect = CONST_ME_HITBYPOISON, target = true }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, radius = 1, effect = CONST_ME_POISONAREA, target = false }, diff --git a/data-otservbr-global/monster/plants/hideous_fungus.lua b/data-otservbr-global/monster/plants/hideous_fungus.lua index a4938bcf765..5fdb550063c 100644 --- a/data-otservbr-global/monster/plants/hideous_fungus.lua +++ b/data-otservbr-global/monster/plants/hideous_fungus.lua @@ -109,7 +109,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -450 }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -250, maxDamage = -430, range = 7, shootEffect = CONST_ANI_SMALLEARTH, effect = CONST_ME_SMALLPLANTS, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_ICEDAMAGE, minDamage = -250, maxDamage = -550, length = 8, spread = 3, shootEffect = CONST_ANI_SNOWBALL, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_ICEDAMAGE, minDamage = -250, maxDamage = -550, length = 8, spread = 1, shootEffect = CONST_ANI_SNOWBALL, target = false }, { name = "speed", interval = 2000, chance = 10, speedChange = -600, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 60000 }, { name = "drunk", interval = 2000, chance = 10, range = 7, radius = 5, shootEffect = CONST_ANI_SMALLSTONE, effect = CONST_ME_STUN, target = true, duration = 4000 }, -- poison diff --git a/data-otservbr-global/monster/plants/humongous_fungus.lua b/data-otservbr-global/monster/plants/humongous_fungus.lua index e80d2c162e6..ab29138715f 100644 --- a/data-otservbr-global/monster/plants/humongous_fungus.lua +++ b/data-otservbr-global/monster/plants/humongous_fungus.lua @@ -106,8 +106,8 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -180, maxDamage = -350, range = 7, shootEffect = CONST_ANI_SMALLEARTH, effect = CONST_ME_SMALLPLANTS, target = false }, { name = "poisonfield", interval = 2000, chance = 20, radius = 4, target = false }, -- poison - { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -500, maxDamage = -1000, length = 8, spread = 3, effect = CONST_ME_GREEN_RINGS, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -130, maxDamage = -260, length = 5, spread = 3, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -500, maxDamage = -1000, length = 8, spread = 1, effect = CONST_ME_GREEN_RINGS, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -130, maxDamage = -260, length = 5, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, -- poison { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -400, maxDamage = -640, range = 7, radius = 3, effect = CONST_ME_HITBYPOISON, target = false }, } diff --git a/data-otservbr-global/monster/plants/omnivora.lua b/data-otservbr-global/monster/plants/omnivora.lua index 7bd18d7d981..26ac8ea4d9d 100644 --- a/data-otservbr-global/monster/plants/omnivora.lua +++ b/data-otservbr-global/monster/plants/omnivora.lua @@ -96,7 +96,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -150 }, { name = "speed", interval = 4000, chance = 20, speedChange = -350, range = 7, shootEffect = CONST_ANI_POISON, target = true, duration = 12000 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -80, maxDamage = -100, range = 7, shootEffect = CONST_ANI_POISON, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -50, maxDamage = -100, length = 8, spread = 3, effect = CONST_ME_POISONAREA, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -50, maxDamage = -100, length = 8, spread = 1, effect = CONST_ME_POISONAREA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/a_pirates_tail_quest/ratmiral_blackwhiskers.lua b/data-otservbr-global/monster/quests/a_pirates_tail_quest/ratmiral_blackwhiskers.lua index d399413ed93..98e510bb9b4 100644 --- a/data-otservbr-global/monster/quests/a_pirates_tail_quest/ratmiral_blackwhiskers.lua +++ b/data-otservbr-global/monster/quests/a_pirates_tail_quest/ratmiral_blackwhiskers.lua @@ -113,7 +113,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -270, maxDamage = -500 }, { name = "combat", interval = 2000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -300, maxDamage = -600, range = 7, shootEffect = CONST_ANI_WHIRLWINDCLUB, target = true }, { name = "combat", interval = 2000, chance = 40, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -600, radius = 4, effect = CONST_ME_MAGIC_RED, target = false }, - { name = "combat", interval = 2000, chance = 30, type = COMBAT_LIFEDRAIN, minDamage = -600, maxDamage = -1000, length = 4, spread = 0, effect = CONST_ME_SOUND_PURPLE, target = false }, + { name = "combat", interval = 2000, chance = 30, type = COMBAT_LIFEDRAIN, minDamage = -600, maxDamage = -1000, length = 4, spread = 1, effect = CONST_ME_SOUND_PURPLE, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/annihilator/angry_demon.lua b/data-otservbr-global/monster/quests/annihilator/angry_demon.lua index 3d9d9a4fe80..970638924ea 100644 --- a/data-otservbr-global/monster/quests/annihilator/angry_demon.lua +++ b/data-otservbr-global/monster/quests/annihilator/angry_demon.lua @@ -108,12 +108,19 @@ monster.loot = { } monster.attacks = { - { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -520 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = 0, maxDamage = -120, range = 7, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -150, maxDamage = -250, range = 7, radius = 7, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true }, + -- {name ="melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -520}, + -- {name ="combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = 0, maxDamage = -120, range = 7, target = false}, + -- {name ="combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -150, maxDamage = -250, range = 7, radius = 7, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true}, + -- {name ="firefield", interval = 2000, chance = 10, range = 7, radius = 1, shootEffect = CONST_ANI_FIRE, target = true}, + -- {name ="combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -490, length = 8,spread = 13, effect = CONST_ME_PURPLEENERGY, target = false}, + -- {name ="combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -210, maxDamage = -300, range = 1, shootEffect = CONST_ANI_ENERGY, target = false}, + -- {name ="speed", interval = 2000, chance = 15, speedChange = -700, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 30000} + { name = "melee", interval = 2000, chance = 500, minDamage = 0, maxDamage = -1940 }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = 0, maxDamage = -150, range = 7, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -650, maxDamage = -900, range = 7, radius = 7, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true }, { name = "firefield", interval = 2000, chance = 10, range = 7, radius = 1, shootEffect = CONST_ANI_FIRE, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -490, length = 8, spread = 3, effect = CONST_ME_PURPLEENERGY, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -210, maxDamage = -300, range = 1, shootEffect = CONST_ANI_ENERGY, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -800, length = 8, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -1050, maxDamage = -1500, range = 1, shootEffect = CONST_ANI_ENERGY, target = true }, { name = "speed", interval = 2000, chance = 15, speedChange = -700, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 30000 }, } diff --git a/data-otservbr-global/monster/quests/bigfoots_burden/minion_of_versperoth.lua b/data-otservbr-global/monster/quests/bigfoots_burden/minion_of_versperoth.lua index 380939429e9..b047898ea09 100644 --- a/data-otservbr-global/monster/quests/bigfoots_burden/minion_of_versperoth.lua +++ b/data-otservbr-global/monster/quests/bigfoots_burden/minion_of_versperoth.lua @@ -65,8 +65,8 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -390 }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -350, maxDamage = -700, length = 8, spread = 3, effect = CONST_ME_FIREATTACK, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -600, maxDamage = -1300, length = 8, spread = 3, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -350, maxDamage = -700, length = 8, spread = 1, effect = CONST_ME_FIREATTACK, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -600, maxDamage = -1300, length = 8, spread = 1, effect = CONST_ME_MORTAREA, target = false }, { name = "lava golem soulfire", interval = 2000, chance = 15, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -220, maxDamage = -350, radius = 4, effect = CONST_ME_FIREAREA, target = true }, { name = "speed", interval = 2000, chance = 10, speedChange = -300, length = 5, spread = 3, effect = CONST_ME_BLOCKHIT, target = false, duration = 10000 }, diff --git a/data-otservbr-global/monster/quests/cults_of_tibia/animated_guzzlemaw.lua b/data-otservbr-global/monster/quests/cults_of_tibia/animated_guzzlemaw.lua index 66088ce9f07..c781b4ba290 100644 --- a/data-otservbr-global/monster/quests/cults_of_tibia/animated_guzzlemaw.lua +++ b/data-otservbr-global/monster/quests/cults_of_tibia/animated_guzzlemaw.lua @@ -97,10 +97,10 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -499 }, -- bleed { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 10, minDamage = -500, maxDamage = -1000, radius = 3, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -900, length = 8, spread = 3, effect = CONST_ME_EXPLOSIONAREA, target = true }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -900, length = 8, spread = 1, effect = CONST_ME_EXPLOSIONAREA, target = true }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -500, radius = 2, shootEffect = CONST_ANI_LARGEROCK, effect = CONST_ME_STONES, target = true }, { name = "speed", interval = 2000, chance = 15, speedChange = -800, radius = 6, effect = CONST_ME_MAGIC_RED, target = false, duration = 15000 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -800, length = 8, spread = 3, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -800, length = 8, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/cults_of_tibia/animated_moohtant.lua b/data-otservbr-global/monster/quests/cults_of_tibia/animated_moohtant.lua index 6823e0afed9..334fd68d2ea 100644 --- a/data-otservbr-global/monster/quests/cults_of_tibia/animated_moohtant.lua +++ b/data-otservbr-global/monster/quests/cults_of_tibia/animated_moohtant.lua @@ -85,7 +85,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 110, attack = 50 }, - { name = "combat", interval = 2000, chance = 13, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -230, length = 3, spread = 0, effect = CONST_ME_GROUNDSHAKER, target = false }, + { name = "combat", interval = 2000, chance = 13, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -230, length = 3, spread = 1, effect = CONST_ME_GROUNDSHAKER, target = false }, { name = "combat", interval = 2000, chance = 12, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -200, radius = 3, effect = CONST_ME_GROUNDSHAKER, target = false }, { name = "combat", interval = 2000, chance = 19, type = COMBAT_LIFEDRAIN, minDamage = -50, maxDamage = -225, radius = 5, effect = CONST_ME_MAGIC_RED, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -150, maxDamage = -235, range = 7, radius = 4, shootEffect = CONST_ANI_LARGEROCK, effect = CONST_ME_EXPLOSIONAREA, target = true }, diff --git a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/essence_of_malice.lua b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/essence_of_malice.lua index ef49131374d..5b6a669022d 100644 --- a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/essence_of_malice.lua +++ b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/essence_of_malice.lua @@ -99,7 +99,7 @@ monster.attacks = { -- poison { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -520, maxDamage = -780, range = 5, effect = CONST_ME_SMALLCLOUDS, target = true }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -80, maxDamage = -230, range = 7, effect = CONST_ME_MAGIC_RED, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -120, maxDamage = -250, length = 8, spread = 3, effect = CONST_ME_LOSEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -120, maxDamage = -250, length = 8, spread = 1, effect = CONST_ME_LOSEENERGY, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_DEATHDAMAGE, minDamage = -110, maxDamage = -180, radius = 4, effect = CONST_ME_MORTAREA, target = false }, { name = "speed", interval = 2000, chance = 20, speedChange = -800, range = 7, effect = CONST_ME_SMALLCLOUDS, target = true, duration = 30000 }, } diff --git a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_corruptor_of_souls.lua b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_corruptor_of_souls.lua index adc1b89d393..a2a2510e381 100644 --- a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_corruptor_of_souls.lua +++ b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_corruptor_of_souls.lua @@ -73,8 +73,8 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 25, type = COMBAT_DEATHDAMAGE, minDamage = 0, maxDamage = -500, length = 9, spread = 7, effect = CONST_ME_SMALLCLOUDS, target = false }, { name = "remorseless wave", interval = 2000, chance = 25, target = false }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -500, radius = 7, effect = CONST_ME_HITAREA, target = false }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -500, length = 9, spread = 3, effect = CONST_ME_STUN, target = false }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_DEATHDAMAGE, minDamage = 0, maxDamage = -500, length = 9, spread = 3, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -500, length = 9, spread = 1, effect = CONST_ME_STUN, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_DEATHDAMAGE, minDamage = 0, maxDamage = -500, length = 9, spread = 1, effect = CONST_ME_MORTAREA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_remorseless_corruptor.lua b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_remorseless_corruptor.lua index ed10d546780..c9595cecc14 100644 --- a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_remorseless_corruptor.lua +++ b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_remorseless_corruptor.lua @@ -66,11 +66,11 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -150, maxDamage = -500 }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -500, length = 9, spread = 3, effect = CONST_ME_LOSEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -500, length = 9, spread = 1, effect = CONST_ME_LOSEENERGY, target = false }, { name = "remorseless wave", interval = 2000, chance = 25, target = false }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -500, radius = 7, effect = CONST_ME_HITAREA, target = false }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -500, length = 9, spread = 3, effect = CONST_ME_STUN, target = false }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_DEATHDAMAGE, minDamage = 0, maxDamage = -500, length = 9, spread = 3, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -500, length = 9, spread = 1, effect = CONST_ME_STUN, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_DEATHDAMAGE, minDamage = 0, maxDamage = -500, length = 9, spread = 1, effect = CONST_ME_MORTAREA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_souldespoiler.lua b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_souldespoiler.lua index 35878eae9bf..fe775bbd1cb 100644 --- a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_souldespoiler.lua +++ b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_souldespoiler.lua @@ -125,7 +125,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -783 }, { name = "combat", interval = 2000, chance = 60, type = COMBAT_DEATHDAMAGE, minDamage = -30, maxDamage = -181, range = 7, radius = 3, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_SMALLCLOUDS, target = true }, { name = "combat", interval = 2000, chance = 50, type = COMBAT_ENERGYDAMAGE, minDamage = -210, maxDamage = -538, length = 7, spread = 2, effect = CONST_ME_PURPLEENERGY, target = false }, - { name = "combat", interval = 3000, chance = 30, type = COMBAT_DROWNDAMAGE, minDamage = -125, maxDamage = -640, length = 9, spread = 3, effect = CONST_ME_LOSEENERGY, target = false }, + { name = "combat", interval = 3000, chance = 30, type = COMBAT_DROWNDAMAGE, minDamage = -125, maxDamage = -640, length = 9, spread = 1, effect = CONST_ME_LOSEENERGY, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/dangerous_depth/aggressive_matter.lua b/data-otservbr-global/monster/quests/dangerous_depth/aggressive_matter.lua index 2ac350a7e0d..8678370837d 100644 --- a/data-otservbr-global/monster/quests/dangerous_depth/aggressive_matter.lua +++ b/data-otservbr-global/monster/quests/dangerous_depth/aggressive_matter.lua @@ -67,7 +67,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 58, attack = 50, condition = { type = CONDITION_POISON, totalDamage = 280, interval = 4000 } }, { name = "combat", interval = 2000, chance = 13, type = COMBAT_EARTHDAMAGE, minDamage = -150, maxDamage = -250, range = 7, radius = 3, shootEffect = CONST_ANI_GLOOTHSPEAR, effect = CONST_ME_POISONAREA, target = true }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -150, maxDamage = -230, length = 6, spread = 3, effect = CONST_ME_POISONAREA, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -150, maxDamage = -230, length = 6, spread = 1, effect = CONST_ME_POISONAREA, target = false }, -- poison { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -200, maxDamage = -300, range = 7, shootEffect = CONST_ANI_POISON, effect = CONST_ME_POISONAREA, target = true }, { name = "rot elemental paralyze", interval = 2000, chance = 11, target = false }, diff --git a/data-otservbr-global/monster/quests/dangerous_depth/bosses/the_count_of_the_core.lua b/data-otservbr-global/monster/quests/dangerous_depth/bosses/the_count_of_the_core.lua index 80878aaa360..9f477eb7a71 100644 --- a/data-otservbr-global/monster/quests/dangerous_depth/bosses/the_count_of_the_core.lua +++ b/data-otservbr-global/monster/quests/dangerous_depth/bosses/the_count_of_the_core.lua @@ -119,11 +119,11 @@ monster.loot = { } monster.attacks = { - { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -1500 }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = 0, maxDamage = -1500, range = 3, length = 9, spread = 3, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = 0, maxDamage = -1500, range = 3, length = 9, spread = 4, effect = CONST_ME_SMALLCLOUDS, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -1500, radius = 8, effect = CONST_ME_HITAREA, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_DEATHDAMAGE, minDamage = 0, maxDamage = -1500, radius = 8, effect = CONST_ME_BLACKSMOKE, target = false }, + { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -900 }, + { name = "combat", interval = 6000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = 0, maxDamage = -1500, range = 3, length = 9, spread = 1, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 4000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = 0, maxDamage = -1500, range = 3, length = 9, spread = 4, effect = CONST_ME_SMALLCLOUDS, target = false }, + { name = "combat", interval = 4000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -1500, radius = 8, effect = CONST_ME_HITAREA, target = false }, + { name = "combat", interval = 4000, chance = 15, type = COMBAT_DEATHDAMAGE, minDamage = 0, maxDamage = -1500, radius = 8, effect = CONST_ME_BLACKSMOKE, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/feaster_of_souls/irgix_the_flimsy.lua b/data-otservbr-global/monster/quests/feaster_of_souls/irgix_the_flimsy.lua index ff5de342507..db4a3c7ce3c 100644 --- a/data-otservbr-global/monster/quests/feaster_of_souls/irgix_the_flimsy.lua +++ b/data-otservbr-global/monster/quests/feaster_of_souls/irgix_the_flimsy.lua @@ -83,7 +83,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -500 }, { name = "combat", interval = 1500, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -500, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, target = true }, - { name = "combat", interval = 1500, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -650, length = 4, spread = 3, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 1500, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -650, length = 4, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 1500, chance = 35, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -650, radius = 4, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 1500, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -650, radius = 4, effect = CONST_ME_ENERGYAREA, target = false }, } diff --git a/data-otservbr-global/monster/quests/feaster_of_souls/unaz_the_mean.lua b/data-otservbr-global/monster/quests/feaster_of_souls/unaz_the_mean.lua index 3788bd28778..b58d4d4c9d6 100644 --- a/data-otservbr-global/monster/quests/feaster_of_souls/unaz_the_mean.lua +++ b/data-otservbr-global/monster/quests/feaster_of_souls/unaz_the_mean.lua @@ -82,7 +82,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -500 }, { name = "combat", interval = 1500, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -500, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, target = true }, - { name = "combat", interval = 1500, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -650, length = 4, spread = 3, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 1500, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -650, length = 4, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 1500, chance = 35, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -650, radius = 4, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 1500, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -650, radius = 4, effect = CONST_ME_ENERGYAREA, target = false }, } diff --git a/data-otservbr-global/monster/quests/feaster_of_souls/vok_the_freakish.lua b/data-otservbr-global/monster/quests/feaster_of_souls/vok_the_freakish.lua index b6790c3f47a..68157a12226 100644 --- a/data-otservbr-global/monster/quests/feaster_of_souls/vok_the_freakish.lua +++ b/data-otservbr-global/monster/quests/feaster_of_souls/vok_the_freakish.lua @@ -80,7 +80,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -500 }, { name = "combat", interval = 1500, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -500, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, target = true }, - { name = "combat", interval = 1500, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -650, length = 4, spread = 3, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 1500, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -650, length = 4, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 1500, chance = 35, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -650, radius = 4, effect = CONST_ME_MORTAREA, target = true }, { name = "combat", interval = 1500, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -650, radius = 4, effect = CONST_ME_GREEN_RINGS, target = true }, } diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/destabilized_ferumbras.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/destabilized_ferumbras.lua index 83b60ad84fb..3d3917d00f6 100644 --- a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/destabilized_ferumbras.lua +++ b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/destabilized_ferumbras.lua @@ -83,7 +83,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 16, type = COMBAT_MANADRAIN, minDamage = -225, maxDamage = -410, radius = 6, effect = CONST_ME_MAGIC_RED, target = false }, { name = "combat", interval = 2000, chance = 21, type = COMBAT_LIFEDRAIN, minDamage = -200, maxDamage = -450, radius = 6, effect = CONST_ME_POFF, target = false }, { name = "ferumbras soulfire", interval = 2000, chance = 20, range = 7, target = false }, - { name = "combat", interval = 2000, chance = 17, type = COMBAT_LIFEDRAIN, minDamage = -590, maxDamage = -1050, length = 8, spread = 3, effect = CONST_ME_HITBYPOISON, target = false }, + { name = "combat", interval = 2000, chance = 17, type = COMBAT_LIFEDRAIN, minDamage = -590, maxDamage = -1050, length = 8, spread = 1, effect = CONST_ME_HITBYPOISON, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ferumbras_mortal_shell.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ferumbras_mortal_shell.lua index 27160109571..1c2944caabc 100644 --- a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ferumbras_mortal_shell.lua +++ b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ferumbras_mortal_shell.lua @@ -153,7 +153,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 21, type = COMBAT_ENERGYDAMAGE, minDamage = -400, maxDamage = -650, radius = 9, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 2000, chance = 21, type = COMBAT_LIFEDRAIN, minDamage = -200, maxDamage = -450, radius = 6, effect = CONST_ME_POFF, target = false }, { name = "ferumbras soulfire", interval = 2000, chance = 20, range = 7, target = false }, - { name = "combat", interval = 2000, chance = 17, type = COMBAT_LIFEDRAIN, minDamage = -590, maxDamage = -1050, length = 8, spread = 3, effect = CONST_ME_HITBYPOISON, target = false }, + { name = "combat", interval = 2000, chance = 17, type = COMBAT_LIFEDRAIN, minDamage = -590, maxDamage = -1050, length = 8, spread = 1, effect = CONST_ME_HITBYPOISON, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ferumbras_soul_splinter.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ferumbras_soul_splinter.lua index 91b329140a0..c973c1a1020 100644 --- a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ferumbras_soul_splinter.lua +++ b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ferumbras_soul_splinter.lua @@ -83,7 +83,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 16, type = COMBAT_MANADRAIN, minDamage = -225, maxDamage = -410, radius = 6, effect = CONST_ME_MAGIC_RED, target = false }, { name = "combat", interval = 2000, chance = 21, type = COMBAT_LIFEDRAIN, minDamage = -200, maxDamage = -450, radius = 6, effect = CONST_ME_POFF, target = false }, { name = "ferumbras soulfire", interval = 2000, chance = 20, range = 7, target = false }, - { name = "combat", interval = 2000, chance = 17, type = COMBAT_LIFEDRAIN, minDamage = -590, maxDamage = -1050, length = 8, spread = 3, effect = CONST_ME_HITBYPOISON, target = false }, + { name = "combat", interval = 2000, chance = 17, type = COMBAT_LIFEDRAIN, minDamage = -590, maxDamage = -1050, length = 8, spread = 1, effect = CONST_ME_HITBYPOISON, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/disgusting_ooze.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/disgusting_ooze.lua index cd72c70e9fb..7760d93ed53 100644 --- a/data-otservbr-global/monster/quests/ferumbras_ascendant/disgusting_ooze.lua +++ b/data-otservbr-global/monster/quests/ferumbras_ascendant/disgusting_ooze.lua @@ -93,7 +93,7 @@ monster.attacks = { -- poison { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -300, maxDamage = -500, radius = 8, effect = CONST_ME_HITBYPOISON, target = false }, -- poison - { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -400, maxDamage = -725, length = 8, spread = 3, effect = CONST_ME_SMALLPLANTS, target = false }, + { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -400, maxDamage = -725, length = 8, spread = 1, effect = CONST_ME_SMALLPLANTS, target = false }, { name = "combat", interval = 2000, chance = 14, type = COMBAT_EARTHDAMAGE, minDamage = -120, maxDamage = -170, radius = 3, effect = CONST_ME_POISONAREA, target = false }, } diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_frazzlemaw.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_frazzlemaw.lua index 769b0695956..ab81f63766f 100644 --- a/data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_frazzlemaw.lua +++ b/data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_frazzlemaw.lua @@ -101,7 +101,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 90, attack = 80 }, { name = "combat", interval = 2000, chance = 12, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -400, radius = 3, target = false }, - { name = "combat", interval = 2000, chance = 13, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -700, length = 5, spread = 3, effect = CONST_ME_EXPLOSIONAREA, target = true }, + { name = "combat", interval = 2000, chance = 13, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -700, length = 5, spread = 1, effect = CONST_ME_EXPLOSIONAREA, target = true }, -- bleed { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 16, minDamage = -400, maxDamage = -600, radius = 2, shootEffect = CONST_ANI_LARGEROCK, effect = CONST_ME_STONES, target = true }, { name = "frazzlemaw paralyze", interval = 2000, chance = 15, target = false }, diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_yielothax.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_yielothax.lua index 7e3b599fb98..7e1c7517be1 100644 --- a/data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_yielothax.lua +++ b/data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_yielothax.lua @@ -86,8 +86,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 70, attack = 50 }, - { name = "combat", interval = 2000, chance = 18, type = COMBAT_LIFEDRAIN, minDamage = -70, maxDamage = -130, length = 4, spread = 3, effect = CONST_ME_ENERGYAREA, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -50, maxDamage = -150, length = 5, spread = 3, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 18, type = COMBAT_LIFEDRAIN, minDamage = -70, maxDamage = -130, length = 4, spread = 1, effect = CONST_ME_ENERGYAREA, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -50, maxDamage = -150, length = 5, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -75, maxDamage = -120, radius = 3, shootEffect = CONST_ANI_EARTH, effect = CONST_ME_HITBYPOISON, target = true }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -120, maxDamage = -215, radius = 3, effect = CONST_ME_HITBYPOISON, target = false }, -- poison diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/summons/enthralled_demon.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/summons/enthralled_demon.lua index e170b7f0b0d..c77762c1013 100644 --- a/data-otservbr-global/monster/quests/ferumbras_ascendant/summons/enthralled_demon.lua +++ b/data-otservbr-global/monster/quests/ferumbras_ascendant/summons/enthralled_demon.lua @@ -72,7 +72,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 7, type = COMBAT_ENERGYDAMAGE, minDamage = -210, maxDamage = -300, range = 1, radius = 1, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_ENERGYHIT, target = true }, { name = "firefield", interval = 2000, chance = 14, range = 7, radius = 1, shootEffect = CONST_ANI_FIRE, target = true }, { name = "demon paralyze", interval = 2000, chance = 10, range = 7, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -480, length = 8, spread = 3, effect = CONST_ME_PURPLEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -480, length = 8, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/animated_sword.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/animated_sword.lua index 60c60ee20e8..23f2877b6c1 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/animated_sword.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/animated_sword.lua @@ -62,7 +62,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 50, attack = 50 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_MANADRAIN, minDamage = -40, maxDamage = -160, radius = 6, effect = CONST_ME_MAGIC_BLUE, target = false }, { name = "berserk", interval = 2000, chance = 15, minDamage = -40, maxDamage = -160, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -40, maxDamage = -100, length = 4, spread = 3, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -40, maxDamage = -100, length = 4, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/lady_tenebris.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/lady_tenebris.lua index c7087a421ba..b75511b2dc8 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/lady_tenebris.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/lady_tenebris.lua @@ -115,7 +115,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -800, maxDamage = -1800 }, - { name = "combat", interval = 6000, chance = 13, type = COMBAT_DEATHDAMAGE, minDamage = -1200, maxDamage = -1500, length = 8, spread = 3, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 6000, chance = 13, type = COMBAT_DEATHDAMAGE, minDamage = -1200, maxDamage = -1500, length = 8, spread = 1, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 2000, chance = 13, type = COMBAT_DEATHDAMAGE, minDamage = -400, maxDamage = -600, radius = 4, shootEffect = CONST_ANI_DEATH, effect = CONST_ME_SMALLCLOUDS, target = true }, { name = "tenebris summon", interval = 2000, chance = 14, target = false }, { name = "tenebris ultimate", interval = 15000, chance = 30, target = false }, diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/lloyd.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/lloyd.lua index 2cd9bdcd5b0..8abf24b5ef8 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/lloyd.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/lloyd.lua @@ -113,7 +113,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -200, maxDamage = -1400 }, - { name = "combat", interval = 2000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = -330, maxDamage = -660, length = 6, spread = 3, effect = CONST_ME_PURPLEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = -330, maxDamage = -660, length = 6, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false }, { name = "lloyd wave", interval = 2000, chance = 12, minDamage = -430, maxDamage = -560, target = false }, { name = "lloyd wave2", interval = 2000, chance = 12, minDamage = -230, maxDamage = -460, target = false }, { name = "lloyd wave3", interval = 2000, chance = 12, minDamage = -430, maxDamage = -660, target = false }, diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/mounted_thorn_knight.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/mounted_thorn_knight.lua index f46efa303a8..d9e18471318 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/mounted_thorn_knight.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/mounted_thorn_knight.lua @@ -72,9 +72,9 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -600, maxDamage = -1000 }, - { name = "combat", interval = 2000, chance = 12, type = COMBAT_LIFEDRAIN, minDamage = -400, maxDamage = -700, length = 4, spread = 3, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 2000, chance = 12, type = COMBAT_MANADRAIN, minDamage = -1400, maxDamage = -1700, length = 9, spread = 3, effect = CONST_ME_CARNIPHILA, target = false }, - { name = "combat", interval = 2000, chance = 12, type = COMBAT_DEATHDAMAGE, minDamage = -400, maxDamage = -700, length = 9, spread = 3, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 12, type = COMBAT_LIFEDRAIN, minDamage = -400, maxDamage = -700, length = 4, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 2000, chance = 12, type = COMBAT_MANADRAIN, minDamage = -1400, maxDamage = -1700, length = 9, spread = 1, effect = CONST_ME_CARNIPHILA, target = false }, + { name = "combat", interval = 2000, chance = 12, type = COMBAT_DEATHDAMAGE, minDamage = -400, maxDamage = -700, length = 9, spread = 1, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -250, radius = 10, effect = CONST_ME_BLOCKHIT, target = false }, } diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_blazing_time_guardian.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_blazing_time_guardian.lua index dd4144c4aad..d81dfdc2e9a 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_blazing_time_guardian.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_blazing_time_guardian.lua @@ -92,12 +92,12 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 190, attack = 300 }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_DEATHDAMAGE, minDamage = -600, maxDamage = -780, range = 7, radius = 4, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_ENERGYHIT, target = true }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -600, maxDamage = -780, length = 9, spread = 3, effect = CONST_ME_ENERGYHIT, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -600, maxDamage = -780, length = 9, spread = 3, effect = CONST_ME_ENERGYAREA, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -600, maxDamage = -780, length = 9, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -600, maxDamage = -780, length = 9, spread = 1, effect = CONST_ME_ENERGYAREA, target = false }, -- energy damage { name = "condition", type = CONDITION_ENERGY, interval = 2000, chance = 20, minDamage = -2000, maxDamage = -2000, radius = 7, effect = CONST_ME_BLOCKHIT, target = false }, -- bleed - { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 20, minDamage = -2000, maxDamage = -2000, length = 9, spread = 3, effect = CONST_ME_BLOCKHIT, target = false }, + { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 20, minDamage = -2000, maxDamage = -2000, length = 9, spread = 1, effect = CONST_ME_BLOCKHIT, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_enraged_thorn_knight.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_enraged_thorn_knight.lua index 38d27e009af..3ced147e4a0 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_enraged_thorn_knight.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_enraged_thorn_knight.lua @@ -114,9 +114,9 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -600, maxDamage = -1000 }, - { name = "combat", interval = 2000, chance = 12, type = COMBAT_LIFEDRAIN, minDamage = -400, maxDamage = -700, length = 4, spread = 3, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 2000, chance = 12, type = COMBAT_MANADRAIN, minDamage = -1400, maxDamage = -1700, length = 9, spread = 3, effect = CONST_ME_CARNIPHILA, target = false }, - { name = "combat", interval = 2000, chance = 12, type = COMBAT_DEATHDAMAGE, minDamage = -400, maxDamage = -700, length = 9, spread = 3, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 12, type = COMBAT_LIFEDRAIN, minDamage = -400, maxDamage = -700, length = 4, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 2000, chance = 12, type = COMBAT_MANADRAIN, minDamage = -1400, maxDamage = -1700, length = 9, spread = 1, effect = CONST_ME_CARNIPHILA, target = false }, + { name = "combat", interval = 2000, chance = 12, type = COMBAT_DEATHDAMAGE, minDamage = -400, maxDamage = -700, length = 9, spread = 1, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -250, radius = 10, effect = CONST_ME_BLOCKHIT, target = false }, } diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_freezing_time_guardian.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_freezing_time_guardian.lua index ec4aac0f9fa..4c9cba80266 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_freezing_time_guardian.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_freezing_time_guardian.lua @@ -93,12 +93,12 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 190, attack = 300 }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_DEATHDAMAGE, minDamage = -600, maxDamage = -780, range = 7, radius = 4, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_ENERGYHIT, target = true }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -600, maxDamage = -780, length = 9, spread = 3, effect = CONST_ME_ENERGYHIT, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -600, maxDamage = -780, length = 9, spread = 3, effect = CONST_ME_ENERGYAREA, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -600, maxDamage = -780, length = 9, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -600, maxDamage = -780, length = 9, spread = 1, effect = CONST_ME_ENERGYAREA, target = false }, -- energy damage { name = "condition", type = CONDITION_ENERGY, interval = 2000, chance = 20, minDamage = -2000, maxDamage = -2000, radius = 7, effect = CONST_ME_BLOCKHIT, target = false }, -- bleed - { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 20, minDamage = -2000, maxDamage = -2000, length = 9, spread = 3, effect = CONST_ME_BLOCKHIT, target = false }, + { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 20, minDamage = -2000, maxDamage = -2000, length = 9, spread = 1, effect = CONST_ME_BLOCKHIT, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_last_lore_keeper.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_last_lore_keeper.lua index a875379d558..dac92740cf2 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_last_lore_keeper.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_last_lore_keeper.lua @@ -130,10 +130,10 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 140, attack = 80 }, - { name = "combat", interval = 2000, chance = 7, type = COMBAT_PHYSICALDAMAGE, minDamage = -650, maxDamage = -900, length = 8, spread = 3, effect = CONST_ME_EXPLOSIONAREA, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -850, maxDamage = -2260, length = 10, spread = 3, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 7, type = COMBAT_PHYSICALDAMAGE, minDamage = -650, maxDamage = -900, length = 8, spread = 1, effect = CONST_ME_EXPLOSIONAREA, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -850, maxDamage = -2260, length = 10, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -640, maxDamage = -800, radius = 5, effect = CONST_ME_SMALLCLOUDS, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -420, maxDamage = -954, length = 8, spread = 3, effect = CONST_ME_PURPLEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -420, maxDamage = -954, length = 8, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -640, maxDamage = -800, radius = 5, effect = CONST_ME_STONES, target = true }, { name = "medusa paralyze", interval = 2000, chance = 20, target = false }, } diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_shielded_thorn_knight.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_shielded_thorn_knight.lua index f3539476809..d9e1c1c93ab 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_shielded_thorn_knight.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_shielded_thorn_knight.lua @@ -73,9 +73,9 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -600, maxDamage = -1000 }, - { name = "combat", interval = 2000, chance = 12, type = COMBAT_LIFEDRAIN, minDamage = -400, maxDamage = -700, length = 4, spread = 3, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 2000, chance = 12, type = COMBAT_MANADRAIN, minDamage = -1400, maxDamage = -1700, length = 9, spread = 3, effect = CONST_ME_CARNIPHILA, target = false }, - { name = "combat", interval = 2000, chance = 12, type = COMBAT_DEATHDAMAGE, minDamage = -400, maxDamage = -700, length = 9, spread = 3, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 12, type = COMBAT_LIFEDRAIN, minDamage = -400, maxDamage = -700, length = 4, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 2000, chance = 12, type = COMBAT_MANADRAIN, minDamage = -1400, maxDamage = -1700, length = 9, spread = 1, effect = CONST_ME_CARNIPHILA, target = false }, + { name = "combat", interval = 2000, chance = 12, type = COMBAT_DEATHDAMAGE, minDamage = -400, maxDamage = -700, length = 9, spread = 1, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -250, radius = 10, effect = CONST_ME_BLOCKHIT, target = false }, } diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_time_guardian.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_time_guardian.lua index 53d7eee517a..11abce175ea 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_time_guardian.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_time_guardian.lua @@ -114,12 +114,12 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 190, attack = 300 }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_DEATHDAMAGE, minDamage = -600, maxDamage = -780, range = 7, radius = 4, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_ENERGYHIT, target = true }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -600, maxDamage = -780, length = 9, spread = 3, effect = CONST_ME_ENERGYHIT, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -600, maxDamage = -780, length = 9, spread = 3, effect = CONST_ME_ENERGYAREA, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -600, maxDamage = -780, length = 9, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -600, maxDamage = -780, length = 9, spread = 1, effect = CONST_ME_ENERGYAREA, target = false }, -- energy damage { name = "condition", type = CONDITION_ENERGY, interval = 2000, chance = 20, minDamage = -2000, maxDamage = -2000, radius = 7, effect = CONST_ME_BLOCKHIT, target = false }, -- bleed - { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 20, minDamage = -2000, maxDamage = -2000, length = 9, spread = 3, effect = CONST_ME_BLOCKHIT, target = false }, + { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 20, minDamage = -2000, maxDamage = -2000, length = 9, spread = 1, effect = CONST_ME_BLOCKHIT, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/sword_of_vengeance.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/sword_of_vengeance.lua index 4bcd71b8769..80c25dc971b 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/sword_of_vengeance.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/sword_of_vengeance.lua @@ -62,7 +62,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -0, maxDamage = -242 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_MANADRAIN, minDamage = -40, maxDamage = -160, radius = 6, effect = CONST_ME_MAGIC_BLUE, target = false }, { name = "berserk", interval = 2000, chance = 15, minDamage = -40, maxDamage = -160, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -40, maxDamage = -100, length = 4, spread = 3, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -40, maxDamage = -100, length = 4, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/the_distorted_astral_source.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/the_distorted_astral_source.lua index bf4cd796088..b07416e40b9 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/the_distorted_astral_source.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/the_distorted_astral_source.lua @@ -66,7 +66,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -330 }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -500, range = 7, radius = 6, shootEffect = CONST_ANI_ENERGYBALL, effect = CONST_ME_PURPLEENERGY, target = true }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -500, range = 7, radius = 6, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_ENERGYHIT, target = true }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -400, length = 5, spread = 3, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -400, length = 5, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_MANADRAIN, minDamage = -200, maxDamage = -400, radius = 5, effect = CONST_ME_MAGIC_BLUE, target = false }, } diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/thorn_minion.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/thorn_minion.lua index 84c22d0cea8..55b09d59220 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/thorn_minion.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/thorn_minion.lua @@ -69,7 +69,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -100, maxDamage = -195, range = 7, shootEffect = CONST_ANI_POISON, effect = CONST_ME_GREEN_RINGS, target = false }, { name = "speed", interval = 2000, chance = 15, speedChange = -800, range = 7, shootEffect = CONST_ANI_POISON, effect = CONST_ME_GREEN_RINGS, target = false, duration = 30000 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -280, radius = 4, effect = CONST_ME_GROUNDSHAKER, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -200, maxDamage = -400, length = 4, spread = 3, effect = CONST_ME_CARNIPHILA, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -200, maxDamage = -400, length = 4, spread = 1, effect = CONST_ME_CARNIPHILA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/unbound_demon.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/unbound_demon.lua index e9c8e24197d..3a5936460f8 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/unbound_demon.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/unbound_demon.lua @@ -66,7 +66,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = 0, maxDamage = -120, range = 7, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -150, maxDamage = -250, range = 7, radius = 7, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true }, { name = "firefield", interval = 2000, chance = 10, range = 7, radius = 1, shootEffect = CONST_ANI_FIRE, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -490, length = 8, spread = 0, effect = CONST_ME_PURPLEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -490, length = 8, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -210, maxDamage = -300, range = 1, shootEffect = CONST_ANI_ENERGY, target = false }, { name = "speed", interval = 2000, chance = 15, speedChange = -700, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 30000 }, } diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/unbound_demon_outcast.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/unbound_demon_outcast.lua index 3bd48a8d070..f6d7940fbb6 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/unbound_demon_outcast.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/unbound_demon_outcast.lua @@ -70,8 +70,8 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -250, maxDamage = -450, length = 6, spread = 3, effect = CONST_ME_PURPLEENERGY, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -350, maxDamage = -550, length = 8, spread = 3, effect = CONST_ME_YELLOWENERGY, target = true }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -250, maxDamage = -450, length = 6, spread = 1, effect = CONST_ME_PURPLEENERGY, target = true }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -350, maxDamage = -550, length = 8, spread = 1, effect = CONST_ME_YELLOWENERGY, target = true }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -100, maxDamage = -250, radius = 3, effect = CONST_ME_ENERGYHIT, target = true }, { name = "demon outcast skill reducer", interval = 2000, chance = 10, range = 5, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -80, maxDamage = -150, radius = 4, effect = CONST_ME_MAGIC_GREEN, target = false }, diff --git a/data-otservbr-global/monster/quests/grave_danger/bosses/count_vlarkorth.lua b/data-otservbr-global/monster/quests/grave_danger/bosses/count_vlarkorth.lua index ebe04c8ec92..c8d0a2b6596 100644 --- a/data-otservbr-global/monster/quests/grave_danger/bosses/count_vlarkorth.lua +++ b/data-otservbr-global/monster/quests/grave_danger/bosses/count_vlarkorth.lua @@ -111,8 +111,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -800, effect = CONST_ME_DRAWBLOOD }, { name = "combat", interval = 2300, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -250, maxDamage = -350, range = 1, effect = CONST_ME_MAGIC_RED, target = true }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_MANADRAIN, minDamage = -1, maxDamage = -250, length = 7, spread = 3, effect = CONST_ME_SMALLCLOUDS, target = false }, - { name = "combat", interval = 2500, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -500, maxDamage = -1500, length = 7, spread = 0, effect = CONST_ME_HITBYFIRE, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_MANADRAIN, minDamage = -1, maxDamage = -250, length = 7, spread = 1, effect = CONST_ME_SMALLCLOUDS, target = false }, + { name = "combat", interval = 2500, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -500, maxDamage = -1500, length = 7, spread = 1, effect = CONST_ME_HITBYFIRE, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/grave_danger/bosses/duke_krule.lua b/data-otservbr-global/monster/quests/grave_danger/bosses/duke_krule.lua index 0760491d1bc..6955a82c433 100644 --- a/data-otservbr-global/monster/quests/grave_danger/bosses/duke_krule.lua +++ b/data-otservbr-global/monster/quests/grave_danger/bosses/duke_krule.lua @@ -103,8 +103,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -900 }, - { name = "combat", interval = 3500, chance = 37, type = COMBAT_PHYSICALDAMAGE, minDamage = -700, maxDamage = -1200, length = 7, spread = 3, effect = CONST_ME_BLOCKHIT, target = false }, - { name = "combat", interval = 2500, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -400, maxDamage = -1000, length = 7, spread = 0, effect = CONST_ME_BLOCKHIT, target = false }, + { name = "combat", interval = 3500, chance = 37, type = COMBAT_PHYSICALDAMAGE, minDamage = -700, maxDamage = -1200, length = 7, spread = 1, effect = CONST_ME_BLOCKHIT, target = false }, + { name = "combat", interval = 2500, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -400, maxDamage = -1000, length = 7, spread = 1, effect = CONST_ME_BLOCKHIT, target = false }, { name = "combat", interval = 4200, chance = 40, type = COMBAT_FIREDAMAGE, minDamage = -300, maxDamage = -500, radius = 9, effect = CONST_ME_HITBYFIRE, target = false }, } diff --git a/data-otservbr-global/monster/quests/grave_danger/bosses/earl_osam.lua b/data-otservbr-global/monster/quests/grave_danger/bosses/earl_osam.lua index c996116a336..250f5d8547a 100644 --- a/data-otservbr-global/monster/quests/grave_danger/bosses/earl_osam.lua +++ b/data-otservbr-global/monster/quests/grave_danger/bosses/earl_osam.lua @@ -106,7 +106,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -1000, effect = CONST_ME_DRAWBLOOD }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_ICEDAMAGE, minDamage = -400, maxDamage = -1000, length = 7, spread = 0, effect = CONST_ME_ICEATTACK, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_ICEDAMAGE, minDamage = -400, maxDamage = -1000, length = 7, spread = 1, effect = CONST_ME_ICEATTACK, target = false }, { name = "ice chain", interval = 2500, chance = 25, minDamage = -260, maxDamage = -360, range = 3, target = true }, { name = "combat", interval = 3500, chance = 37, type = COMBAT_EARTHDAMAGE, minDamage = -400, maxDamage = -1000, length = 7, spread = 2, effect = CONST_ME_POISONAREA, target = false }, } diff --git a/data-otservbr-global/monster/quests/grave_danger/bosses/king_zelos.lua b/data-otservbr-global/monster/quests/grave_danger/bosses/king_zelos.lua index 0201e821448..3d2a50ff36f 100644 --- a/data-otservbr-global/monster/quests/grave_danger/bosses/king_zelos.lua +++ b/data-otservbr-global/monster/quests/grave_danger/bosses/king_zelos.lua @@ -84,8 +84,8 @@ monster.loot = { monster.attacks = { { name = "melee", type = COMBAT_PHYSICALDAMAGE, interval = 2000, minDamage = -900, maxDamage = -2700 }, - { name = "combat", type = COMBAT_FIREDAMAGE, interval = 2000, chance = 15, length = 8, spread = 0, minDamage = -1200, maxDamage = -3200, effect = CONST_ME_HITBYFIRE }, - { name = "combat", type = COMBAT_LIFEDRAIN, interval = 2000, chance = 10, length = 8, spread = 3, minDamage = -600, maxDamage = -1600, effect = CONST_ME_SMALLCLOUDS }, + { name = "combat", type = COMBAT_FIREDAMAGE, interval = 2000, chance = 15, length = 8, spread = 1, minDamage = -1200, maxDamage = -3200, effect = CONST_ME_HITBYFIRE }, + { name = "combat", type = COMBAT_LIFEDRAIN, interval = 2000, chance = 10, length = 8, spread = 1, minDamage = -600, maxDamage = -1600, effect = CONST_ME_SMALLCLOUDS }, { name = "combat", type = COMBAT_DEATHDAMAGE, interval = 2000, chance = 30, radius = 6, minDamage = -1200, maxDamage = -1500, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", type = COMBAT_DEATHDAMAGE, interval = 2000, chance = 20, length = 8, minDamage = -1700, maxDamage = -2000, effect = CONST_ME_MORTAREA, target = false }, } diff --git a/data-otservbr-global/monster/quests/grave_danger/bosses/lord_azaram.lua b/data-otservbr-global/monster/quests/grave_danger/bosses/lord_azaram.lua index 701a0b6f92b..6b40f5348c8 100644 --- a/data-otservbr-global/monster/quests/grave_danger/bosses/lord_azaram.lua +++ b/data-otservbr-global/monster/quests/grave_danger/bosses/lord_azaram.lua @@ -109,7 +109,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -1000, effect = CONST_ME_DRAWBLOOD }, { name = "lord azaram wave", interval = 3500, chance = 50, minDamage = -360, maxDamage = -900 }, - { name = "combat", interval = 2700, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -500, maxDamage = -1200, length = 7, spread = 0, effect = CONST_ME_STONES, target = false }, + { name = "combat", interval = 2700, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -500, maxDamage = -1200, length = 7, spread = 1, effect = CONST_ME_STONES, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/grave_danger/bosses/sir_baeloc.lua b/data-otservbr-global/monster/quests/grave_danger/bosses/sir_baeloc.lua index 042ce32e981..cedfea01aee 100644 --- a/data-otservbr-global/monster/quests/grave_danger/bosses/sir_baeloc.lua +++ b/data-otservbr-global/monster/quests/grave_danger/bosses/sir_baeloc.lua @@ -104,7 +104,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -900, effect = CONST_ME_DRAWBLOOD }, - { name = "combat", interval = 3100, chance = 37, type = COMBAT_PHYSICALDAMAGE, minDamage = -400, maxDamage = -1000, length = 7, spread = 0, effect = CONST_ME_DRAWBLOOD, target = false }, + { name = "combat", interval = 3100, chance = 37, type = COMBAT_PHYSICALDAMAGE, minDamage = -400, maxDamage = -1000, length = 7, spread = 1, effect = CONST_ME_DRAWBLOOD, target = false }, { name = "combat", interval = 2500, chance = 35, type = COMBAT_PHYSICALDAMAGE, minDamage = -350, maxDamage = -625, range = 5, shootEffect = CONST_ANI_WHIRLWINDAXE, effect = CONST_ME_DRAWBLOOD, target = true }, { name = "combat", interval = 2700, chance = 30, type = COMBAT_DEATHDAMAGE, minDamage = -180, maxDamage = -250, range = 1, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = true }, } diff --git a/data-otservbr-global/monster/quests/grave_danger/bosses/sir_nictros.lua b/data-otservbr-global/monster/quests/grave_danger/bosses/sir_nictros.lua index 8637363a949..fcb5c8599aa 100644 --- a/data-otservbr-global/monster/quests/grave_danger/bosses/sir_nictros.lua +++ b/data-otservbr-global/monster/quests/grave_danger/bosses/sir_nictros.lua @@ -90,7 +90,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -900, effect = CONST_ME_DRAWBLOOD }, - { name = "combat", interval = 3100, chance = 37, type = COMBAT_PHYSICALDAMAGE, minDamage = -400, maxDamage = -1000, length = 7, spread = 0, effect = CONST_ME_DRAWBLOOD, target = false }, + { name = "combat", interval = 3100, chance = 37, type = COMBAT_PHYSICALDAMAGE, minDamage = -400, maxDamage = -1000, length = 7, spread = 1, effect = CONST_ME_DRAWBLOOD, target = false }, { name = "combat", interval = 2500, chance = 35, type = COMBAT_PHYSICALDAMAGE, minDamage = -350, maxDamage = -625, range = 5, shootEffect = CONST_ANI_WHIRLWINDAXE, effect = CONST_ME_DRAWBLOOD, target = true }, { name = "combat", interval = 2700, chance = 30, type = COMBAT_DEATHDAMAGE, minDamage = -180, maxDamage = -250, range = 1, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = true }, } diff --git a/data-otservbr-global/monster/quests/grave_danger/shard_of_magnor.lua b/data-otservbr-global/monster/quests/grave_danger/shard_of_magnor.lua index fb284fb52d1..84897a75ae3 100644 --- a/data-otservbr-global/monster/quests/grave_danger/shard_of_magnor.lua +++ b/data-otservbr-global/monster/quests/grave_danger/shard_of_magnor.lua @@ -63,8 +63,8 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -200, maxDamage = -600 }, - { name = "combat", interval = 2000, chance = 50, type = COMBAT_MANADRAIN, minDamage = -400, maxDamage = -1000, length = 7, spread = 3, effect = CONST_ME_STONES, target = false }, - { name = "combat", interval = 2000, chance = 70, type = COMBAT_PHYSICALDAMAGE, minDamage = -400, maxDamage = -1000, length = 7, spread = 3, effect = CONST_ME_POISONAREA, target = false }, + { name = "combat", interval = 2000, chance = 50, type = COMBAT_MANADRAIN, minDamage = -400, maxDamage = -1000, length = 7, spread = 1, effect = CONST_ME_STONES, target = false }, + { name = "combat", interval = 2000, chance = 70, type = COMBAT_PHYSICALDAMAGE, minDamage = -400, maxDamage = -1000, length = 7, spread = 1, effect = CONST_ME_POISONAREA, target = false }, { name = "combat", interval = 2000, chance = 0, type = COMBAT_ENERGYDAMAGE, minDamage = -400, maxDamage = -650, radius = 3, effect = CONST_ME_GREEN_ENERGY_SPARK, target = true }, } diff --git a/data-otservbr-global/monster/quests/grave_danger/vampiric_blood.lua b/data-otservbr-global/monster/quests/grave_danger/vampiric_blood.lua index 72c91a71ce4..fec9c98c304 100644 --- a/data-otservbr-global/monster/quests/grave_danger/vampiric_blood.lua +++ b/data-otservbr-global/monster/quests/grave_danger/vampiric_blood.lua @@ -63,8 +63,8 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, - { name = "combat", interval = 1000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -250, maxDamage = -300, range = 7, length = 3, spread = 3, effect = CONST_ME_HITBYFIRE, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_FIREDAMAGE, minDamage = 0, maxDamage = -100, range = 7, length = 6, spread = 3, effect = CONST_ME_HITBYFIRE, target = false }, + { name = "combat", interval = 1000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -250, maxDamage = -300, range = 7, length = 3, spread = 1, effect = CONST_ME_HITBYFIRE, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_FIREDAMAGE, minDamage = 0, maxDamage = -100, range = 7, length = 6, spread = 1, effect = CONST_ME_HITBYFIRE, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/aftershock.lua b/data-otservbr-global/monster/quests/heart_of_destruction/aftershock.lua index 2a23f77dc87..936e8dad57b 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/aftershock.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/aftershock.lua @@ -70,7 +70,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -800 }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -350, maxDamage = -900, length = 10, spread = 3, effect = CONST_ME_BIGCLOUDS, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -350, maxDamage = -900, length = 10, spread = 1, effect = CONST_ME_BIGCLOUDS, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -250, maxDamage = -500, radius = 4, effect = CONST_ME_SMALLCLOUDS, target = true }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -250, maxDamage = -750, radius = 8, effect = CONST_ME_BLOCKHIT, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -150, maxDamage = -400, radius = 5, effect = CONST_ME_MAGIC_BLUE, target = true }, diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/anomaly.lua b/data-otservbr-global/monster/quests/heart_of_destruction/anomaly.lua index 0eb67d63fe6..cfc30506c50 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/anomaly.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/anomaly.lua @@ -113,8 +113,8 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -300, maxDamage = -1400 }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -600, radius = 4, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = true }, { name = "anomaly wave", interval = 2000, chance = 25, minDamage = -500, maxDamage = -900, target = false }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = -600, maxDamage = -1000, length = 9, spread = 3, effect = CONST_ME_EXPLOSIONHIT, target = false }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -600, length = 9, spread = 3, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = -600, maxDamage = -1000, length = 9, spread = 1, effect = CONST_ME_EXPLOSIONHIT, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -600, length = 9, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, { name = "anomaly break", interval = 2000, chance = 40, target = false }, } diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/charged_anomaly.lua b/data-otservbr-global/monster/quests/heart_of_destruction/charged_anomaly.lua index 7b36447eb3a..b7606ff39af 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/charged_anomaly.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/charged_anomaly.lua @@ -70,8 +70,8 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -900, maxDamage = -2100 }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -500, maxDamage = -900, radius = 3, effect = CONST_ME_BIGCLOUDS, target = false }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -350, maxDamage = -700, length = 7, spread = 3, effect = CONST_ME_ENERGYAREA, target = false }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -500, maxDamage = -800, length = 7, spread = 3, effect = CONST_ME_YELLOWENERGY, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -350, maxDamage = -700, length = 7, spread = 1, effect = CONST_ME_ENERGYAREA, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -500, maxDamage = -800, length = 7, spread = 1, effect = CONST_ME_YELLOWENERGY, target = false }, { name = "anomaly break", interval = 2000, chance = 40, target = false }, { name = "charge vortex", interval = 9000, chance = 100, target = false }, } diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/charging_outburst.lua b/data-otservbr-global/monster/quests/heart_of_destruction/charging_outburst.lua index f003c75459a..bb1ae1d2e9e 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/charging_outburst.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/charging_outburst.lua @@ -72,7 +72,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -300, maxDamage = -1800 }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -500, radius = 3, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = -450, maxDamage = -900, radius = 8, effect = CONST_ME_BLOCKHIT, target = false }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = -600, maxDamage = -1000, length = 8, spread = 3, effect = CONST_ME_BLOCKHIT, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = -600, maxDamage = -1000, length = 8, spread = 1, effect = CONST_ME_BLOCKHIT, target = false }, { name = "anomaly break", interval = 2000, chance = 40, target = false }, { name = "outburst explode", interval = 10000, chance = 100, minDamage = -1500, maxDamage = -2000, target = false }, } diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/depolarized_crackler.lua b/data-otservbr-global/monster/quests/heart_of_destruction/depolarized_crackler.lua index 2387233e8b7..478feac779f 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/depolarized_crackler.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/depolarized_crackler.lua @@ -72,7 +72,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -400 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -180, maxDamage = -500, radius = 6, shootEffect = CONST_ANI_ENERGYBALL, effect = CONST_ME_LOSEENERGY, target = true }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -300, maxDamage = -700, length = 10, spread = 3, effect = CONST_ME_TELEPORT, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -300, maxDamage = -700, length = 10, spread = 1, effect = CONST_ME_TELEPORT, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -180, maxDamage = -350, radius = 8, effect = CONST_ME_POFF, target = false }, } diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/eradicator.lua b/data-otservbr-global/monster/quests/heart_of_destruction/eradicator.lua index e6d203eac47..caaff64e705 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/eradicator.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/eradicator.lua @@ -103,8 +103,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -300, maxDamage = -1800 }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -600, maxDamage = -1000, length = 8, spread = 3, effect = CONST_ME_BLOCKHIT, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -600, maxDamage = -1000, length = 8, spread = 3, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -600, maxDamage = -1000, length = 8, spread = 1, effect = CONST_ME_BLOCKHIT, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -600, maxDamage = -1000, length = 8, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -450, maxDamage = -900, radius = 8, effect = CONST_ME_BLOCKHIT, target = false }, { name = "big energy wave", interval = 2000, chance = 20, minDamage = -700, maxDamage = -1000, target = false }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -600, radius = 4, effect = CONST_ME_ENERGYHIT, target = true }, diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/eradicator2.lua b/data-otservbr-global/monster/quests/heart_of_destruction/eradicator2.lua index ed8e9279e68..218b861b665 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/eradicator2.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/eradicator2.lua @@ -103,7 +103,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -300, maxDamage = -1800 }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -600, maxDamage = -1000, length = 8, spread = 3, effect = CONST_ME_BLOCKHIT, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -600, maxDamage = -1000, length = 8, spread = 1, effect = CONST_ME_BLOCKHIT, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -450, maxDamage = -900, radius = 8, effect = CONST_ME_BLOCKHIT, target = false }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_HOLYDAMAGE, minDamage = -300, maxDamage = -600, radius = 4, shootEffect = CONST_ANI_SMALLHOLY, effect = CONST_ME_HOLYDAMAGE, target = true }, { name = "big lifedrain wave", interval = 2000, chance = 20, minDamage = -700, maxDamage = -1000, target = false }, diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/foreshock.lua b/data-otservbr-global/monster/quests/heart_of_destruction/foreshock.lua index 65283626c77..6ed245a3a67 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/foreshock.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/foreshock.lua @@ -71,11 +71,11 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -400, maxDamage = -1000 }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -350, maxDamage = -800, length = 10, spread = 3, effect = CONST_ME_LOSEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -350, maxDamage = -800, length = 10, spread = 1, effect = CONST_ME_LOSEENERGY, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -400, maxDamage = -1000, radius = 8, effect = CONST_ME_HITAREA, target = false }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = -350, maxDamage = -600, length = 10, spread = 3, effect = CONST_ME_BLOCKHIT, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = -350, maxDamage = -600, length = 10, spread = 1, effect = CONST_ME_BLOCKHIT, target = false }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_HOLYDAMAGE, minDamage = -350, maxDamage = -800, radius = 4, effect = CONST_ME_HOLYDAMAGE, target = true }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = -150, maxDamage = -300, length = 2, spread = 0, effect = CONST_ME_HITAREA, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = -150, maxDamage = -300, length = 2, spread = 1, effect = CONST_ME_HITAREA, target = false }, { name = "anomaly break", interval = 2000, chance = 40, target = false }, } diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/greed.lua b/data-otservbr-global/monster/quests/heart_of_destruction/greed.lua index 5dce33bf083..4803ecd25fa 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/greed.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/greed.lua @@ -67,7 +67,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -940 }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -600, radius = 6, shootEffect = CONST_ANI_ENERGYBALL, effect = CONST_ME_LOSEENERGY, target = true }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -300, maxDamage = -700, length = 9, spread = 3, effect = CONST_ME_TELEPORT, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -300, maxDamage = -700, length = 9, spread = 1, effect = CONST_ME_TELEPORT, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, radius = 7, effect = CONST_ME_POFF, target = false }, { name = "anomaly break", interval = 2000, chance = 40, target = false }, } diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/outburst.lua b/data-otservbr-global/monster/quests/heart_of_destruction/outburst.lua index 936f58ad1c9..ee0e51bed30 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/outburst.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/outburst.lua @@ -96,8 +96,8 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -300, maxDamage = -1800 }, { name = "big energy purple wave", interval = 2000, chance = 25, minDamage = -700, maxDamage = -1300, target = false }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -600, radius = 4, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_ENERGYAREA, target = true }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = -800, maxDamage = -1300, length = 8, spread = 3, effect = CONST_ME_HITAREA, target = false }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_LIFEDRAIN, minDamage = -600, maxDamage = -900, length = 8, spread = 3, effect = CONST_ME_MAGIC_BLUE, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = -800, maxDamage = -1300, length = 8, spread = 1, effect = CONST_ME_HITAREA, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_LIFEDRAIN, minDamage = -600, maxDamage = -900, length = 8, spread = 1, effect = CONST_ME_MAGIC_BLUE, target = false }, { name = "big skill reducer", interval = 2000, chance = 25, target = false }, { name = "anomaly break", interval = 2000, chance = 40, target = false }, } diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/overcharge.lua b/data-otservbr-global/monster/quests/heart_of_destruction/overcharge.lua index dc29e89451b..63b060a73f4 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/overcharge.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/overcharge.lua @@ -72,7 +72,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -500 }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -500, radius = 5, shootEffect = CONST_ANI_ENERGYBALL, effect = CONST_ME_LOSEENERGY, target = true }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -400, radius = 7, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -300, maxDamage = -670, length = 9, spread = 3, effect = CONST_ME_TELEPORT, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -300, maxDamage = -670, length = 9, spread = 1, effect = CONST_ME_TELEPORT, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/realityquake.lua b/data-otservbr-global/monster/quests/heart_of_destruction/realityquake.lua index afd0226424d..8b10d2c21c0 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/realityquake.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/realityquake.lua @@ -91,8 +91,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -400, maxDamage = -1000 }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -350, maxDamage = -800, length = 10, spread = 3, effect = CONST_ME_ENERGYAREA, target = false }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = -350, maxDamage = -800, length = 10, spread = 3, effect = CONST_ME_BLOCKHIT, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -350, maxDamage = -800, length = 10, spread = 1, effect = CONST_ME_ENERGYAREA, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = -350, maxDamage = -800, length = 10, spread = 1, effect = CONST_ME_BLOCKHIT, target = false }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = -240, maxDamage = -600, radius = 5, effect = CONST_ME_POFF, target = true }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_HOLYDAMAGE, minDamage = -240, maxDamage = -600, radius = 5, shootEffect = CONST_ANI_HOLY, effect = CONST_ME_HOLYDAMAGE, target = true }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_EARTHDAMAGE, minDamage = -200, maxDamage = -450, length = 4, spread = 2, effect = CONST_ME_MAGIC_RED, target = false }, diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/rupture.lua b/data-otservbr-global/monster/quests/heart_of_destruction/rupture.lua index c49d49d5d30..d3bb594dfa0 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/rupture.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/rupture.lua @@ -97,10 +97,10 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -250, maxDamage = -1000 }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -350, maxDamage = -800, length = 10, spread = 3, effect = CONST_ME_LOSEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -350, maxDamage = -800, length = 10, spread = 1, effect = CONST_ME_LOSEENERGY, target = false }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_DEATHDAMAGE, minDamage = -150, maxDamage = -300, radius = 4, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_SMALLCLOUDS, target = true }, { name = "rupture wave", interval = 2000, chance = 20, minDamage = -700, maxDamage = -1100, target = false }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -600, length = 9, spread = 3, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -600, length = 9, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, { name = "anomaly break", interval = 2000, chance = 40, target = false }, } diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/the_destruction.lua b/data-otservbr-global/monster/quests/heart_of_destruction/the_destruction.lua index 9695be76048..7d4b7aa87d8 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/the_destruction.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/the_destruction.lua @@ -72,10 +72,10 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -1393 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -600, radius = 4, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_YELLOWENERGY, target = true }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -400, maxDamage = -800, radius = 4, shootEffect = CONST_ANI_ENERGYBALL, effect = CONST_ME_EXPLOSIONAREA, target = true }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -200, maxDamage = -400, length = 10, spread = 3, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -200, maxDamage = -400, length = 10, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, radius = 8, effect = CONST_ME_MAGIC_RED, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -500, maxDamage = -900, length = 10, spread = 3, effect = CONST_ME_BLOCKHIT, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -500, maxDamage = -900, length = 10, spread = 3, effect = CONST_ME_EXPLOSIONHIT, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -500, maxDamage = -900, length = 10, spread = 1, effect = CONST_ME_BLOCKHIT, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -500, maxDamage = -900, length = 10, spread = 1, effect = CONST_ME_EXPLOSIONHIT, target = false }, { name = "anomaly break", interval = 2000, chance = 40, target = false }, { name = "destruction summon", interval = 2000, chance = 20, target = false }, } diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/the_hunger.lua b/data-otservbr-global/monster/quests/heart_of_destruction/the_hunger.lua index 2a8db03fc42..7155aee3dc4 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/the_hunger.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/the_hunger.lua @@ -72,8 +72,8 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -962 }, { name = "practise fire wave", interval = 2000, chance = 20, minDamage = -600, maxDamage = -900, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, radius = 8, effect = CONST_ME_MAGIC_RED, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -700, maxDamage = -1100, length = 10, spread = 3, effect = CONST_ME_EXPLOSIONHIT, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -200, maxDamage = -400, length = 10, spread = 3, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -700, maxDamage = -1100, length = 10, spread = 1, effect = CONST_ME_EXPLOSIONHIT, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -200, maxDamage = -400, length = 10, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, { name = "anomaly break", interval = 2000, chance = 40, target = false }, { name = "hunger summon", interval = 2000, chance = 20, target = false }, } diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/the_rage.lua b/data-otservbr-global/monster/quests/heart_of_destruction/the_rage.lua index f648df139f4..855b599c64c 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/the_rage.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/the_rage.lua @@ -71,11 +71,11 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -740 }, { name = "big death wave", interval = 2000, chance = 20, minDamage = -600, maxDamage = -900, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -200, maxDamage = -400, length = 10, spread = 3, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -200, maxDamage = -400, length = 10, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -600, radius = 4, effect = CONST_ME_SMALLCLOUDS, target = true }, { name = "big explosion wave", interval = 2000, chance = 20, minDamage = -600, maxDamage = -900, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, radius = 8, effect = CONST_ME_MAGIC_RED, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -600, length = 10, spread = 3, effect = CONST_ME_YELLOW_RINGS, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -600, length = 10, spread = 1, effect = CONST_ME_YELLOW_RINGS, target = false }, { name = "anomaly break", interval = 2000, chance = 40, target = false }, { name = "rage summon", interval = 2000, chance = 20, target = false }, } diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/unstable_spark.lua b/data-otservbr-global/monster/quests/heart_of_destruction/unstable_spark.lua index bbfb1938a3c..7c42a741242 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/unstable_spark.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/unstable_spark.lua @@ -71,7 +71,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -500 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -180, maxDamage = -500, radius = 6, shootEffect = CONST_ANI_ENERGYBALL, effect = CONST_ME_LOSEENERGY, target = true }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -300, maxDamage = -700, length = 10, spread = 3, effect = CONST_ME_TELEPORT, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -300, maxDamage = -700, length = 10, spread = 1, effect = CONST_ME_TELEPORT, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -180, maxDamage = -350, radius = 8, effect = CONST_ME_POFF, target = false }, } diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/world_devourer.lua b/data-otservbr-global/monster/quests/heart_of_destruction/world_devourer.lua index 5718a22de83..d40bddcc6e2 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/world_devourer.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/world_devourer.lua @@ -100,10 +100,10 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -1600 }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -400, maxDamage = -800, length = 10, spread = 3, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -400, maxDamage = -800, length = 10, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -400, maxDamage = -800, radius = 4, effect = CONST_ME_SMALLCLOUDS, target = true }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -400, maxDamage = -800, radius = 4, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_YELLOWENERGY, target = true }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -600, maxDamage = -1200, length = 10, spread = 3, effect = CONST_ME_LOSEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -600, maxDamage = -1200, length = 10, spread = 1, effect = CONST_ME_LOSEENERGY, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, radius = 8, effect = CONST_ME_MAGIC_RED, target = false }, { name = "anomaly break", interval = 2000, chance = 40, target = false }, { name = "devourer summon", interval = 2000, chance = 25, target = false }, diff --git a/data-otservbr-global/monster/quests/hero_of_rathleton/deep_terror.lua b/data-otservbr-global/monster/quests/hero_of_rathleton/deep_terror.lua index 534175a881a..401864b9341 100644 --- a/data-otservbr-global/monster/quests/hero_of_rathleton/deep_terror.lua +++ b/data-otservbr-global/monster/quests/hero_of_rathleton/deep_terror.lua @@ -79,7 +79,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 130, attack = 100 }, { name = "combat", interval = 2000, chance = 32, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -400, radius = 8, effect = CONST_ME_CARNIPHILA, target = false }, { name = "combat", interval = 2000, chance = 19, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -700, range = 7, radius = 3, shootEffect = CONST_ANI_POISON, effect = CONST_ME_CARNIPHILA, target = true }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = -500, maxDamage = -1000, length = 7, spread = 3, effect = CONST_ME_GROUNDSHAKER, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = -500, maxDamage = -1000, length = 7, spread = 1, effect = CONST_ME_GROUNDSHAKER, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/hero_of_rathleton/glooth_horror.lua b/data-otservbr-global/monster/quests/hero_of_rathleton/glooth_horror.lua index eec6132974e..65ea9463d10 100644 --- a/data-otservbr-global/monster/quests/hero_of_rathleton/glooth_horror.lua +++ b/data-otservbr-global/monster/quests/hero_of_rathleton/glooth_horror.lua @@ -70,7 +70,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 110, attack = 100 }, - { name = "combat", interval = 2000, chance = 9, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -700, length = 8, spread = 3, target = false }, + { name = "combat", interval = 2000, chance = 9, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -700, length = 8, spread = 1, target = false }, { name = "drunk", interval = 2000, chance = 8, radius = 8, effect = CONST_ME_HITBYPOISON, target = false, duration = 15000 }, } diff --git a/data-otservbr-global/monster/quests/hero_of_rathleton/professor_maxxen.lua b/data-otservbr-global/monster/quests/hero_of_rathleton/professor_maxxen.lua index 8a1ec35e913..8418c33451b 100644 --- a/data-otservbr-global/monster/quests/hero_of_rathleton/professor_maxxen.lua +++ b/data-otservbr-global/monster/quests/hero_of_rathleton/professor_maxxen.lua @@ -89,8 +89,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 180, attack = 200 }, { name = "combat", interval = 2000, chance = 11, type = COMBAT_ENERGYDAMAGE, minDamage = -250, maxDamage = -500, radius = 8, effect = CONST_ME_ENERGYHIT, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_MANADRAIN, minDamage = -450, maxDamage = -1500, length = 8, spread = 3, effect = CONST_ME_TELEPORT, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -450, maxDamage = -500, length = 8, spread = 3, effect = CONST_ME_FIREATTACK, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_MANADRAIN, minDamage = -450, maxDamage = -1500, length = 8, spread = 1, effect = CONST_ME_TELEPORT, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -450, maxDamage = -500, length = 8, spread = 1, effect = CONST_ME_FIREATTACK, target = false }, { name = "war golem skill reducer", interval = 2000, chance = 22, target = false }, { name = "war golem electrify", interval = 2000, chance = 16, range = 2, target = false }, { name = "glooth fairy skill reducer", interval = 2000, chance = 20, target = false }, diff --git a/data-otservbr-global/monster/quests/hero_of_rathleton/weakened_glooth_horror.lua b/data-otservbr-global/monster/quests/hero_of_rathleton/weakened_glooth_horror.lua index b3df6a5785d..20d5c0824ae 100644 --- a/data-otservbr-global/monster/quests/hero_of_rathleton/weakened_glooth_horror.lua +++ b/data-otservbr-global/monster/quests/hero_of_rathleton/weakened_glooth_horror.lua @@ -70,7 +70,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 90, attack = 100 }, - { name = "combat", interval = 2000, chance = 17, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -600, length = 8, spread = 3, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 17, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -600, length = 8, spread = 1, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 2000, chance = 11, type = COMBAT_DEATHDAMAGE, minDamage = -200, maxDamage = -400, range = 1, shootEffect = CONST_ANI_POISON, target = true }, } diff --git a/data-otservbr-global/monster/quests/in_service_of_yalahar/azerus.lua b/data-otservbr-global/monster/quests/in_service_of_yalahar/azerus.lua index 87329f07738..e54b6f8e6a8 100644 --- a/data-otservbr-global/monster/quests/in_service_of_yalahar/azerus.lua +++ b/data-otservbr-global/monster/quests/in_service_of_yalahar/azerus.lua @@ -97,7 +97,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -900 }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_MANADRAIN, minDamage = 0, maxDamage = -3800, range = 7, radius = 4, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_BIGCLOUDS, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = 0, maxDamage = -524, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -300, maxDamage = -1050, length = 8, spread = 3, effect = CONST_ME_FIREATTACK, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -300, maxDamage = -1050, length = 8, spread = 1, effect = CONST_ME_FIREATTACK, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/in_service_of_yalahar/azerus2.lua b/data-otservbr-global/monster/quests/in_service_of_yalahar/azerus2.lua index 19f074c17eb..c41f6312909 100644 --- a/data-otservbr-global/monster/quests/in_service_of_yalahar/azerus2.lua +++ b/data-otservbr-global/monster/quests/in_service_of_yalahar/azerus2.lua @@ -93,7 +93,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -900 }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_MANADRAIN, minDamage = 0, maxDamage = -3800, range = 7, radius = 4, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_BIGCLOUDS, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = 0, maxDamage = -524, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -300, maxDamage = -1050, length = 8, spread = 3, effect = CONST_ME_FIREATTACK, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -300, maxDamage = -1050, length = 8, spread = 1, effect = CONST_ME_FIREATTACK, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/in_service_of_yalahar/rift_scythe.lua b/data-otservbr-global/monster/quests/in_service_of_yalahar/rift_scythe.lua index 25246da0ef3..7e9d4806dd6 100644 --- a/data-otservbr-global/monster/quests/in_service_of_yalahar/rift_scythe.lua +++ b/data-otservbr-global/monster/quests/in_service_of_yalahar/rift_scythe.lua @@ -67,9 +67,9 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -979 }, { name = "combat", interval = 2000, chance = 60, type = COMBAT_DEATHDAMAGE, minDamage = 0, maxDamage = -200, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = true }, - { name = "combat", interval = 2000, chance = 50, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -600, length = 7, spread = 3, target = false }, + { name = "combat", interval = 2000, chance = 50, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -600, length = 7, spread = 1, target = false }, { name = "combat", interval = 2000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -395, radius = 4, target = false }, - { name = "combat", interval = 3000, chance = 60, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -300, length = 7, spread = 3, effect = CONST_ME_EXPLOSIONAREA, target = false }, + { name = "combat", interval = 3000, chance = 60, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -300, length = 7, spread = 1, effect = CONST_ME_EXPLOSIONAREA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/killing_in_the_name_of/bruise_payne.lua b/data-otservbr-global/monster/quests/killing_in_the_name_of/bruise_payne.lua index b86b5a75873..e81ca7aaa65 100644 --- a/data-otservbr-global/monster/quests/killing_in_the_name_of/bruise_payne.lua +++ b/data-otservbr-global/monster/quests/killing_in_the_name_of/bruise_payne.lua @@ -81,7 +81,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 15, type = COMBAT_DROWNDAMAGE, minDamage = -130, maxDamage = -237, radius = 6, effect = CONST_ME_SOUND_WHITE, target = false }, { name = "mutated bat curse", interval = 2000, chance = 10, target = false }, -- poison - { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 15, minDamage = -12, maxDamage = -12, length = 4, spread = 3, effect = CONST_ME_POISONAREA, target = false }, + { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 15, minDamage = -12, maxDamage = -12, length = 4, spread = 1, effect = CONST_ME_POISONAREA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/kilmaresh/amenef_the_burning.lua b/data-otservbr-global/monster/quests/kilmaresh/amenef_the_burning.lua index c73dd05ae33..7326b1373cc 100644 --- a/data-otservbr-global/monster/quests/kilmaresh/amenef_the_burning.lua +++ b/data-otservbr-global/monster/quests/kilmaresh/amenef_the_burning.lua @@ -101,7 +101,7 @@ monster.attacks = { { name = "firering", interval = 2000, chance = 10, minDamage = -300, maxDamage = -600, target = false }, { name = "firex", interval = 2000, chance = 15, minDamage = -450, maxDamage = -750, target = false }, { name = "combat", interval = 2000, chance = 17, type = COMBAT_FIREDAMAGE, minDamage = -300, maxDamage = -600, radius = 2, effect = CONST_ME_FIREATTACK, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -500, maxDamage = -750, length = 3, spread = 0, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -500, maxDamage = -750, length = 3, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/mysterious_ornate_chest/reflection_of_mawhawk.lua b/data-otservbr-global/monster/quests/mysterious_ornate_chest/reflection_of_mawhawk.lua index a2806343a65..4a0f39e2506 100644 --- a/data-otservbr-global/monster/quests/mysterious_ornate_chest/reflection_of_mawhawk.lua +++ b/data-otservbr-global/monster/quests/mysterious_ornate_chest/reflection_of_mawhawk.lua @@ -88,7 +88,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 90, attack = 80 }, { name = "combat", interval = 2000, chance = 8, type = COMBAT_LIFEDRAIN, minDamage = -135, maxDamage = -280, range = 7, radius = 5, shootEffect = CONST_ANI_WHIRLWINDAXE, target = true }, { name = "combat", interval = 2000, chance = 8, type = COMBAT_PHYSICALDAMAGE, minDamage = -90, maxDamage = -500, range = 7, shootEffect = CONST_ANI_WHIRLWINDAXE, effect = CONST_ME_EXPLOSIONAREA, target = true }, - { name = "combat", interval = 1800, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -685, length = 7, spread = 3, effect = CONST_ME_STONES, target = false }, + { name = "combat", interval = 1800, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -685, length = 7, spread = 1, effect = CONST_ME_STONES, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/primal_ordeal_quest/the_end_of_days.lua b/data-otservbr-global/monster/quests/primal_ordeal_quest/the_end_of_days.lua index 8674c4e2bac..e30d4ddcb8e 100644 --- a/data-otservbr-global/monster/quests/primal_ordeal_quest/the_end_of_days.lua +++ b/data-otservbr-global/monster/quests/primal_ordeal_quest/the_end_of_days.lua @@ -67,7 +67,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -750, maxDamage = -1750 }, { name = "combat", interval = 2700, chance = 37, type = COMBAT_FIREDAMAGE, minDamage = -950, maxDamage = -2000, length = 8, spread = 3, effect = CONST_ME_HITBYFIRE, target = false }, - { name = "combat", interval = 3300, chance = 37, type = COMBAT_PHYSICALDAMAGE, minDamage = -1100, maxDamage = -1600, length = 8, spread = 0, effect = CONST_ME_EXPLOSIONHIT, target = false }, + { name = "combat", interval = 3300, chance = 37, type = COMBAT_PHYSICALDAMAGE, minDamage = -1100, maxDamage = -1600, length = 8, spread = 1, effect = CONST_ME_EXPLOSIONHIT, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/roshamuul/horadron.lua b/data-otservbr-global/monster/quests/roshamuul/horadron.lua index 17f6a3652bb..6e9a8931a77 100644 --- a/data-otservbr-global/monster/quests/roshamuul/horadron.lua +++ b/data-otservbr-global/monster/quests/roshamuul/horadron.lua @@ -108,8 +108,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 110, attack = 100 }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_EARTHDAMAGE, minDamage = -600, maxDamage = -1000, length = 8, spread = 3, effect = CONST_ME_HITBYPOISON, target = false }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_EARTHDAMAGE, minDamage = -600, maxDamage = -1000, length = 8, spread = 3, effect = CONST_ME_HITBYPOISON, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_EARTHDAMAGE, minDamage = -600, maxDamage = -1000, length = 8, spread = 1, effect = CONST_ME_HITBYPOISON, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_EARTHDAMAGE, minDamage = -600, maxDamage = -1000, length = 8, spread = 1, effect = CONST_ME_HITBYPOISON, target = false }, { name = "combat", interval = 2000, chance = 30, type = COMBAT_EARTHDAMAGE, minDamage = -100, maxDamage = -235, range = 7, shootEffect = CONST_ANI_POISON, effect = CONST_ME_HITBYPOISON, target = true }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_EARTHDAMAGE, minDamage = -100, maxDamage = -250, radius = 3, effect = CONST_ME_POISONAREA, target = false }, -- poison diff --git a/data-otservbr-global/monster/quests/roshamuul/terofar.lua b/data-otservbr-global/monster/quests/roshamuul/terofar.lua index 0f26e7697f2..a06c7dadba5 100644 --- a/data-otservbr-global/monster/quests/roshamuul/terofar.lua +++ b/data-otservbr-global/monster/quests/roshamuul/terofar.lua @@ -104,7 +104,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 180, attack = 100 }, - { name = "combat", interval = 2000, chance = 30, type = COMBAT_DEATHDAMAGE, minDamage = -700, maxDamage = -1500, length = 8, spread = 3, effect = CONST_ME_SMALLCLOUDS, target = false }, + { name = "combat", interval = 2000, chance = 30, type = COMBAT_DEATHDAMAGE, minDamage = -700, maxDamage = -1500, length = 8, spread = 1, effect = CONST_ME_SMALLCLOUDS, target = false }, { name = "combat", interval = 2000, chance = 18, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -750, range = 7, radius = 1, shootEffect = CONST_ANI_WHIRLWINDAXE, target = true }, } diff --git a/data-otservbr-global/monster/quests/soul_war/aspect_of_power.lua b/data-otservbr-global/monster/quests/soul_war/aspect_of_power.lua index dfc6049e3f1..d3b40f599e8 100644 --- a/data-otservbr-global/monster/quests/soul_war/aspect_of_power.lua +++ b/data-otservbr-global/monster/quests/soul_war/aspect_of_power.lua @@ -62,7 +62,7 @@ monster.voices = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -800 }, { name = "combat", interval = 1700, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -400, maxDamage = -950, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, target = true }, - { name = "combat", interval = 1700, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -850, length = 4, spread = 3, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 1700, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -850, length = 4, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 1700, chance = 35, type = COMBAT_DEATHDAMAGE, minDamage = -700, maxDamage = -1550, radius = 3, effect = CONST_ME_MORTAREA, target = false }, { name = "outfit", interval = 1000, chance = 5, radius = 8, effect = CONST_ME_LOSEENERGY, target = false, duration = 5000, outfitMonster = "goshnar's hatred" }, { name = "outfit", interval = 1000, chance = 5, radius = 8, effect = CONST_ME_LOSEENERGY, target = false, duration = 5000, outfitMonster = "goshnar's greed" }, diff --git a/data-otservbr-global/monster/quests/soul_war/dreadful_harvester.lua b/data-otservbr-global/monster/quests/soul_war/dreadful_harvester.lua index 6a6108cf535..3e21b97a41e 100644 --- a/data-otservbr-global/monster/quests/soul_war/dreadful_harvester.lua +++ b/data-otservbr-global/monster/quests/soul_war/dreadful_harvester.lua @@ -67,8 +67,8 @@ monster.voices = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -320 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -165, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -350, maxDamage = -720, length = 8, spread = 3, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -300, length = 7, spread = 3, effect = CONST_ME_EXPLOSIONAREA, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -350, maxDamage = -720, length = 8, spread = 1, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -300, length = 7, spread = 1, effect = CONST_ME_EXPLOSIONAREA, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -225, maxDamage = -275, radius = 4, target = false }, } diff --git a/data-otservbr-global/monster/quests/soul_war/goshnars_cruelty.lua b/data-otservbr-global/monster/quests/soul_war/goshnars_cruelty.lua index 40957e0bde4..0a837abd59b 100644 --- a/data-otservbr-global/monster/quests/soul_war/goshnars_cruelty.lua +++ b/data-otservbr-global/monster/quests/soul_war/goshnars_cruelty.lua @@ -108,7 +108,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -5000 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -1400, maxDamage = -1800, length = 8, spread = 0, effect = CONST_ME_EXPLOSIONAREA, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -1400, maxDamage = -1800, length = 8, spread = 1, effect = CONST_ME_EXPLOSIONAREA, target = false }, { name = "singlecloudchain", interval = 6000, chance = 40, minDamage = -1700, maxDamage = -2500, range = 6, effect = CONST_ME_ENERGYHIT, target = true }, { name = "combat", interval = 2000, chance = 30, type = COMBAT_PHYSICALDAMAGE, minDamage = -1000, maxDamage = -2500, range = 7, radius = 4, shootEffect = CONST_ANI_EXPLOSION, effect = CONST_ME_DRAWBLOOD, target = true }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_DEATHDAMAGE, minDamage = -1500, maxDamage = -3000, radius = 3, effect = CONST_ME_GROUNDSHAKER, target = false }, diff --git a/data-otservbr-global/monster/quests/soul_war/goshnars_hatred.lua b/data-otservbr-global/monster/quests/soul_war/goshnars_hatred.lua index 2dcfed2e9ec..d7bc44dda3c 100644 --- a/data-otservbr-global/monster/quests/soul_war/goshnars_hatred.lua +++ b/data-otservbr-global/monster/quests/soul_war/goshnars_hatred.lua @@ -109,7 +109,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -5000 }, { name = "combat", interval = 2000, chance = 30, type = COMBAT_DEATHDAMAGE, minDamage = -1350, maxDamage = -1700, range = 7, radius = 5, shootEffect = CONST_ANI_DEATH, effect = CONST_ME_GROUNDSHAKER, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -1400, maxDamage = -2200, length = 8, spread = 3, effect = CONST_ME_GROUNDSHAKER, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -1400, maxDamage = -2200, length = 8, spread = 1, effect = CONST_ME_GROUNDSHAKER, target = false }, { name = "singlecloudchain", interval = 6000, chance = 40, minDamage = -1700, maxDamage = -2500, range = 6, effect = CONST_ME_ENERGYHIT, target = true }, } diff --git a/data-otservbr-global/monster/quests/soul_war/goshnars_megalomania.lua b/data-otservbr-global/monster/quests/soul_war/goshnars_megalomania.lua index 18cfdeacd90..2949d1b42c3 100644 --- a/data-otservbr-global/monster/quests/soul_war/goshnars_megalomania.lua +++ b/data-otservbr-global/monster/quests/soul_war/goshnars_megalomania.lua @@ -112,9 +112,9 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -8000 }, { name = "combat", interval = 2000, chance = 30, type = COMBAT_PHYSICALDAMAGE, minDamage = -2950, maxDamage = -4400, range = 7, radius = 3, shootEffect = CONST_ANI_DEATH, effect = CONST_ME_MORTAREA, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -3000, maxDamage = -5500, length = 8, spread = 3, effect = CONST_ME_INSECTS, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -3000, maxDamage = -5500, length = 8, spread = 1, effect = CONST_ME_INSECTS, target = false }, { name = "singlecloudchain", interval = 6000, chance = 40, minDamage = -3300, maxDamage = -5500, range = 6, effect = CONST_ME_ENERGYHIT, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -3300, maxDamage = -5200, length = 10, spread = 0, effect = CONST_ME_BLUE_GHOST, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -3300, maxDamage = -5200, length = 10, spread = 1, effect = CONST_ME_BLUE_GHOST, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/soul_war/goshnars_spite.lua b/data-otservbr-global/monster/quests/soul_war/goshnars_spite.lua index cf46b89a76d..77f44a12b8b 100644 --- a/data-otservbr-global/monster/quests/soul_war/goshnars_spite.lua +++ b/data-otservbr-global/monster/quests/soul_war/goshnars_spite.lua @@ -107,10 +107,10 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -5000 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -1400, maxDamage = -2200, length = 8, spread = 3, effect = CONST_ME_GREEN_RINGS, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -1400, maxDamage = -2200, length = 8, spread = 1, effect = CONST_ME_GREEN_RINGS, target = false }, { name = "singlecloudchain", interval = 6000, chance = 40, minDamage = -1700, maxDamage = -1900, range = 6, effect = CONST_ME_ENERGYHIT, target = true }, { name = "combat", interval = 2000, chance = 30, type = COMBAT_EARTHDAMAGE, minDamage = -1200, maxDamage = -3500, range = 7, radius = 4, shootEffect = CONST_ANI_POISON, effect = CONST_ME_GREEN_RINGS, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -1400, maxDamage = -2200, length = 8, spread = 0, effect = CONST_ME_GREEN_RINGS, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -1400, maxDamage = -2200, length = 8, spread = 1, effect = CONST_ME_GREEN_RINGS, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/soul_war/hateful_soul.lua b/data-otservbr-global/monster/quests/soul_war/hateful_soul.lua index 08ea90eece7..b3d4c74ef61 100644 --- a/data-otservbr-global/monster/quests/soul_war/hateful_soul.lua +++ b/data-otservbr-global/monster/quests/soul_war/hateful_soul.lua @@ -62,7 +62,7 @@ monster.voices = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -800 }, { name = "combat", interval = 1700, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -400, maxDamage = -950, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, target = true }, - { name = "combat", interval = 1700, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -850, length = 4, spread = 3, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 1700, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -850, length = 4, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 1700, chance = 35, type = COMBAT_DEATHDAMAGE, minDamage = -700, maxDamage = -1550, radius = 3, effect = CONST_ME_MORTAREA, target = false }, } diff --git a/data-otservbr-global/monster/quests/soul_war/malicious_soul.lua b/data-otservbr-global/monster/quests/soul_war/malicious_soul.lua index c540bb4b0e3..1eeccc77000 100644 --- a/data-otservbr-global/monster/quests/soul_war/malicious_soul.lua +++ b/data-otservbr-global/monster/quests/soul_war/malicious_soul.lua @@ -62,7 +62,7 @@ monster.voices = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -500 }, { name = "combat", interval = 1700, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -150, maxDamage = -550, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, target = true }, - { name = "combat", interval = 1700, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -150, maxDamage = -550, length = 4, spread = 3, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 1700, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -150, maxDamage = -550, length = 4, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 1700, chance = 35, type = COMBAT_DEATHDAMAGE, minDamage = -150, maxDamage = -550, radius = 3, effect = CONST_ME_MORTAREA, target = false }, } diff --git a/data-otservbr-global/monster/quests/svargrond_arena/warlord/fallen_mooh'tah_master_ghar.lua b/data-otservbr-global/monster/quests/svargrond_arena/warlord/fallen_mooh'tah_master_ghar.lua index 676dda2eab9..cc2272f4346 100644 --- a/data-otservbr-global/monster/quests/svargrond_arena/warlord/fallen_mooh'tah_master_ghar.lua +++ b/data-otservbr-global/monster/quests/svargrond_arena/warlord/fallen_mooh'tah_master_ghar.lua @@ -69,12 +69,12 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -525, condition = { type = CONDITION_POISON, totalDamage = 18, interval = 4000 } }, - { name = "combat", interval = 6000, chance = 30, type = COMBAT_FIREDAMAGE, minDamage = -80, maxDamage = -300, length = 8, spread = 3, effect = CONST_ME_FIREAREA, target = false }, + { name = "combat", interval = 6000, chance = 30, type = COMBAT_FIREDAMAGE, minDamage = -80, maxDamage = -300, length = 8, spread = 1, effect = CONST_ME_FIREAREA, target = false }, { name = "combat", interval = 3000, chance = 45, type = COMBAT_FIREDAMAGE, minDamage = -80, maxDamage = -400, radius = 5, shootEffect = CONST_ANI_FIRE, target = true }, { name = "combat", interval = 4000, chance = 30, type = COMBAT_DEATHDAMAGE, minDamage = -80, maxDamage = -270, shootEffect = CONST_ANI_DEATH, effect = CONST_ME_MORTAREA, target = false }, -- poison { name = "condition", type = CONDITION_POISON, interval = 4500, chance = 40, minDamage = -10, maxDamage = -200, range = 10, shootEffect = CONST_ANI_POISON, target = false }, - { name = "combat", interval = 5000, chance = 30, type = COMBAT_EARTHDAMAGE, minDamage = -60, maxDamage = -300, length = 8, spread = 3, effect = CONST_ME_POISONAREA, target = false }, + { name = "combat", interval = 5000, chance = 30, type = COMBAT_EARTHDAMAGE, minDamage = -60, maxDamage = -300, length = 8, spread = 1, effect = CONST_ME_POISONAREA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/svargrond_arena/warlord/the_obliverator.lua b/data-otservbr-global/monster/quests/svargrond_arena/warlord/the_obliverator.lua index ad6f8fa8db0..d0c51748c4c 100644 --- a/data-otservbr-global/monster/quests/svargrond_arena/warlord/the_obliverator.lua +++ b/data-otservbr-global/monster/quests/svargrond_arena/warlord/the_obliverator.lua @@ -76,7 +76,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -700 }, { name = "combat", interval = 1000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -250, range = 5, radius = 7, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true }, - { name = "combat", interval = 3000, chance = 30, type = COMBAT_ENERGYDAMAGE, minDamage = -200, maxDamage = -500, length = 8, spread = 3, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 3000, chance = 30, type = COMBAT_ENERGYDAMAGE, minDamage = -200, maxDamage = -500, length = 8, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_curse_spreads/black_vixen.lua b/data-otservbr-global/monster/quests/the_curse_spreads/black_vixen.lua index 3f676c6e9a5..aba13dc1391 100644 --- a/data-otservbr-global/monster/quests/the_curse_spreads/black_vixen.lua +++ b/data-otservbr-global/monster/quests/the_curse_spreads/black_vixen.lua @@ -107,7 +107,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -290 }, { name = "combat", interval = 1000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = 100, maxDamage = 720, range = 7, shootEffect = CONST_ANI_THROWINGSTAR, target = false }, { name = "speed", interval = 2000, chance = 15, speedChange = -600, range = 7, effect = CONST_ME_MAGIC_RED, target = false, duration = 20000 }, - { name = "combat", interval = 1000, chance = 14, type = COMBAT_DEATHDAMAGE, minDamage = -100, maxDamage = -700, length = 5, spread = 3, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 1000, chance = 14, type = COMBAT_DEATHDAMAGE, minDamage = -100, maxDamage = -700, length = 5, spread = 1, effect = CONST_ME_MORTAREA, target = false }, { name = "outfit", interval = 1000, chance = 1, radius = 1, target = true, duration = 2000, outfitMonster = "werewolf" }, } diff --git a/data-otservbr-global/monster/quests/the_curse_spreads/bloodback.lua b/data-otservbr-global/monster/quests/the_curse_spreads/bloodback.lua index 7f8c4a86cf3..09cb8f45706 100644 --- a/data-otservbr-global/monster/quests/the_curse_spreads/bloodback.lua +++ b/data-otservbr-global/monster/quests/the_curse_spreads/bloodback.lua @@ -101,7 +101,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -290 }, { name = "combat", interval = 1000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -420, range = 7, target = false }, { name = "speed", interval = 2000, chance = 15, speedChange = -600, range = 7, effect = CONST_ME_MAGIC_RED, target = false, duration = 20000 }, - { name = "combat", interval = 1000, chance = 14, type = COMBAT_DEATHDAMAGE, minDamage = -100, maxDamage = -200, length = 5, spread = 3, target = false }, + { name = "combat", interval = 1000, chance = 14, type = COMBAT_DEATHDAMAGE, minDamage = -100, maxDamage = -200, length = 5, spread = 1, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_curse_spreads/sharpclaw.lua b/data-otservbr-global/monster/quests/the_curse_spreads/sharpclaw.lua index 570f501efd1..e55f8abc39a 100644 --- a/data-otservbr-global/monster/quests/the_curse_spreads/sharpclaw.lua +++ b/data-otservbr-global/monster/quests/the_curse_spreads/sharpclaw.lua @@ -100,7 +100,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -290 }, { name = "combat", interval = 1000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = 100, maxDamage = 720, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, target = false }, { name = "speed", interval = 2000, chance = 15, speedChange = -600, range = 7, effect = CONST_ME_MAGIC_RED, target = false, duration = 20000 }, - { name = "combat", interval = 1000, chance = 14, type = COMBAT_DEATHDAMAGE, minDamage = -100, maxDamage = -700, length = 5, spread = 3, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 1000, chance = 14, type = COMBAT_DEATHDAMAGE, minDamage = -100, maxDamage = -700, length = 5, spread = 1, effect = CONST_ME_MORTAREA, target = false }, { name = "outfit", interval = 1000, chance = 1, radius = 1, target = true, duration = 2000, outfitMonster = "Werebadger" }, { name = "ghastly dragon curse", interval = 2000, chance = 5, range = 1, target = false }, } diff --git a/data-otservbr-global/monster/quests/the_dream_courts/bosses/alptramun.lua b/data-otservbr-global/monster/quests/the_dream_courts/bosses/alptramun.lua index 76275c2cd0f..a691c396fb1 100644 --- a/data-otservbr-global/monster/quests/the_dream_courts/bosses/alptramun.lua +++ b/data-otservbr-global/monster/quests/the_dream_courts/bosses/alptramun.lua @@ -118,9 +118,9 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -200, maxDamage = -1000 }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_DEATHDAMAGE, minDamage = -700, maxDamage = -2000, range = 7, length = 6, spread = 3, shootEffect = CONST_ANI_POISON, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_DEATHDAMAGE, minDamage = -400, maxDamage = -700, range = 3, length = 6, spread = 3, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -200, maxDamage = -500, range = 3, length = 6, spread = 3, effect = CONST_ME_HITBYFIRE, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_DEATHDAMAGE, minDamage = -700, maxDamage = -2000, range = 7, length = 6, spread = 1, shootEffect = CONST_ANI_POISON, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_DEATHDAMAGE, minDamage = -400, maxDamage = -700, range = 3, length = 6, spread = 1, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -200, maxDamage = -500, range = 3, length = 6, spread = 1, effect = CONST_ME_HITBYFIRE, target = false }, { name = "stone shower rune", interval = 2000, chance = 10, minDamage = -230, maxDamage = -450, range = 7, target = false }, } diff --git a/data-otservbr-global/monster/quests/the_dream_courts/bosses/izcandar_the_banished.lua b/data-otservbr-global/monster/quests/the_dream_courts/bosses/izcandar_the_banished.lua index 9c693024899..bef4c76b5e7 100644 --- a/data-otservbr-global/monster/quests/the_dream_courts/bosses/izcandar_the_banished.lua +++ b/data-otservbr-global/monster/quests/the_dream_courts/bosses/izcandar_the_banished.lua @@ -120,9 +120,9 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -1000 }, { name = "combat", interval = 3600, chance = 17, type = COMBAT_FIREDAMAGE, minDamage = -500, maxDamage = -1500, length = 5, spread = 2, effect = CONST_ME_FIREAREA, target = false }, - { name = "combat", interval = 4100, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -500, maxDamage = -2000, length = 8, spread = 0, effect = CONST_ME_FIREAREA, target = false }, + { name = "combat", interval = 4100, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -500, maxDamage = -2000, length = 8, spread = 1, effect = CONST_ME_FIREAREA, target = false }, { name = "combat", interval = 4700, chance = 17, type = COMBAT_ICEDAMAGE, minDamage = -500, maxDamage = -1500, length = 5, spread = 2, effect = CONST_ME_ICEATTACK, target = false }, - { name = "combat", interval = 3100, chance = 20, type = COMBAT_ICEDAMAGE, minDamage = -500, maxDamage = -2000, length = 8, spread = 0, effect = CONST_ME_ICETORNADO, target = false }, + { name = "combat", interval = 3100, chance = 20, type = COMBAT_ICEDAMAGE, minDamage = -500, maxDamage = -2000, length = 8, spread = 1, effect = CONST_ME_ICETORNADO, target = false }, { name = "speed", interval = 2000, chance = 15, speedChange = -700, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 30000 }, } diff --git a/data-otservbr-global/monster/quests/the_dream_courts/bosses/plagueroot.lua b/data-otservbr-global/monster/quests/the_dream_courts/bosses/plagueroot.lua index 3d436e2b83d..2ee7c11ca54 100644 --- a/data-otservbr-global/monster/quests/the_dream_courts/bosses/plagueroot.lua +++ b/data-otservbr-global/monster/quests/the_dream_courts/bosses/plagueroot.lua @@ -141,8 +141,8 @@ monster.attacks = { { name = "combat", interval = 1000, chance = 50, type = COMBAT_FIREDAMAGE, minDamage = -20, maxDamage = -100, radius = 5, effect = CONST_ME_BLOCKHIT, target = false }, { name = "firefield", interval = 1000, chance = 4, radius = 8, effect = CONST_ME_EXPLOSIONHIT, target = false }, { name = "combat", interval = 1000, chance = 34, type = COMBAT_FIREDAMAGE, minDamage = -350, maxDamage = -650, range = 7, radius = 7, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true }, - { name = "combat", interval = 1000, chance = 13, type = COMBAT_FIREDAMAGE, minDamage = -250, maxDamage = -600, length = 8, spread = 3, effect = CONST_ME_EXPLOSIONHIT, target = false }, - { name = "combat", interval = 1000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -350, maxDamage = -600, length = 8, spread = 3, effect = CONST_ME_FIREAREA, target = false }, + { name = "combat", interval = 1000, chance = 13, type = COMBAT_FIREDAMAGE, minDamage = -250, maxDamage = -600, length = 8, spread = 1, effect = CONST_ME_EXPLOSIONHIT, target = false }, + { name = "combat", interval = 1000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -350, maxDamage = -600, length = 8, spread = 1, effect = CONST_ME_FIREAREA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_dream_courts/mind-wrecking_dream.lua b/data-otservbr-global/monster/quests/the_dream_courts/mind-wrecking_dream.lua index 4554534149b..d5a71ea1058 100644 --- a/data-otservbr-global/monster/quests/the_dream_courts/mind-wrecking_dream.lua +++ b/data-otservbr-global/monster/quests/the_dream_courts/mind-wrecking_dream.lua @@ -67,8 +67,8 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -320 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -165, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -350, maxDamage = -720, length = 8, spread = 3, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -300, length = 7, spread = 3, effect = CONST_ME_EXPLOSIONAREA, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -350, maxDamage = -720, length = 8, spread = 1, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -300, length = 7, spread = 1, effect = CONST_ME_EXPLOSIONAREA, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -225, maxDamage = -275, radius = 4, target = false }, } diff --git a/data-otservbr-global/monster/quests/the_dream_courts/plant_abomination.lua b/data-otservbr-global/monster/quests/the_dream_courts/plant_abomination.lua index 41517061f49..d8d14878c4d 100644 --- a/data-otservbr-global/monster/quests/the_dream_courts/plant_abomination.lua +++ b/data-otservbr-global/monster/quests/the_dream_courts/plant_abomination.lua @@ -67,7 +67,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -150 }, { name = "combat", interval = 2000, chance = 5, type = COMBAT_MANADRAIN, minDamage = -30, maxDamage = -100, radius = 4, effect = CONST_ME_GREEN_RINGS, target = false }, - { name = "speed", interval = 2000, chance = 15, speedChange = -700, length = 5, spread = 3, effect = CONST_ME_SMALLPLANTS, target = false, duration = 15000 }, + { name = "speed", interval = 2000, chance = 15, speedChange = -700, length = 5, spread = 1, effect = CONST_ME_SMALLPLANTS, target = false, duration = 15000 }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -100, range = 7, radius = 1, shootEffect = CONST_ANI_SMALLEARTH, effect = CONST_ME_CARNIPHILA, target = true }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -55, maxDamage = -100, radius = 4, effect = CONST_ME_HITBYPOISON, target = true }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, radius = 1, effect = CONST_ME_POISONAREA, target = false }, diff --git a/data-otservbr-global/monster/quests/the_elemental_spheres/blistering_fire_elemental.lua b/data-otservbr-global/monster/quests/the_elemental_spheres/blistering_fire_elemental.lua index 3991aa6ae98..b6109507f38 100644 --- a/data-otservbr-global/monster/quests/the_elemental_spheres/blistering_fire_elemental.lua +++ b/data-otservbr-global/monster/quests/the_elemental_spheres/blistering_fire_elemental.lua @@ -71,7 +71,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -350 }, - { name = "combat", interval = 1000, chance = 11, type = COMBAT_FIREDAMAGE, minDamage = -65, maxDamage = -510, length = 7, spread = 3, target = false }, + { name = "combat", interval = 1000, chance = 11, type = COMBAT_FIREDAMAGE, minDamage = -65, maxDamage = -510, length = 7, spread = 1, target = false }, -- fire { name = "condition", type = CONDITION_FIRE, interval = 1000, chance = 12, minDamage = -50, maxDamage = -200, radius = 6, effect = CONST_ME_FIREAREA, target = false }, { name = "firefield", interval = 1000, chance = 15, range = 7, radius = 3, shootEffect = CONST_ANI_FIRE, target = true }, diff --git a/data-otservbr-global/monster/quests/the_elemental_spheres/earth_overlord.lua b/data-otservbr-global/monster/quests/the_elemental_spheres/earth_overlord.lua index 33251b292d5..214113740eb 100644 --- a/data-otservbr-global/monster/quests/the_elemental_spheres/earth_overlord.lua +++ b/data-otservbr-global/monster/quests/the_elemental_spheres/earth_overlord.lua @@ -79,7 +79,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400 }, - { name = "combat", interval = 1000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = 0, maxDamage = -800, length = 7, spread = 3, effect = CONST_ME_STONES, target = false }, + { name = "combat", interval = 1000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = 0, maxDamage = -800, length = 7, spread = 1, effect = CONST_ME_STONES, target = false }, { name = "combat", interval = 1000, chance = 9, type = COMBAT_EARTHDAMAGE, minDamage = 0, maxDamage = -490, radius = 6, effect = CONST_ME_BIGPLANTS, target = false }, { name = "speed", interval = 2000, chance = 20, speedChange = -750, range = 7, effect = CONST_ME_MAGIC_RED, target = false, duration = 4000 }, } diff --git a/data-otservbr-global/monster/quests/the_elemental_spheres/energy_overlord.lua b/data-otservbr-global/monster/quests/the_elemental_spheres/energy_overlord.lua index 844a6504d33..e813f247f6d 100644 --- a/data-otservbr-global/monster/quests/the_elemental_spheres/energy_overlord.lua +++ b/data-otservbr-global/monster/quests/the_elemental_spheres/energy_overlord.lua @@ -74,7 +74,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -800, length = 7, spread = 3, effect = CONST_ME_PURPLEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -800, length = 7, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false }, { name = "combat", interval = 1000, chance = 11, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -200, range = 3, effect = CONST_ME_PURPLEENERGY, target = true }, { name = "combat", interval = 1000, chance = 9, type = COMBAT_EARTHDAMAGE, minDamage = -50, maxDamage = -200, radius = 5, effect = CONST_ME_BIGPLANTS, target = false }, } diff --git a/data-otservbr-global/monster/quests/the_elemental_spheres/fire_overlord.lua b/data-otservbr-global/monster/quests/the_elemental_spheres/fire_overlord.lua index 7364324263d..37bbfdea968 100644 --- a/data-otservbr-global/monster/quests/the_elemental_spheres/fire_overlord.lua +++ b/data-otservbr-global/monster/quests/the_elemental_spheres/fire_overlord.lua @@ -77,7 +77,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -450, condition = { type = CONDITION_FIRE, totalDamage = 650, interval = 9000 } }, { name = "firefield", interval = 2000, chance = 15, range = 7, radius = 4, shootEffect = CONST_ANI_FIRE, target = true }, - { name = "combat", interval = 1000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -300, maxDamage = -900, length = 1, spread = 0, effect = CONST_ME_FIREATTACK, target = false }, + { name = "combat", interval = 1000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -300, maxDamage = -900, length = 1, spread = 1, effect = CONST_ME_FIREATTACK, target = false }, { name = "combat", interval = 1000, chance = 13, type = COMBAT_FIREDAMAGE, minDamage = -200, maxDamage = -350, radius = 4, effect = CONST_ME_FIREAREA, target = true }, } diff --git a/data-otservbr-global/monster/quests/the_elemental_spheres/jagged_earth_elemental.lua b/data-otservbr-global/monster/quests/the_elemental_spheres/jagged_earth_elemental.lua index 15cd6582e71..6fb06f71e46 100644 --- a/data-otservbr-global/monster/quests/the_elemental_spheres/jagged_earth_elemental.lua +++ b/data-otservbr-global/monster/quests/the_elemental_spheres/jagged_earth_elemental.lua @@ -76,7 +76,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -300 }, - { name = "combat", interval = 1000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -100, maxDamage = -250, length = 6, spread = 3, effect = CONST_ME_STONES, target = false }, + { name = "combat", interval = 1000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -100, maxDamage = -250, length = 6, spread = 1, effect = CONST_ME_STONES, target = false }, { name = "combat", interval = 1000, chance = 11, type = COMBAT_EARTHDAMAGE, minDamage = 0, maxDamage = -200, range = 7, radius = 6, shootEffect = CONST_ANI_SMALLEARTH, effect = CONST_ME_POISONAREA, target = true }, } diff --git a/data-otservbr-global/monster/quests/the_elemental_spheres/muddy_earth_elemental.lua b/data-otservbr-global/monster/quests/the_elemental_spheres/muddy_earth_elemental.lua index 8970e739266..0713cdf0705 100644 --- a/data-otservbr-global/monster/quests/the_elemental_spheres/muddy_earth_elemental.lua +++ b/data-otservbr-global/monster/quests/the_elemental_spheres/muddy_earth_elemental.lua @@ -74,7 +74,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -160 }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -25, maxDamage = -155, range = 7, radius = 2, effect = CONST_ME_STONES, target = true }, -- poison - { name = "condition", type = CONDITION_POISON, interval = 1000, chance = 10, minDamage = 0, maxDamage = -26, length = 6, spread = 3, effect = CONST_ME_GROUNDSHAKER, target = false }, + { name = "condition", type = CONDITION_POISON, interval = 1000, chance = 10, minDamage = 0, maxDamage = -26, length = 6, spread = 1, effect = CONST_ME_GROUNDSHAKER, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_inquisition/ungreez.lua b/data-otservbr-global/monster/quests/the_inquisition/ungreez.lua index c19b2199920..2c6f5688324 100644 --- a/data-otservbr-global/monster/quests/the_inquisition/ungreez.lua +++ b/data-otservbr-global/monster/quests/the_inquisition/ungreez.lua @@ -80,7 +80,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 13, type = COMBAT_MANADRAIN, minDamage = 0, maxDamage = -110, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, target = false }, { name = "combat", interval = 1000, chance = 14, type = COMBAT_FIREDAMAGE, minDamage = -150, maxDamage = -250, range = 7, radius = 7, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true }, { name = "combat", interval = 2000, chance = 18, type = COMBAT_ENERGYDAMAGE, minDamage = -200, maxDamage = -400, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_PURPLEENERGY, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -380, length = 8, spread = 3, effect = CONST_ME_PURPLEENERGY, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -380, length = 8, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_order_of_lion/bosses/ancient_lion_knight.lua b/data-otservbr-global/monster/quests/the_order_of_lion/bosses/ancient_lion_knight.lua index 9118397f72b..715dc63169b 100644 --- a/data-otservbr-global/monster/quests/the_order_of_lion/bosses/ancient_lion_knight.lua +++ b/data-otservbr-global/monster/quests/the_order_of_lion/bosses/ancient_lion_knight.lua @@ -97,10 +97,10 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -750, effect = CONST_ME_DRAWBLOOD }, - { name = "combat", interval = 6000, chance = 30, type = COMBAT_HOLYDAMAGE, minDamage = -450, maxDamage = -750, length = 8, spread = 3, effect = CONST_ME_HOLYAREA, target = false }, + { name = "combat", interval = 6000, chance = 30, type = COMBAT_HOLYDAMAGE, minDamage = -450, maxDamage = -750, length = 8, spread = 1, effect = CONST_ME_HOLYAREA, target = false }, { name = "combat", interval = 2750, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -400, maxDamage = -800, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 2500, chance = 22, type = COMBAT_DEATHDAMAGE, minDamage = -400, maxDamage = -500, radius = 3, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 3300, chance = 24, type = COMBAT_ICEDAMAGE, minDamage = -250, maxDamage = -350, length = 4, spread = 0, effect = CONST_ME_ICEATTACK, target = false }, + { name = "combat", interval = 3300, chance = 24, type = COMBAT_ICEDAMAGE, minDamage = -250, maxDamage = -350, length = 4, spread = 1, effect = CONST_ME_ICEATTACK, target = false }, { name = "combat", interval = 3000, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -200, maxDamage = -500, radius = 4, effect = CONST_ME_BIGCLOUDS, target = false }, } diff --git a/data-otservbr-global/monster/quests/the_order_of_lion/bosses/drume.lua b/data-otservbr-global/monster/quests/the_order_of_lion/bosses/drume.lua index 646a665c4b4..76076de957d 100644 --- a/data-otservbr-global/monster/quests/the_order_of_lion/bosses/drume.lua +++ b/data-otservbr-global/monster/quests/the_order_of_lion/bosses/drume.lua @@ -127,11 +127,11 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -1100, effect = CONST_ME_DRAWBLOOD }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_HOLYDAMAGE, minDamage = -850, maxDamage = -1150, length = 8, spread = 3, effect = CONST_ME_HOLYAREA, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -800, maxDamage = -1200, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 2000, chance = 22, type = COMBAT_DEATHDAMAGE, minDamage = -800, maxDamage = -1000, radius = 3, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 2000, chance = 24, type = COMBAT_ICEDAMAGE, minDamage = -700, maxDamage = -900, length = 4, spread = 0, effect = CONST_ME_ICEATTACK, target = false }, - { name = "singlecloudchain", interval = 2000, chance = 34, minDamage = -600, maxDamage = -1100, range = 4, effect = CONST_ME_ENERGYHIT, target = true }, + { name = "combat", interval = 2700, chance = 25, type = COMBAT_HOLYDAMAGE, minDamage = -850, maxDamage = -1150, length = 8, spread = 1, effect = CONST_ME_HOLYAREA, target = false }, + { name = "combat", interval = 3100, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -800, maxDamage = -1200, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 3300, chance = 22, type = COMBAT_DEATHDAMAGE, minDamage = -800, maxDamage = -1000, radius = 3, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 3700, chance = 24, type = COMBAT_ICEDAMAGE, minDamage = -700, maxDamage = -900, length = 4, spread = 1, effect = CONST_ME_ICEATTACK, target = false }, + { name = "singlecloudchain", interval = 2100, chance = 34, minDamage = -600, maxDamage = -1100, range = 4, effect = CONST_ME_ENERGYHIT, target = true }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_order_of_lion/bosses/kesar.lua b/data-otservbr-global/monster/quests/the_order_of_lion/bosses/kesar.lua index a3db694f72c..fcd5ca8dbff 100644 --- a/data-otservbr-global/monster/quests/the_order_of_lion/bosses/kesar.lua +++ b/data-otservbr-global/monster/quests/the_order_of_lion/bosses/kesar.lua @@ -70,11 +70,11 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -750, effect = CONST_ME_DRAWBLOOD }, - { name = "combat", interval = 4000, chance = 15, type = COMBAT_HOLYDAMAGE, minDamage = -450, maxDamage = -750, length = 8, spread = 3, effect = CONST_ME_HOLYAREA, target = false }, + { name = "combat", interval = 4000, chance = 15, type = COMBAT_HOLYDAMAGE, minDamage = -450, maxDamage = -750, length = 8, spread = 1, effect = CONST_ME_HOLYAREA, target = false }, { name = "combat", interval = 2750, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -400, maxDamage = -800, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = false }, { name = "singledeathchain", interval = 4000, chance = 15, minDamage = -250, maxDamage = -530, range = 5, effect = CONST_ME_MORTAREA, target = true }, { name = "singleicechain", interval = 4000, chance = 18, minDamage = -150, maxDamage = -450, range = 5, effect = CONST_ME_ICEATTACK, target = true }, - { name = "combat", interval = 3300, chance = 12, type = COMBAT_ICEDAMAGE, minDamage = -250, maxDamage = -350, length = 4, spread = 0, effect = CONST_ME_ICEATTACK, target = false }, + { name = "combat", interval = 3300, chance = 12, type = COMBAT_ICEDAMAGE, minDamage = -250, maxDamage = -350, length = 4, spread = 1, effect = CONST_ME_ICEATTACK, target = false }, { name = "singlecloudchain", interval = 6000, chance = 17, minDamage = -200, maxDamage = -450, range = 4, effect = CONST_ME_ENERGYHIT, target = true }, } diff --git a/data-otservbr-global/monster/quests/the_order_of_lion/usurper_commander.lua b/data-otservbr-global/monster/quests/the_order_of_lion/usurper_commander.lua index fd31fa62806..3f5e67a915f 100644 --- a/data-otservbr-global/monster/quests/the_order_of_lion/usurper_commander.lua +++ b/data-otservbr-global/monster/quests/the_order_of_lion/usurper_commander.lua @@ -81,7 +81,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -500, effect = CONST_ME_DRAWBLOOD }, { name = "combat", interval = 4000, chance = 14, type = COMBAT_DEATHDAMAGE, minDamage = -150, maxDamage = -300, radius = 3, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 4000, chance = 20, type = COMBAT_ICEDAMAGE, minDamage = -150, maxDamage = -400, length = 4, spread = 0, effect = CONST_ME_ICEATTACK, target = false }, + { name = "combat", interval = 4000, chance = 20, type = COMBAT_ICEDAMAGE, minDamage = -150, maxDamage = -400, length = 4, spread = 1, effect = CONST_ME_ICEATTACK, target = false }, { name = "singlecloudchain", interval = 6000, chance = 17, minDamage = -200, maxDamage = -450, range = 4, effect = CONST_ME_ENERGYHIT, target = true }, { name = "singledeathchain", interval = 6000, chance = 15, minDamage = -250, maxDamage = -530, range = 5, effect = CONST_ME_MORTAREA, target = true }, } diff --git a/data-otservbr-global/monster/quests/the_percht_queens_island/bonny_bunny.lua b/data-otservbr-global/monster/quests/the_percht_queens_island/bonny_bunny.lua index 31f0973a229..b8d9081ec38 100644 --- a/data-otservbr-global/monster/quests/the_percht_queens_island/bonny_bunny.lua +++ b/data-otservbr-global/monster/quests/the_percht_queens_island/bonny_bunny.lua @@ -63,7 +63,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -200 }, - { name = "combat", interval = 2000, chance = 50, type = COMBAT_FIREDAMAGE, minDamage = -90, maxDamage = -150, length = 4, spread = 3, effect = CONST_ME_HEARTS, target = false }, + { name = "combat", interval = 2000, chance = 50, type = COMBAT_FIREDAMAGE, minDamage = -90, maxDamage = -150, length = 4, spread = 1, effect = CONST_ME_HEARTS, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_percht_queens_island/percht.lua b/data-otservbr-global/monster/quests/the_percht_queens_island/percht.lua index 0a13a064493..6689c086cb8 100644 --- a/data-otservbr-global/monster/quests/the_percht_queens_island/percht.lua +++ b/data-otservbr-global/monster/quests/the_percht_queens_island/percht.lua @@ -89,10 +89,10 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -200 }, { name = "combat", interval = 2000, chance = 70, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -125, range = 7, shootEffect = CONST_ANI_SNOWBALL, target = false }, - { name = "combat", interval = 2000, chance = 50, type = COMBAT_ICEDAMAGE, minDamage = -90, maxDamage = -250, length = 3, spread = 0, effect = CONST_ME_GIANTICE, target = false }, + { name = "combat", interval = 2000, chance = 50, type = COMBAT_ICEDAMAGE, minDamage = -90, maxDamage = -250, length = 3, spread = 1, effect = CONST_ME_GIANTICE, target = false }, { name = "combat", interval = 2000, chance = 50, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -250, radius = 3, effect = CONST_ME_FIREAREA, target = true }, { name = "combat", interval = 2000, chance = 50, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -250, radius = 4, effect = CONST_ME_EXPLOSIONHIT, target = false }, - { name = "combat", interval = 2000, chance = 50, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -250, length = 3, spread = 0, effect = CONST_ME_FIREATTACK, target = false }, + { name = "combat", interval = 2000, chance = 50, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -250, length = 3, spread = 1, effect = CONST_ME_FIREATTACK, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_percht_queens_island/schiach.lua b/data-otservbr-global/monster/quests/the_percht_queens_island/schiach.lua index 747e9604bb3..fe714dc1e88 100644 --- a/data-otservbr-global/monster/quests/the_percht_queens_island/schiach.lua +++ b/data-otservbr-global/monster/quests/the_percht_queens_island/schiach.lua @@ -86,10 +86,10 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -200 }, { name = "combat", interval = 2000, chance = 70, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -125, range = 7, shootEffect = CONST_ANI_SNOWBALL, target = false }, - { name = "combat", interval = 2000, chance = 50, type = COMBAT_ICEDAMAGE, minDamage = -90, maxDamage = -250, length = 3, spread = 0, effect = CONST_ME_GIANTICE, target = false }, + { name = "combat", interval = 2000, chance = 50, type = COMBAT_ICEDAMAGE, minDamage = -90, maxDamage = -250, length = 3, spread = 1, effect = CONST_ME_GIANTICE, target = false }, { name = "combat", interval = 2000, chance = 50, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -250, radius = 3, effect = CONST_ME_FIREAREA, target = true }, { name = "combat", interval = 2000, chance = 50, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -250, radius = 4, effect = CONST_ME_EXPLOSIONHIT, target = false }, - { name = "combat", interval = 2000, chance = 50, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -250, length = 3, spread = 0, effect = CONST_ME_FIREATTACK, target = false }, + { name = "combat", interval = 2000, chance = 50, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -250, length = 3, spread = 1, effect = CONST_ME_FIREATTACK, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/biting_cold.lua b/data-otservbr-global/monster/quests/the_secret_library/biting_cold.lua index 188854deca0..7d5b3a34ce7 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/biting_cold.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/biting_cold.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -450 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/bone_jaw.lua b/data-otservbr-global/monster/quests/the_secret_library/bone_jaw.lua index 9d4d97cd3e8..d1e2f4cf56f 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/bone_jaw.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/bone_jaw.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/bosses/ghulosh.lua b/data-otservbr-global/monster/quests/the_secret_library/bosses/ghulosh.lua index 4324a573ec4..c11a622fa3b 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/bosses/ghulosh.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/bosses/ghulosh.lua @@ -105,8 +105,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 1000, chance = 100, skill = 150, attack = 280 }, - { name = "combat", interval = 2000, chance = 12, type = COMBAT_DEATHDAMAGE, minDamage = -900, maxDamage = -1500, length = 8, spread = 3, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 2000, chance = 12, type = COMBAT_DEATHDAMAGE, minDamage = -210, maxDamage = -600, length = 8, spread = 3, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 12, type = COMBAT_DEATHDAMAGE, minDamage = -900, maxDamage = -1500, length = 8, spread = 1, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 12, type = COMBAT_DEATHDAMAGE, minDamage = -210, maxDamage = -600, length = 8, spread = 1, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 2000, chance = 12, type = COMBAT_DEATHDAMAGE, minDamage = -210, maxDamage = -600, range = 7, radius = 3, effect = CONST_ME_MORTAREA, target = false }, { name = "melee", interval = 2000, chance = 100, skill = 90, attack = 250 }, { name = "combat", interval = 2000, chance = 12, type = COMBAT_LIFEDRAIN, minDamage = -1500, maxDamage = -2000, range = 7, radius = 3, target = false }, diff --git a/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_canon_dominus.lua b/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_canon_dominus.lua index 324701dac3b..d0ed39a7e6e 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_canon_dominus.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_canon_dominus.lua @@ -86,7 +86,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -150, maxDamage = -700 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -720, range = 7, shootEffect = CONST_ANI_ETHEREALSPEAR, target = false }, - { name = "combat", interval = 2000, chance = 14, type = COMBAT_HOLYDAMAGE, minDamage = -100, maxDamage = -1000, length = 8, spread = 3, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 2000, chance = 14, type = COMBAT_HOLYDAMAGE, minDamage = -100, maxDamage = -1000, length = 8, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -200, maxDamage = -700, range = 5, radius = 3, effect = CONST_ME_HOLYAREA, target = false }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -200, maxDamage = -700, range = 5, radius = 3, effect = CONST_ME_SMALLCLOUDS, target = false }, } diff --git a/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_chaplain_gaunder.lua b/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_chaplain_gaunder.lua index bd22561f584..9240bdab188 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_chaplain_gaunder.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_chaplain_gaunder.lua @@ -94,7 +94,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -150, maxDamage = -850 }, { name = "combat", interval = 1500, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -380, maxDamage = -890, range = 4, radius = 4, effect = CONST_ME_HITBYPOISON, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -290, maxDamage = -720, range = 7, shootEffect = CONST_ANI_ETHEREALSPEAR, target = false }, - { name = "combat", interval = 1500, chance = 14, type = COMBAT_HOLYDAMAGE, minDamage = -300, maxDamage = -1000, length = 8, spread = 3, effect = CONST_ME_BLOCKHIT, target = false }, + { name = "combat", interval = 1500, chance = 14, type = COMBAT_HOLYDAMAGE, minDamage = -300, maxDamage = -1000, length = 8, spread = 1, effect = CONST_ME_BLOCKHIT, target = false }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -200, maxDamage = -700, range = 5, radius = 3, effect = CONST_ME_SMALLCLOUDS, target = false }, } diff --git a/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_commander_soeren.lua b/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_commander_soeren.lua index 9e8a232f9df..3396fe9a092 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_commander_soeren.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_commander_soeren.lua @@ -88,7 +88,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -150, maxDamage = -700 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -720, range = 7, shootEffect = CONST_ANI_ROYALSPEAR, target = false }, - { name = "combat", interval = 1000, chance = 14, type = COMBAT_HOLYDAMAGE, minDamage = -500, maxDamage = -1000, length = 8, spread = 3, effect = CONST_ME_BLOCKHIT, target = false }, + { name = "combat", interval = 1000, chance = 14, type = COMBAT_HOLYDAMAGE, minDamage = -500, maxDamage = -1000, length = 8, spread = 1, effect = CONST_ME_BLOCKHIT, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/bosses/thawing_dragon_lord.lua b/data-otservbr-global/monster/quests/the_secret_library/bosses/thawing_dragon_lord.lua index 032b61dba4a..8344d3debb6 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/bosses/thawing_dragon_lord.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/bosses/thawing_dragon_lord.lua @@ -74,7 +74,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -300 }, { name = "ice crystal bomb", interval = 2000, chance = 30, minDamage = -600, maxDamage = -700, target = true }, - { name = "fire wave", interval = 2000, chance = 30, minDamage = -800, maxDamage = -1200, length = 1, spread = 0, target = true }, + { name = "fire wave", interval = 2000, chance = 30, minDamage = -800, maxDamage = -1200, length = 1, spread = 1, target = true }, { name = "speed", interval = 1000, chance = 12, speedChange = -250, radius = 6, effect = CONST_ME_HITBYFIRE, target = false, duration = 60000 }, { name = "firefield", interval = 1000, chance = 10, range = 7, radius = 4, shootEffect = CONST_ANI_FIRE, target = true }, } diff --git a/data-otservbr-global/monster/quests/the_secret_library/bosses/the_scourge_of_oblivion.lua b/data-otservbr-global/monster/quests/the_secret_library/bosses/the_scourge_of_oblivion.lua index 5965afef0a3..507026f3be1 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/bosses/the_scourge_of_oblivion.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/bosses/the_scourge_of_oblivion.lua @@ -130,14 +130,14 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 8, type = COMBAT_FIREDAMAGE, minDamage = -1550, maxDamage = -2550, range = 7, radius = 7, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -1075, maxDamage = -2405, range = 7, shootEffect = CONST_ANI_ENERGYBALL, effect = CONST_ME_ENERGYHIT, target = true }, { name = "combat", interval = 1000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -600, maxDamage = -1500, radius = 8, effect = CONST_ME_LOSEENERGY, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -750, maxDamage = -1200, length = 8, spread = 3, effect = CONST_ME_PURPLEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -750, maxDamage = -1200, length = 8, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false }, { name = "choking fear drown", interval = 2000, chance = 20, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -450, maxDamage = -1400, radius = 4, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = true }, { name = "combat", interval = 1000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -800, maxDamage = -2300, radius = 8, effect = CONST_ME_MAGIC_GREEN, target = false }, { name = "speed", interval = 1000, chance = 12, speedChange = -800, radius = 6, effect = CONST_ME_POISONAREA, target = false, duration = 60000 }, { name = "strength", interval = 1000, chance = 8, radius = 5, effect = CONST_ME_HITAREA, target = false }, { name = "combat", interval = 1000, chance = 34, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -700, range = 7, radius = 7, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true }, - { name = "combat", interval = 1000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -950, length = 8, spread = 3, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 1000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -950, length = 8, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/brother_chill.lua b/data-otservbr-global/monster/quests/the_secret_library/brother_chill.lua index 12400ddc549..9d3c3b21ce0 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/brother_chill.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/brother_chill.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/brother_freeze.lua b/data-otservbr-global/monster/quests/the_secret_library/brother_freeze.lua index c940834f45d..b910cf65969 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/brother_freeze.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/brother_freeze.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/concentrated_death.lua b/data-otservbr-global/monster/quests/the_secret_library/concentrated_death.lua index 35f46d2eaaf..6c78194b72b 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/concentrated_death.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/concentrated_death.lua @@ -67,7 +67,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/dazed_leaf_golem.lua b/data-otservbr-global/monster/quests/the_secret_library/dazed_leaf_golem.lua index c42fe94b9a6..0151194b9a4 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/dazed_leaf_golem.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/dazed_leaf_golem.lua @@ -78,7 +78,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/demon_blood.lua b/data-otservbr-global/monster/quests/the_secret_library/demon_blood.lua index 88b762e2c71..4dc9c881ede 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/demon_blood.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/demon_blood.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/demon_slave.lua b/data-otservbr-global/monster/quests/the_secret_library/demon_slave.lua index dc40725c264..168d813ff1e 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/demon_slave.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/demon_slave.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/furious_scorpion.lua b/data-otservbr-global/monster/quests/the_secret_library/furious_scorpion.lua index 5afc7f32c6f..8f58c549c32 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/furious_scorpion.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/furious_scorpion.lua @@ -66,7 +66,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/imp_intruder.lua b/data-otservbr-global/monster/quests/the_secret_library/imp_intruder.lua index 15b824d749f..cb44fb2dd8e 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/imp_intruder.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/imp_intruder.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/invading_demon.lua b/data-otservbr-global/monster/quests/the_secret_library/invading_demon.lua index b14dea67f69..068559329bd 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/invading_demon.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/invading_demon.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/jailer.lua b/data-otservbr-global/monster/quests/the_secret_library/jailer.lua index c3dc4a60450..f95c2f1cbd6 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/jailer.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/jailer.lua @@ -72,7 +72,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/librarian.lua b/data-otservbr-global/monster/quests/the_secret_library/librarian.lua index fe87ae2ff34..5fbc1c8b1a5 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/librarian.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/librarian.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/malicious_minion.lua b/data-otservbr-global/monster/quests/the_secret_library/malicious_minion.lua index ad77095f69b..852d72ed4fa 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/malicious_minion.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/malicious_minion.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/mazzinor.lua b/data-otservbr-global/monster/quests/the_secret_library/mazzinor.lua index a9be1bc3221..1d028d9cc05 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/mazzinor.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/mazzinor.lua @@ -98,8 +98,8 @@ monster.attacks = { { name = "divine missile", interval = 2000, chance = 10, minDamage = -135, maxDamage = -700, target = true }, { name = "berserk", interval = 2000, chance = 20, minDamage = -90, maxDamage = -500, range = 7, target = true }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -135, maxDamage = -280, range = 7, radius = 5, effect = CONST_ME_MAGIC_BLUE, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -210, maxDamage = -600, length = 8, spread = 3, effect = CONST_ME_ENERGYAREA, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_HOLYDAMAGE, minDamage = -210, maxDamage = -700, length = 8, spread = 3, effect = CONST_ME_HOLYAREA, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -210, maxDamage = -600, length = 8, spread = 1, effect = CONST_ME_ENERGYAREA, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_HOLYDAMAGE, minDamage = -210, maxDamage = -700, length = 8, spread = 1, effect = CONST_ME_HOLYAREA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/mean_minion.lua b/data-otservbr-global/monster/quests/the_secret_library/mean_minion.lua index 711ba72ec50..1483e7f53d5 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/mean_minion.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/mean_minion.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/ravenous_beyondling.lua b/data-otservbr-global/monster/quests/the_secret_library/ravenous_beyondling.lua index 56491de9962..e59af78ba82 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/ravenous_beyondling.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/ravenous_beyondling.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/rift_breacher.lua b/data-otservbr-global/monster/quests/the_secret_library/rift_breacher.lua index 24cf9b26ff5..cdf59257afe 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/rift_breacher.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/rift_breacher.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/rift_minion.lua b/data-otservbr-global/monster/quests/the_secret_library/rift_minion.lua index ae1dbfbb604..fd124af8a30 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/rift_minion.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/rift_minion.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/rift_spawn.lua b/data-otservbr-global/monster/quests/the_secret_library/rift_spawn.lua index 69256a4a719..19a68dfffcf 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/rift_spawn.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/rift_spawn.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/spawn_of_havoc.lua b/data-otservbr-global/monster/quests/the_secret_library/spawn_of_havoc.lua index f53a3c675a0..efdcc226a13 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/spawn_of_havoc.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/spawn_of_havoc.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_armor.lua b/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_armor.lua index 0191f7d3dec..8fbdbb061de 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_armor.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_armor.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_healing.lua b/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_healing.lua index 17491a7b4c3..398f973baed 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_healing.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_healing.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_lifesteal.lua b/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_lifesteal.lua index 3ff2ce5207a..f5f62182ed5 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_lifesteal.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_lifesteal.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_spells.lua b/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_spells.lua index 1e319b2a5b3..7d4fef27f52 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_spells.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_spells.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_summoning.lua b/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_summoning.lua index c591e74ca97..d0e4994e20c 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_summoning.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_summoning.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/the_blazing_rose.lua b/data-otservbr-global/monster/quests/the_secret_library/the_blazing_rose.lua index 1eca0b0b507..3853e83f8e8 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/the_blazing_rose.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/the_blazing_rose.lua @@ -69,7 +69,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/the_book_of_secrets.lua b/data-otservbr-global/monster/quests/the_secret_library/the_book_of_secrets.lua index 8872dfba1ea..a0810a6cb90 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/the_book_of_secrets.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/the_book_of_secrets.lua @@ -58,7 +58,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/the_devourer_of_secrets.lua b/data-otservbr-global/monster/quests/the_secret_library/the_devourer_of_secrets.lua index c49ef79f6ca..54827e65cca 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/the_devourer_of_secrets.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/the_devourer_of_secrets.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/the_diamond_blossom.lua b/data-otservbr-global/monster/quests/the_secret_library/the_diamond_blossom.lua index be4d55a6d76..ccdba1ba153 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/the_diamond_blossom.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/the_diamond_blossom.lua @@ -69,7 +69,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/the_lily_of_night.lua b/data-otservbr-global/monster/quests/the_secret_library/the_lily_of_night.lua index 457aeaa6f93..42ece8c4842 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/the_lily_of_night.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/the_lily_of_night.lua @@ -69,7 +69,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/the_scion_of_havoc.lua b/data-otservbr-global/monster/quests/the_secret_library/the_scion_of_havoc.lua index 23267a626d6..717bacb2fd3 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/the_scion_of_havoc.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/the_scion_of_havoc.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/the_spellstealer.lua b/data-otservbr-global/monster/quests/the_secret_library/the_spellstealer.lua index 810ab9ebd72..446b69e2333 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/the_spellstealer.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/the_spellstealer.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/war_servant.lua b/data-otservbr-global/monster/quests/the_secret_library/war_servant.lua index 8bbf980fe62..124723fdcb3 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/war_servant.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/war_servant.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/yalahari_despoiler.lua b/data-otservbr-global/monster/quests/the_secret_library/yalahari_despoiler.lua index 892e0d12ac1..608430cabd6 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/yalahari_despoiler.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/yalahari_despoiler.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 3, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/raids/ferumbras.lua b/data-otservbr-global/monster/raids/ferumbras.lua index 40df72b86a9..f9d3c5c2021 100644 --- a/data-otservbr-global/monster/raids/ferumbras.lua +++ b/data-otservbr-global/monster/raids/ferumbras.lua @@ -129,7 +129,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -350 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_MANADRAIN, minDamage = -500, maxDamage = -700, range = 7, effect = CONST_ME_MAGIC_RED, target = false }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -450, length = 8, spread = 3, effect = CONST_ME_HITBYPOISON, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -450, length = 8, spread = 1, effect = CONST_ME_HITBYPOISON, target = false }, { name = "combat", interval = 2000, chance = 21, type = COMBAT_LIFEDRAIN, minDamage = -450, maxDamage = -500, radius = 6, effect = CONST_ME_POFF, target = false }, -- poison { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 15, minDamage = -20, maxDamage = -40, range = 7, shootEffect = CONST_ANI_POISON, target = false }, diff --git a/data-otservbr-global/monster/raids/furyosa.lua b/data-otservbr-global/monster/raids/furyosa.lua index 3d5ddc6df47..f230e96e5e7 100644 --- a/data-otservbr-global/monster/raids/furyosa.lua +++ b/data-otservbr-global/monster/raids/furyosa.lua @@ -99,9 +99,9 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -625 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -260, maxDamage = -310, radius = 6, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -50, maxDamage = -210, length = 8, spread = 3, effect = CONST_ME_BLOCKHIT, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -200, maxDamage = -300, length = 8, spread = 3, effect = CONST_ME_EXPLOSIONAREA, target = false }, - { name = "combat", interval = 2000, chance = 5, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -800, length = 8, spread = 3, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -50, maxDamage = -210, length = 8, spread = 1, effect = CONST_ME_BLOCKHIT, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -200, maxDamage = -300, length = 8, spread = 1, effect = CONST_ME_EXPLOSIONAREA, target = false }, + { name = "combat", interval = 2000, chance = 5, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -800, length = 8, spread = 1, target = false }, { name = "combat", interval = 3000, chance = 18, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -150, radius = 5, effect = CONST_ME_GROUNDSHAKER, target = true }, { name = "fury skill reducer", interval = 2000, chance = 5, target = false }, } diff --git a/data-otservbr-global/monster/raids/ghazbaran.lua b/data-otservbr-global/monster/raids/ghazbaran.lua index da656d181fc..074395a82f5 100644 --- a/data-otservbr-global/monster/raids/ghazbaran.lua +++ b/data-otservbr-global/monster/raids/ghazbaran.lua @@ -129,7 +129,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -2191 }, { name = "combat", interval = 2000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -250, maxDamage = -500, range = 7, radius = 6, effect = CONST_ME_HITAREA, target = false }, { name = "combat", interval = 3000, chance = 34, type = COMBAT_PHYSICALDAMAGE, minDamage = -120, maxDamage = -500, range = 7, radius = 1, shootEffect = CONST_ANI_WHIRLWINDSWORD, target = true }, - { name = "combat", interval = 4000, chance = 30, type = COMBAT_ENERGYDAMAGE, minDamage = -100, maxDamage = -800, length = 8, spread = 3, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 4000, chance = 30, type = COMBAT_ENERGYDAMAGE, minDamage = -100, maxDamage = -800, length = 8, spread = 1, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 3000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -480, range = 14, radius = 5, effect = CONST_ME_POFF, target = false }, { name = "combat", interval = 4000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -650, range = 7, radius = 13, effect = CONST_ME_BLOCKHIT, target = false }, { name = "combat", interval = 4000, chance = 18, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -600, radius = 14, effect = CONST_ME_LOSEENERGY, target = false }, diff --git a/data-otservbr-global/monster/raids/glooth_bomb.lua b/data-otservbr-global/monster/raids/glooth_bomb.lua index b1973e7b8ec..071f1aeafea 100644 --- a/data-otservbr-global/monster/raids/glooth_bomb.lua +++ b/data-otservbr-global/monster/raids/glooth_bomb.lua @@ -81,7 +81,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 110, attack = 50 }, - { name = "combat", interval = 2000, chance = 13, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -230, length = 3, spread = 0, effect = CONST_ME_GROUNDSHAKER, target = false }, + { name = "combat", interval = 2000, chance = 13, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -230, length = 3, spread = 1, effect = CONST_ME_GROUNDSHAKER, target = false }, { name = "combat", interval = 2000, chance = 12, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -200, radius = 3, effect = CONST_ME_GROUNDSHAKER, target = false }, { name = "combat", interval = 2000, chance = 19, type = COMBAT_LIFEDRAIN, minDamage = -50, maxDamage = -225, radius = 5, effect = CONST_ME_MAGIC_RED, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -150, maxDamage = -235, range = 7, radius = 4, shootEffect = CONST_ANI_LARGEROCK, effect = CONST_ME_EXPLOSIONAREA, target = true }, diff --git a/data-otservbr-global/monster/raids/mawhawk.lua b/data-otservbr-global/monster/raids/mawhawk.lua index 9e879512cfa..b2b8901e5ed 100644 --- a/data-otservbr-global/monster/raids/mawhawk.lua +++ b/data-otservbr-global/monster/raids/mawhawk.lua @@ -91,7 +91,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 90, attack = 90 }, - { name = "combat", interval = 1800, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -685, length = 7, spread = 3, effect = CONST_ME_STONES, target = false }, + { name = "combat", interval = 1800, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -685, length = 7, spread = 1, effect = CONST_ME_STONES, target = false }, { name = "combat", interval = 2000, chance = 9, type = COMBAT_EARTHDAMAGE, minDamage = -250, maxDamage = -590, radius = 6, effect = CONST_ME_BIGPLANTS, target = false }, } diff --git a/data-otservbr-global/monster/reptiles/carnivostrich.lua b/data-otservbr-global/monster/reptiles/carnivostrich.lua index e5fa7948d13..64429106100 100644 --- a/data-otservbr-global/monster/reptiles/carnivostrich.lua +++ b/data-otservbr-global/monster/reptiles/carnivostrich.lua @@ -91,12 +91,12 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -500, condition = { type = CONDITION_POISON, totalDamage = 480, interval = 4000 } }, - { name = "combat", interval = 2000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -386, maxDamage = -480, range = 7, shootEffect = CONST_ANI_LARGEROCK, target = true }, - { name = "combat", interval = 2000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -135, range = 7, shootEffect = CONST_ANI_SMALLSTONE, target = true }, - { name = "combat", interval = 2000, chance = 30, type = COMBAT_DEATHDAMAGE, minDamage = -350, maxDamage = -495, length = 7, spread = 0, effect = CONST_ME_BLACKSMOKE, target = false }, - { name = "combat", interval = 2000, chance = 30, type = COMBAT_ENERGYDAMAGE, minDamage = -280, maxDamage = -320, length = 7, spread = 0, effect = CONST_ME_ENERGYHIT, target = false }, - { name = "energy chain", interval = 2000, chance = 20, minDamage = -302, maxDamage = -309, range = 3, target = true }, - { name = "thunderstorm ring", interval = 2000, chance = 20, minDamage = -325, maxDamage = -415 }, + { name = "combat", interval = 2500, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -386, maxDamage = -480, range = 7, shootEffect = CONST_ANI_LARGEROCK, target = true }, + { name = "combat", interval = 3000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -135, range = 7, shootEffect = CONST_ANI_SMALLSTONE, target = true }, + { name = "combat", interval = 3500, chance = 30, type = COMBAT_DEATHDAMAGE, minDamage = -350, maxDamage = -495, length = 7, spread = 1, effect = CONST_ME_BLACKSMOKE, target = false }, + { name = "combat", interval = 4000, chance = 30, type = COMBAT_ENERGYDAMAGE, minDamage = -280, maxDamage = -320, length = 7, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "energy chain", interval = 4500, chance = 20, minDamage = -302, maxDamage = -309, range = 3, target = true }, + { name = "thunderstorm ring", interval = 5000, chance = 20, minDamage = -325, maxDamage = -415 }, } monster.defenses = { diff --git a/data-otservbr-global/monster/reptiles/young_goanna.lua b/data-otservbr-global/monster/reptiles/young_goanna.lua index 891251d226b..d0da931f485 100644 --- a/data-otservbr-global/monster/reptiles/young_goanna.lua +++ b/data-otservbr-global/monster/reptiles/young_goanna.lua @@ -94,8 +94,10 @@ monster.loot = { } monster.attacks = { - { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -230, condition = { type = CONDITION_POISON, totalDamage = 15, interval = 4000 } }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -490, range = 3, radius = 1, shootEffect = CONST_ANI_EARTH, effect = CONST_ME_EXPLOSIONHIT, target = true }, + { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -500, condition = { type = CONDITION_POISON, totalDamage = 200, interval = 4000 } }, + { name = "combat", interval = 2500, chance = 30, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -490, range = 3, shootEffect = CONST_ANI_EARTH, effect = CONST_ME_HITBYPOISON, target = true }, + { name = "combat", interval = 3000, chance = 30, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -500, radius = 1, effect = CONST_ME_GROUNDSHAKER, target = false }, + { name = "combat", interval = 3500, chance = 30, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -490, lenght = 8, spread = 1, effect = CONST_ME_GREEN_RINGS, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/slimes/devourer.lua b/data-otservbr-global/monster/slimes/devourer.lua index dace9504b1c..f14ad28a233 100644 --- a/data-otservbr-global/monster/slimes/devourer.lua +++ b/data-otservbr-global/monster/slimes/devourer.lua @@ -108,7 +108,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 8, type = COMBAT_EARTHDAMAGE, minDamage = -50, maxDamage = -160, range = 7, shootEffect = CONST_ANI_POISON, effect = CONST_ME_GREEN_RINGS, target = true }, { name = "devourer wave", interval = 2000, chance = 5, minDamage = -50, maxDamage = -150, target = false }, { name = "devourer paralyze", interval = 2000, chance = 9, target = false }, - { name = "combat", interval = 2000, chance = 11, type = COMBAT_EARTHDAMAGE, minDamage = -50, maxDamage = -150, length = 1, spread = 0, effect = CONST_ME_SMOKE, target = false }, + { name = "combat", interval = 2000, chance = 11, type = COMBAT_EARTHDAMAGE, minDamage = -50, maxDamage = -150, length = 1, spread = 1, effect = CONST_ME_SMOKE, target = false }, { name = "combat", interval = 2000, chance = 7, type = COMBAT_EARTHDAMAGE, minDamage = -120, maxDamage = -135, radius = 4, effect = CONST_ME_GREEN_RINGS, target = false }, } diff --git a/data-otservbr-global/monster/undeads/ahau.lua b/data-otservbr-global/monster/undeads/ahau.lua index 0e86a1d2c98..6d5b70e2ea5 100644 --- a/data-otservbr-global/monster/undeads/ahau.lua +++ b/data-otservbr-global/monster/undeads/ahau.lua @@ -100,7 +100,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 1700, chance = 100, minDamage = 0, maxDamage = -456, effect = 244 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -350, maxDamage = -422, range = 1, radius = 0, effect = CONST_ME_GREENSMOKE, target = true }, - { name = "combat", interval = 2000, chance = 40, type = COMBAT_FIREDAMAGE, minDamage = -400, maxDamage = -500, length = 5, spread = 0, effect = 216, target = false }, + { name = "combat", interval = 2000, chance = 40, type = COMBAT_FIREDAMAGE, minDamage = -400, maxDamage = -500, length = 5, spread = 1, effect = 216, target = false }, { name = "combat", interval = 2000, chance = 30, type = COMBAT_EARTHDAMAGE, minDamage = -415, maxDamage = -570, radius = 2, effect = CONST_ME_STONE_STORM, target = false }, { name = "boulder ring", interval = 2000, chance = 20, minDamage = -460, maxDamage = -500 }, } diff --git a/data-otservbr-global/monster/undeads/bonebeast.lua b/data-otservbr-global/monster/undeads/bonebeast.lua index 1ac169d5f83..eb8ab13ae9c 100644 --- a/data-otservbr-global/monster/undeads/bonebeast.lua +++ b/data-otservbr-global/monster/undeads/bonebeast.lua @@ -96,7 +96,7 @@ monster.attacks = { -- poison { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -50, maxDamage = -60, radius = 3, effect = CONST_ME_POISONAREA, target = false }, -- poison - { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -70, maxDamage = -80, length = 6, spread = 3, effect = CONST_ME_POISONAREA, target = false }, + { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -70, maxDamage = -80, length = 6, spread = 1, effect = CONST_ME_POISONAREA, target = false }, { name = "speed", interval = 2000, chance = 15, speedChange = -600, target = true, duration = 13000 }, } diff --git a/data-otservbr-global/monster/undeads/cursed_prospector.lua b/data-otservbr-global/monster/undeads/cursed_prospector.lua index b8e184b222c..5bbe7650949 100644 --- a/data-otservbr-global/monster/undeads/cursed_prospector.lua +++ b/data-otservbr-global/monster/undeads/cursed_prospector.lua @@ -90,7 +90,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -200 }, { name = "combat", interval = 1700, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -550, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, target = true }, - { name = "combat", interval = 1700, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -150, maxDamage = -550, length = 4, spread = 3, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 1700, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -150, maxDamage = -550, length = 4, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 1700, chance = 35, type = COMBAT_DEATHDAMAGE, minDamage = -150, maxDamage = -550, radius = 3, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 1700, chance = 35, type = COMBAT_HOLYDAMAGE, minDamage = -250, maxDamage = -550, radius = 3, effect = CONST_ME_HOLYAREA, target = false }, { name = "combat", interval = 2000, chance = 13, type = COMBAT_ENERGYDAMAGE, minDamage = -400, maxDamage = -550, range = 4, radius = 4, effect = CONST_ME_ENERGYAREA, target = true }, diff --git a/data-otservbr-global/monster/undeads/evil_prospector.lua b/data-otservbr-global/monster/undeads/evil_prospector.lua index 6691a119f9f..1b5845f316a 100644 --- a/data-otservbr-global/monster/undeads/evil_prospector.lua +++ b/data-otservbr-global/monster/undeads/evil_prospector.lua @@ -86,7 +86,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -500 }, { name = "combat", interval = 1700, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -250, maxDamage = -550, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, target = true }, - { name = "combat", interval = 1700, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -250, maxDamage = -550, length = 4, spread = 3, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 1700, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -250, maxDamage = -550, length = 4, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 1700, chance = 35, type = COMBAT_DEATHDAMAGE, minDamage = -250, maxDamage = -550, radius = 3, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 1700, chance = 35, type = COMBAT_HOLYDAMAGE, minDamage = -250, maxDamage = -400, radius = 3, effect = CONST_ME_HOLYAREA, target = false }, { name = "combat", interval = 1700, chance = 13, type = COMBAT_ENERGYDAMAGE, minDamage = -400, maxDamage = -450, range = 4, radius = 4, effect = CONST_ME_ENERGYAREA, target = true }, diff --git a/data-otservbr-global/monster/undeads/falcon_knight.lua b/data-otservbr-global/monster/undeads/falcon_knight.lua index 1f2fb03b157..99cc168f114 100644 --- a/data-otservbr-global/monster/undeads/falcon_knight.lua +++ b/data-otservbr-global/monster/undeads/falcon_knight.lua @@ -105,7 +105,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400 }, { name = "combat", interval = 2000, chance = 18, type = COMBAT_EARTHDAMAGE, minDamage = -400, maxDamage = -500, radius = 2, effect = CONST_ME_GROUNDSHAKER, target = false }, - { name = "combat", interval = 2000, chance = 14, type = COMBAT_HOLYDAMAGE, minDamage = -290, maxDamage = -360, length = 5, spread = 3, effect = CONST_ME_BLOCKHIT, target = false }, + { name = "combat", interval = 2000, chance = 14, type = COMBAT_HOLYDAMAGE, minDamage = -290, maxDamage = -360, length = 5, spread = 1, effect = CONST_ME_BLOCKHIT, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/undeads/falcon_paladin.lua b/data-otservbr-global/monster/undeads/falcon_paladin.lua index d9002a289e5..dc9eac4d7b6 100644 --- a/data-otservbr-global/monster/undeads/falcon_paladin.lua +++ b/data-otservbr-global/monster/undeads/falcon_paladin.lua @@ -98,7 +98,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 50, type = COMBAT_PHYSICALDAMAGE, minDamage = -400, maxDamage = -550, range = 5, shootEffect = CONST_ANI_ROYALSPEAR, target = true }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = 500, range = 5, shootEffect = CONST_ANI_BOLT, target = true }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -350, maxDamage = -450, range = 7, radius = 2, shootEffect = CONST_ANI_POWERBOLT, effect = CONST_ME_ENERGYHIT, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -250, maxDamage = -350, length = 5, spread = 3, effect = CONST_ME_PURPLEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -250, maxDamage = -350, length = 5, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/undeads/flimsy_lost_soul.lua b/data-otservbr-global/monster/undeads/flimsy_lost_soul.lua index 5336042dee1..9391f776ed3 100644 --- a/data-otservbr-global/monster/undeads/flimsy_lost_soul.lua +++ b/data-otservbr-global/monster/undeads/flimsy_lost_soul.lua @@ -91,7 +91,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -500 }, { name = "combat", interval = 1700, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -150, maxDamage = -550, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, target = true }, - { name = "combat", interval = 1700, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -150, maxDamage = -550, length = 4, spread = 3, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 1700, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -150, maxDamage = -550, length = 4, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 1700, chance = 35, type = COMBAT_DEATHDAMAGE, minDamage = -150, maxDamage = -550, radius = 3, effect = CONST_ME_MORTAREA, target = false }, } diff --git a/data-otservbr-global/monster/undeads/freakish_lost_soul.lua b/data-otservbr-global/monster/undeads/freakish_lost_soul.lua index 6f00c3eb7fe..a7776bec5c6 100644 --- a/data-otservbr-global/monster/undeads/freakish_lost_soul.lua +++ b/data-otservbr-global/monster/undeads/freakish_lost_soul.lua @@ -88,7 +88,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -500 }, { name = "combat", interval = 1700, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -550, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, target = true }, - { name = "combat", interval = 1700, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -150, maxDamage = -550, length = 4, spread = 3, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 1700, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -150, maxDamage = -550, length = 4, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 1700, chance = 35, type = COMBAT_DEATHDAMAGE, minDamage = -150, maxDamage = -550, radius = 4, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 1700, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -150, maxDamage = -550, radius = 4, effect = CONST_ME_ENERGYAREA, target = false }, } diff --git a/data-otservbr-global/monster/undeads/grim_reaper.lua b/data-otservbr-global/monster/undeads/grim_reaper.lua index 107a0ece576..f27fbd561a8 100644 --- a/data-otservbr-global/monster/undeads/grim_reaper.lua +++ b/data-otservbr-global/monster/undeads/grim_reaper.lua @@ -102,8 +102,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -320 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -165, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -350, maxDamage = -720, length = 8, spread = 3, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -300, length = 7, spread = 3, effect = CONST_ME_EXPLOSIONAREA, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -350, maxDamage = -720, length = 8, spread = 1, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -300, length = 7, spread = 1, effect = CONST_ME_EXPLOSIONAREA, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -225, maxDamage = -275, radius = 4, target = false }, } diff --git a/data-otservbr-global/monster/undeads/iks_aucar.lua b/data-otservbr-global/monster/undeads/iks_aucar.lua index 26bfc867d9b..36f76461f52 100644 --- a/data-otservbr-global/monster/undeads/iks_aucar.lua +++ b/data-otservbr-global/monster/undeads/iks_aucar.lua @@ -96,7 +96,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -250, effect = CONST_ME_PURPLEENERGY }, - { name = "combat", interval = 2000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -75, maxDamage = -100, length = 7, spread = 0, effect = 216, target = false }, + { name = "combat", interval = 2000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -75, maxDamage = -100, length = 7, spread = 1, effect = 216, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -160, range = 1, radius = 0, effect = CONST_ME_EXPLOSIONHIT, target = true }, } diff --git a/data-otservbr-global/monster/undeads/iks_churrascan.lua b/data-otservbr-global/monster/undeads/iks_churrascan.lua index 704e40a53fa..53b01ede306 100644 --- a/data-otservbr-global/monster/undeads/iks_churrascan.lua +++ b/data-otservbr-global/monster/undeads/iks_churrascan.lua @@ -86,7 +86,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -250, effect = CONST_ME_PURPLEENERGY }, - { name = "combat", interval = 2000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -75, maxDamage = -100, length = 7, spread = 0, effect = 216, target = false }, + { name = "combat", interval = 2000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -75, maxDamage = -100, length = 7, spread = 1, effect = 216, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -160, range = 1, radius = 0, effect = CONST_ME_EXPLOSIONHIT, target = true }, } diff --git a/data-otservbr-global/monster/undeads/iks_pututu.lua b/data-otservbr-global/monster/undeads/iks_pututu.lua index 460aa7eb511..83dc533cb55 100644 --- a/data-otservbr-global/monster/undeads/iks_pututu.lua +++ b/data-otservbr-global/monster/undeads/iks_pututu.lua @@ -89,7 +89,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -150 }, { name = "combat", interval = 2000, chance = 30, type = COMBAT_FIREDAMAGE, minDamage = -80, maxDamage = -90, radius = 2, effect = CONST_ME_FIREAREA, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -75, maxDamage = -95, length = 8, spread = 0, effect = CONST_ME_STONE_STORM, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -75, maxDamage = -95, length = 8, spread = 1, effect = CONST_ME_STONE_STORM, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -98, maxDamage = -114, range = 7, radius = 1, shootEffect = CONST_ANI_POISON, effect = CONST_ME_POISONAREA, target = true }, } diff --git a/data-otservbr-global/monster/undeads/lich.lua b/data-otservbr-global/monster/undeads/lich.lua index 811ee43d144..3e04e6d3b9c 100644 --- a/data-otservbr-global/monster/undeads/lich.lua +++ b/data-otservbr-global/monster/undeads/lich.lua @@ -114,8 +114,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -75 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -140, maxDamage = -190, length = 7, spread = 3, effect = CONST_ME_MAGIC_RED, target = false }, -- poison - { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -300, maxDamage = -400, length = 7, spread = 3, effect = CONST_ME_HITBYPOISON, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -140, maxDamage = -190, length = 7, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, -- poison + { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -300, maxDamage = -400, length = 7, spread = 1, effect = CONST_ME_HITBYPOISON, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -200, maxDamage = -245, range = 1, effect = CONST_ME_MAGIC_RED, target = true }, { name = "speed", interval = 2000, chance = 15, speedChange = -300, range = 7, effect = CONST_ME_MAGIC_RED, target = false, duration = 30000 }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -130, maxDamage = -195, radius = 3, effect = CONST_ME_MAGIC_RED, target = false }, diff --git a/data-otservbr-global/monster/undeads/lost_soul.lua b/data-otservbr-global/monster/undeads/lost_soul.lua index d00e9eb9d18..3da38eb4149 100644 --- a/data-otservbr-global/monster/undeads/lost_soul.lua +++ b/data-otservbr-global/monster/undeads/lost_soul.lua @@ -102,7 +102,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -420 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -40, maxDamage = -210, length = 3, spread = 0, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -40, maxDamage = -210, length = 3, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, { name = "speed", interval = 2000, chance = 20, speedChange = -800, radius = 6, effect = CONST_ME_SMALLCLOUDS, target = false, duration = 4000 }, } diff --git a/data-otservbr-global/monster/undeads/mean_lost_soul.lua b/data-otservbr-global/monster/undeads/mean_lost_soul.lua index aa4ded25b2a..e49a3aa6668 100644 --- a/data-otservbr-global/monster/undeads/mean_lost_soul.lua +++ b/data-otservbr-global/monster/undeads/mean_lost_soul.lua @@ -90,7 +90,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -500 }, { name = "combat", interval = 1700, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -550, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, target = true }, - { name = "combat", interval = 1700, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -550, length = 4, spread = 3, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 1700, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -550, length = 4, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 1700, chance = 35, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -550, radius = 3, effect = CONST_ME_MORTAREA, target = false }, } diff --git a/data-otservbr-global/monster/undeads/rot_elemental.lua b/data-otservbr-global/monster/undeads/rot_elemental.lua index ba79449343f..db6da4d727a 100644 --- a/data-otservbr-global/monster/undeads/rot_elemental.lua +++ b/data-otservbr-global/monster/undeads/rot_elemental.lua @@ -96,7 +96,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 58, attack = 50, condition = { type = CONDITION_POISON, totalDamage = 280, interval = 4000 } }, { name = "combat", interval = 2000, chance = 13, type = COMBAT_EARTHDAMAGE, minDamage = -150, maxDamage = -250, range = 7, radius = 3, shootEffect = CONST_ANI_GLOOTHSPEAR, effect = CONST_ME_POISONAREA, target = true }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -150, maxDamage = -230, length = 6, spread = 3, effect = CONST_ME_POISONAREA, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -150, maxDamage = -230, length = 6, spread = 1, effect = CONST_ME_POISONAREA, target = false }, -- poison { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -200, maxDamage = -300, range = 7, shootEffect = CONST_ANI_POISON, effect = CONST_ME_POISONAREA, target = true }, { name = "rot elemental paralyze", interval = 2000, chance = 11, target = false }, diff --git a/data-otservbr-global/monster/vermins/eyeless_devourer.lua b/data-otservbr-global/monster/vermins/eyeless_devourer.lua index 1c45264bd8a..2c7b266144b 100644 --- a/data-otservbr-global/monster/vermins/eyeless_devourer.lua +++ b/data-otservbr-global/monster/vermins/eyeless_devourer.lua @@ -102,7 +102,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400, effect = CONST_ME_DRAWBLOOD }, { name = "combat", interval = 2750, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -700, maxDamage = -800, range = 5, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_ENERGYAREA, target = true }, { name = "combat", interval = 2000, chance = 60, type = COMBAT_ENERGYDAMAGE, minDamage = -500, maxDamage = -700, radius = 3, effect = CONST_ME_ENERGYAREA, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -500, maxDamage = -560, length = 5, spread = 0, effect = CONST_ME_GREEN_RINGS, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -500, maxDamage = -560, length = 5, spread = 1, effect = CONST_ME_GREEN_RINGS, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/vermins/lavafungus.lua b/data-otservbr-global/monster/vermins/lavafungus.lua index c25d314a85d..6f5ecad3de9 100644 --- a/data-otservbr-global/monster/vermins/lavafungus.lua +++ b/data-otservbr-global/monster/vermins/lavafungus.lua @@ -101,7 +101,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -810 }, - { name = "combat", interval = 2000, chance = 50, type = COMBAT_DEATHDAMAGE, minDamage = -560, maxDamage = -650, length = 6, spread = 0, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 50, type = COMBAT_DEATHDAMAGE, minDamage = -560, maxDamage = -650, length = 6, spread = 1, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 2750, chance = 40, type = COMBAT_FIREDAMAGE, minDamage = -490, maxDamage = -720, range = 5, shootEffect = CONST_ANI_FIRE, target = true }, { name = "combat", interval = 2750, chance = 30, type = COMBAT_DEATHDAMAGE, minDamage = -720, maxDamage = -810, range = 5, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = true }, { name = "lavafungus ring", interval = 2000, chance = 20, minDamage = -450, maxDamage = -610 }, diff --git a/data-otservbr-global/monster/vermins/tremendous_tyrant.lua b/data-otservbr-global/monster/vermins/tremendous_tyrant.lua index 3cc624556e9..82cb7ce1ef6 100644 --- a/data-otservbr-global/monster/vermins/tremendous_tyrant.lua +++ b/data-otservbr-global/monster/vermins/tremendous_tyrant.lua @@ -100,7 +100,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400 }, - { name = "combat", interval = 2000, chance = 40, type = COMBAT_ICEDAMAGE, minDamage = -600, maxDamage = -650, length = 5, spread = 0, effect = CONST_ME_ICEATTACK, target = false }, + { name = "combat", interval = 2000, chance = 40, type = COMBAT_ICEDAMAGE, minDamage = -600, maxDamage = -650, length = 5, spread = 1, effect = CONST_ME_ICEATTACK, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_ICEDAMAGE, minDamage = -600, maxDamage = -700, radius = 4, shootEffect = CONST_ANI_ICE, effect = CONST_ME_ICEAREA, target = false }, -- avalanche { name = "combat", interval = 2000, chance = 30, type = COMBAT_HOLYDAMAGE, minDamage = -750, maxDamage = -950, range = 5, shootEffect = CONST_ANI_HOLY, effect = CONST_ME_HOLYAREA, target = true }, } From 0946d8bf1adbc0c42ee9cc427f6da90160120c2d Mon Sep 17 00:00:00 2001 From: Luan Santos Date: Sun, 10 Dec 2023 18:40:11 -0800 Subject: [PATCH 20/28] fix: manticore loot script (#2016) --- data-otservbr-global/monster/magicals/manticore.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/data-otservbr-global/monster/magicals/manticore.lua b/data-otservbr-global/monster/magicals/manticore.lua index 86c2b5810d3..fba35b6318d 100644 --- a/data-otservbr-global/monster/magicals/manticore.lua +++ b/data-otservbr-global/monster/magicals/manticore.lua @@ -91,7 +91,6 @@ monster.loot = { { name = "royal star", chance = 1010, maxCount = 3 }, { name = "wand of everblazing", chance = 1010 }, { name = "magma legs", chance = 340 }, - spread = 1, } monster.attacks = { From 029fee6e32f0210f2e8ef60816cdc967415ece84 Mon Sep 17 00:00:00 2001 From: Luan Santos Date: Sun, 10 Dec 2023 22:30:40 -0800 Subject: [PATCH 21/28] feat: refresh market averages on a clock (#1995) --- src/game/game.cpp | 41 +++++++------------- src/game/game.hpp | 5 +-- src/io/iomarket.cpp | 29 ++++++++++++++ src/io/iomarket.hpp | 1 + src/server/network/protocol/protocolgame.cpp | 21 +++++----- 5 files changed, 58 insertions(+), 39 deletions(-) diff --git a/src/game/game.cpp b/src/game/game.cpp index a0028c1aa18..5b973f3776a 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -296,6 +296,7 @@ void Game::start(ServiceManager* manager) { g_dispatcher().cycleEvent( EVENT_LUA_GARBAGE_COLLECTION, [this] { g_luaEnvironment().collectGarbage(); }, "Calling GC" ); + g_dispatcher().cycleEvent(EVENT_REFRESH_MARKET_PRICES, std::bind_front(&Game::loadItemsPrice, this), "Game::loadItemsPrice"); } GameState_t Game::getGameState() const { @@ -388,7 +389,7 @@ void Game::setGameState(GameState_t newState) { } bool Game::loadItemsPrice() { - itemsSaleCount = 0; + IOMarket::getInstance().updateStatistics(); std::ostringstream query, marketQuery; query << "SELECT DISTINCT `itemtype` FROM `market_offers`;"; @@ -398,20 +399,19 @@ bool Game::loadItemsPrice() { return false; } - do { - marketQuery.str(std::string()); - uint16_t itemId = result->getNumber("itemtype"); - marketQuery << "SELECT `price`, `tier` FROM `market_offers` WHERE `itemtype` = " << itemId << " ORDER BY `price` DESC LIMIT 1"; - DBResult_ptr marketOffersResult = db.storeQuery(marketQuery.str()); - if (marketOffersResult) { - std::map tierAndCount; - auto tier = marketOffersResult->getNumber("tier"); - auto price = marketOffersResult->getNumber("price"); - tierAndCount[tier] = price; - itemsPriceMap[itemId] = tierAndCount; - itemsSaleCount++; - } - } while (result->next()); + auto stats = IOMarket::getInstance().getPurchaseStatistics(); + for (const auto &[itemId, itemStats] : stats) { + std::map tierToPrice; + for (const auto &[tier, tierStats] : itemStats) { + auto averagePrice = tierStats.totalPrice / tierStats.numTransactions; + tierToPrice[tier] = averagePrice; + } + itemsPriceMap[itemId] = tierToPrice; + } + auto offers = IOMarket::getInstance().getActiveOffers(MARKETACTION_BUY); + for (const auto &offer : offers) { + itemsPriceMap[offer.itemId][offer.tier] = std::max(itemsPriceMap[offer.itemId][offer.tier], offer.price); + } return true; } @@ -8523,17 +8523,6 @@ void Game::playerCreateMarketOffer(uint32_t playerId, uint8_t type, uint16_t ite IOMarket::createOffer(player->getGUID(), static_cast(type), it.id, amount, price, tier, anonymous); - // uint8_t = tier, uint64_t price - std::map tierAndPriceMap; - tierAndPriceMap[tier] = price; - auto ColorItem = itemsPriceMap.find(it.id); - if (ColorItem == itemsPriceMap.end()) { - itemsPriceMap[it.id] = tierAndPriceMap; - itemsSaleCount++; - } else if (auto priceIt = ColorItem->second.find(tier); priceIt->second < price) { - itemsPriceMap[it.id] = tierAndPriceMap; - } - const MarketOfferList &buyOffers = IOMarket::getActiveOffers(MARKETACTION_BUY, it.id, tier); const MarketOfferList &sellOffers = IOMarket::getActiveOffers(MARKETACTION_SELL, it.id, tier); player->sendMarketBrowseItem(it.id, buyOffers, sellOffers, tier); diff --git a/src/game/game.hpp b/src/game/game.hpp index 0ae4065ab06..bbf2e66088c 100644 --- a/src/game/game.hpp +++ b/src/game/game.hpp @@ -45,6 +45,7 @@ static constexpr int32_t EVENT_DECAYINTERVAL = 250; static constexpr int32_t EVENT_DECAY_BUCKETS = 4; static constexpr int32_t EVENT_FORGEABLEMONSTERCHECKINTERVAL = 300000; static constexpr int32_t EVENT_LUA_GARBAGE_COLLECTION = 60000 * 10; // 10min +static constexpr int32_t EVENT_REFRESH_MARKET_PRICES = 60000; // 1min static constexpr std::chrono::minutes CACHE_EXPIRATION_TIME { 10 }; // 10min static constexpr std::chrono::minutes HIGHSCORE_CACHE_EXPIRATION_TIME { 10 }; // 10min @@ -184,9 +185,6 @@ class Game { uint32_t getPlayersRecord() const { return playersRecord; } - uint16_t getItemsPriceCount() const { - return itemsSaleCount; - } void addItemsClassification(ItemClassification* itemsClassification) { itemsClassifications.push_back(itemsClassification); @@ -860,7 +858,6 @@ class Game { uint32_t motdNum = 0; std::map> itemsPriceMap; - uint16_t itemsSaleCount; std::vector itemsClassifications; diff --git a/src/io/iomarket.cpp b/src/io/iomarket.cpp index ad045998375..f308e10e687 100644 --- a/src/io/iomarket.cpp +++ b/src/io/iomarket.cpp @@ -26,6 +26,35 @@ uint8_t IOMarket::getTierFromDatabaseTable(const std::string &string) { return tier; } +MarketOfferList IOMarket::getActiveOffers(MarketAction_t action) { + MarketOfferList offerList; + + std::ostringstream query; + query << "SELECT `id`, `amount`, `price`, `tier`, `created`, `anonymous`, (SELECT `name` FROM `players` WHERE `id` = `player_id`) AS `player_name` FROM `market_offers` WHERE `sale` = " << action; + + DBResult_ptr result = Database::getInstance().storeQuery(query.str()); + if (!result) { + return offerList; + } + + const int32_t marketOfferDuration = g_configManager().getNumber(MARKET_OFFER_DURATION, __FUNCTION__); + + do { + MarketOffer offer; + offer.amount = result->getNumber("amount"); + offer.price = result->getNumber("price"); + offer.timestamp = result->getNumber("created") + marketOfferDuration; + offer.counter = result->getNumber("id") & 0xFFFF; + if (result->getNumber("anonymous") == 0) { + offer.playerName = result->getString("player_name"); + } else { + offer.playerName = "Anonymous"; + } + offer.tier = getTierFromDatabaseTable(result->getString("tier")); + offerList.push_back(offer); + } while (result->next()); + return offerList; +} MarketOfferList IOMarket::getActiveOffers(MarketAction_t action, uint16_t itemId, uint8_t tier) { MarketOfferList offerList; diff --git a/src/io/iomarket.hpp b/src/io/iomarket.hpp index f192acca5fe..b02fba0ce6a 100644 --- a/src/io/iomarket.hpp +++ b/src/io/iomarket.hpp @@ -23,6 +23,7 @@ class IOMarket { return inject(); } + static MarketOfferList getActiveOffers(MarketAction_t action); static MarketOfferList getActiveOffers(MarketAction_t action, uint16_t itemId, uint8_t tier); static MarketOfferList getOwnOffers(MarketAction_t action, uint32_t playerId); static HistoryMarketOfferList getOwnHistory(MarketAction_t action, uint32_t playerId); diff --git a/src/server/network/protocol/protocolgame.cpp b/src/server/network/protocol/protocolgame.cpp index b0f3c39e573..408f6c12904 100644 --- a/src/server/network/protocol/protocolgame.cpp +++ b/src/server/network/protocol/protocolgame.cpp @@ -7802,18 +7802,21 @@ void ProtocolGame::sendItemsPrice() { NetworkMessage msg; msg.addByte(0xCD); - msg.add(g_game().getItemsPriceCount()); - if (g_game().getItemsPriceCount() > 0) { - for (const auto &[itemId, tierAndPriceMap] : g_game().getItemsPrice()) { - for (const auto &[tier, price] : tierAndPriceMap) { - msg.add(itemId); - if (Item::items[itemId].upgradeClassification > 0) { - msg.addByte(tier); - } - msg.add(price); + auto countBuffer = msg.getBufferPosition(); + uint16_t count = 0; + msg.skipBytes(2); + for (const auto &[itemId, tierAndPriceMap] : g_game().getItemsPrice()) { + for (const auto &[tier, price] : tierAndPriceMap) { + msg.add(itemId); + if (Item::items[itemId].upgradeClassification > 0) { + msg.addByte(tier); } + msg.add(price); + count++; } } + msg.setBufferPosition(countBuffer); + msg.add(count); writeToOutputBuffer(msg); } From 48aaffde37dd437f77d333c2d76443dee9cbb870 Mon Sep 17 00:00:00 2001 From: Luan Santos Date: Mon, 11 Dec 2023 08:27:13 -0800 Subject: [PATCH 22/28] fix: correct spread value assignment from 1 to 0 (#2018) This fixes a small but crucial bug where the spread was incorrectly set to 1. We have updated the assignment to spread = 0 to ensure accurate behavior as intended in the code logic. This change rectifies the spread calculation and aligns it with the expected outcomes. --- .../monster/aquatics/deathling_spellsinger.lua | 2 +- data-otservbr-global/monster/aquatics/manta_ray.lua | 2 +- .../monster/aquatics/quara_hydromancer.lua | 4 ++-- .../monster/aquatics/quara_hydromancer_scout.lua | 4 ++-- data-otservbr-global/monster/birds/demon_parrot.lua | 2 +- data-otservbr-global/monster/bosses/apocalypse.lua | 2 +- data-otservbr-global/monster/bosses/bazir.lua | 2 +- data-otservbr-global/monster/bosses/brain_head.lua | 2 +- data-otservbr-global/monster/bosses/diseased_bill.lua | 2 +- data-otservbr-global/monster/bosses/diseased_dan.lua | 2 +- data-otservbr-global/monster/bosses/diseased_fred.lua | 2 +- data-otservbr-global/monster/bosses/gaffir.lua | 2 +- data-otservbr-global/monster/bosses/gravelord_oshuran.lua | 4 ++-- .../monster/bosses/guard_captain_quaid.lua | 4 ++-- .../monster/bosses/koshei_the_deathless.lua | 2 +- data-otservbr-global/monster/bosses/kroazur.lua | 2 +- data-otservbr-global/monster/bosses/morshabaal.lua | 4 ++-- data-otservbr-global/monster/bosses/pythius_the_rotten.lua | 4 ++-- data-otservbr-global/monster/bosses/splasher.lua | 4 ++-- data-otservbr-global/monster/bosses/the_abomination.lua | 2 +- data-otservbr-global/monster/bosses/the_astral_source.lua | 2 +- data-otservbr-global/monster/bosses/the_book_of_death.lua | 2 +- data-otservbr-global/monster/bosses/the_brainstealer.lua | 2 +- data-otservbr-global/monster/bosses/the_collector.lua | 2 +- data-otservbr-global/monster/bosses/visco.lua | 2 +- data-otservbr-global/monster/bosses/weakened_shlorg.lua | 2 +- data-otservbr-global/monster/bosses/zarabustor.lua | 2 +- data-otservbr-global/monster/bosses/zushuka.lua | 4 ++-- .../monster/constructs/golden_servant_replica.lua | 2 +- data-otservbr-global/monster/constructs/ice_golem.lua | 2 +- data-otservbr-global/monster/constructs/lava_golem.lua | 2 +- data-otservbr-global/monster/constructs/magma_crawler.lua | 2 +- data-otservbr-global/monster/constructs/metal_gargoyle.lua | 2 +- data-otservbr-global/monster/constructs/stone_devourer.lua | 2 +- data-otservbr-global/monster/constructs/walker.lua | 2 +- data-otservbr-global/monster/constructs/weeper.lua | 4 ++-- data-otservbr-global/monster/demons/askarak_demon.lua | 2 +- data-otservbr-global/monster/demons/askarak_lord.lua | 2 +- data-otservbr-global/monster/demons/askarak_prince.lua | 2 +- data-otservbr-global/monster/demons/dawnfire_asura.lua | 2 +- data-otservbr-global/monster/demons/demon.lua | 2 +- data-otservbr-global/monster/demons/demon_outcast.lua | 4 ++-- data-otservbr-global/monster/demons/duskbringer.lua | 6 +++--- data-otservbr-global/monster/demons/floating_savant.lua | 2 +- data-otservbr-global/monster/demons/frost_flower_asura.lua | 2 +- data-otservbr-global/monster/demons/grimeleech.lua | 2 +- data-otservbr-global/monster/demons/hellfire_fighter.lua | 2 +- data-otservbr-global/monster/demons/hellflayer.lua | 2 +- data-otservbr-global/monster/demons/midnight_asura.lua | 4 ++-- data-otservbr-global/monster/demons/shaburak_demon.lua | 2 +- data-otservbr-global/monster/demons/shaburak_lord.lua | 2 +- data-otservbr-global/monster/demons/shaburak_prince.lua | 2 +- .../monster/demons/true_dawnfire_asura.lua | 2 +- .../monster/demons/true_frost_flower_asura.lua | 4 ++-- .../monster/demons/true_midnight_asura.lua | 4 ++-- data-otservbr-global/monster/demons/vexclaw.lua | 4 ++-- data-otservbr-global/monster/elementals/cliff_strider.lua | 2 +- .../monster/elementals/earth_elemental.lua | 2 +- data-otservbr-global/monster/elementals/foam_stalker.lua | 2 +- data-otservbr-global/monster/elementals/ironblight.lua | 4 ++-- data-otservbr-global/monster/elementals/lava_lurker.lua | 4 ++-- .../monster/elementals/massive_earth_elemental.lua | 2 +- .../monster/elementals/massive_fire_elemental.lua | 2 +- data-otservbr-global/monster/elementals/raging_fire.lua | 2 +- .../memory_creatures/memory_of_a_frazzlemaw.lua | 4 ++-- .../memory_creatures/memory_of_a_fungus.lua | 4 ++-- .../memory_creatures/memory_of_a_manticore.lua | 2 +- .../memory_creatures/memory_of_a_shaper.lua | 2 +- .../monster/extra_dimensional/courage_leech.lua | 2 +- .../monster/extra_dimensional/instable_sparkion.lua | 2 +- .../monster/extra_dimensional/sparkion.lua | 2 +- .../monster/extra_dimensional/yielothax.lua | 4 ++-- data-otservbr-global/monster/familiars/druid_familiar.lua | 2 +- .../monster/familiars/sorcerer_familiar.lua | 4 ++-- data-otservbr-global/monster/fey/arctic_faun.lua | 2 +- data-otservbr-global/monster/fey/boogy.lua | 2 +- data-otservbr-global/monster/giants/ogre_shaman.lua | 2 +- data-otservbr-global/monster/humanoids/broken_shaper.lua | 2 +- .../monster/humanoids/chakoya_toolshaper.lua | 2 +- .../monster/humanoids/crazed_summer_vanguard.lua | 2 +- .../monster/humanoids/crazed_winter_rearguard.lua | 2 +- .../monster/humanoids/crazed_winter_vanguard.lua | 2 +- data-otservbr-global/monster/humanoids/execowtioner.lua | 2 +- data-otservbr-global/monster/humanoids/insane_siren.lua | 2 +- data-otservbr-global/monster/humanoids/lost_exile.lua | 2 +- data-otservbr-global/monster/humanoids/lost_husher.lua | 2 +- data-otservbr-global/monster/humanoids/minotaur_amazon.lua | 4 ++-- .../monster/humanoids/mooh'tah_warrior.lua | 2 +- data-otservbr-global/monster/humanoids/moohtant.lua | 2 +- .../monster/humanoids/soul-broken_harbinger.lua | 2 +- data-otservbr-global/monster/humanoids/twisted_shaper.lua | 2 +- data-otservbr-global/monster/humans/blood_priest.lua | 2 +- data-otservbr-global/monster/humans/burning_gladiator.lua | 2 +- .../monster/humans/hardened_usurper_knight.lua | 2 +- .../monster/humans/hulking_carnisylvan.lua | 2 +- data-otservbr-global/monster/humans/infernalist.lua | 2 +- data-otservbr-global/monster/humans/usurper_knight.lua | 2 +- data-otservbr-global/monster/humans/vile_grandmaster.lua | 2 +- data-otservbr-global/monster/humans/warlock.lua | 2 +- data-otservbr-global/monster/lycanthropes/werebadger.lua | 2 +- data-otservbr-global/monster/lycanthropes/werefox.lua | 2 +- data-otservbr-global/monster/lycanthropes/werehyaena.lua | 2 +- .../monster/lycanthropes/werehyaena_shaman.lua | 2 +- data-otservbr-global/monster/lycanthropes/werelioness.lua | 2 +- data-otservbr-global/monster/magicals/bashmu.lua | 2 +- data-otservbr-global/monster/magicals/burning_book.lua | 2 +- data-otservbr-global/monster/magicals/choking_fear.lua | 2 +- data-otservbr-global/monster/magicals/crypt_warden.lua | 2 +- data-otservbr-global/monster/magicals/cursed_book.lua | 2 +- data-otservbr-global/monster/magicals/energetic_book.lua | 2 +- data-otservbr-global/monster/magicals/feral_sphinx.lua | 2 +- data-otservbr-global/monster/magicals/feversleep.lua | 2 +- data-otservbr-global/monster/magicals/frazzlemaw.lua | 4 ++-- data-otservbr-global/monster/magicals/gryphon.lua | 2 +- .../monster/magicals/guardian_of_tales.lua | 2 +- data-otservbr-global/monster/magicals/guzzlemaw.lua | 6 +++--- data-otservbr-global/monster/magicals/icecold_book.lua | 2 +- data-otservbr-global/monster/magicals/juvenile_bashmu.lua | 2 +- data-otservbr-global/monster/magicals/medusa.lua | 2 +- .../monster/magicals/menacing_carnivor.lua | 4 ++-- data-otservbr-global/monster/magicals/rage_squid.lua | 2 +- data-otservbr-global/monster/magicals/retching_horror.lua | 2 +- data-otservbr-global/monster/magicals/shiversleep.lua | 2 +- data-otservbr-global/monster/magicals/shock_head.lua | 2 +- .../monster/magicals/sight_of_surrender.lua | 2 +- data-otservbr-global/monster/magicals/sphinx.lua | 2 +- data-otservbr-global/monster/magicals/terrorsleep.lua | 2 +- data-otservbr-global/monster/magicals/thanatursus.lua | 2 +- .../monster/magicals/venerable_girtablilu.lua | 2 +- .../monster/magicals/weakened_frazzlemaw.lua | 4 ++-- data-otservbr-global/monster/mammals/doom_deer.lua | 2 +- data-otservbr-global/monster/mammals/gore_horn.lua | 2 +- data-otservbr-global/monster/mammals/vulcongra.lua | 2 +- data-otservbr-global/monster/mammals/yeti.lua | 2 +- data-otservbr-global/monster/plants/haunted_treeling.lua | 2 +- data-otservbr-global/monster/plants/hideous_fungus.lua | 2 +- data-otservbr-global/monster/plants/humongous_fungus.lua | 4 ++-- data-otservbr-global/monster/plants/omnivora.lua | 2 +- .../quests/a_pirates_tail_quest/ratmiral_blackwhiskers.lua | 2 +- .../monster/quests/ancient_feud/yirkas_blue_scales.lua | 2 +- .../monster/quests/ancient_tombs/horestis.lua | 2 +- .../monster/quests/annihilator/angry_demon.lua | 4 ++-- .../quests/bigfoots_burden/minion_of_versperoth.lua | 4 ++-- .../monster/quests/cults_of_tibia/animated_guzzlemaw.lua | 6 +++--- .../monster/quests/cults_of_tibia/animated_moohtant.lua | 2 +- .../quests/cults_of_tibia/bosses/eliz_the_unyielding.lua | 2 +- .../cults_of_tibia/bosses/eliz_the_unyielding_stop.lua | 2 +- .../quests/cults_of_tibia/bosses/essence_of_malice.lua | 2 +- .../quests/cults_of_tibia/bosses/the_armored_voidborn.lua | 2 +- .../cults_of_tibia/bosses/the_corruptor_of_souls.lua | 4 ++-- .../cults_of_tibia/bosses/the_remorseless_corruptor.lua | 6 +++--- .../quests/cults_of_tibia/bosses/the_souldespoiler.lua | 2 +- .../cults_of_tibia/bosses/the_unarmored_voidborn.lua | 2 +- .../monster/quests/cults_of_tibia/goldhanded_cultist.lua | 4 ++-- .../monster/quests/dangerous_depth/aggressive_matter.lua | 2 +- .../dangerous_depth/bosses/ancient_spawn_of_morgathla.lua | 2 +- .../dangerous_depth/bosses/the_count_of_the_core.lua | 2 +- .../monster/quests/feaster_of_souls/irgix_the_flimsy.lua | 4 ++-- .../monster/quests/feaster_of_souls/the_fear_feaster.lua | 2 +- .../monster/quests/feaster_of_souls/the_pale_worm.lua | 2 +- .../monster/quests/feaster_of_souls/the_unwelcome.lua | 2 +- .../monster/quests/feaster_of_souls/unaz_the_mean.lua | 4 ++-- .../monster/quests/feaster_of_souls/vok_the_freakish.lua | 4 ++-- .../quests/ferumbras_ascendant/bosses/death_dragon.lua | 2 +- .../ferumbras_ascendant/bosses/destabilized_ferumbras.lua | 2 +- .../ferumbras_ascendant/bosses/ferumbras_mortal_shell.lua | 2 +- .../ferumbras_ascendant/bosses/ferumbras_soul_splinter.lua | 2 +- .../monster/quests/ferumbras_ascendant/disgusting_ooze.lua | 2 +- .../ferumbras_ascendant/lovely/lovely_frazzlemaw.lua | 4 ++-- .../quests/ferumbras_ascendant/lovely/lovely_yielothax.lua | 4 ++-- .../ferumbras_ascendant/summons/enthralled_demon.lua | 4 ++-- .../monster/quests/forgotten_knowledge/animated_sword.lua | 2 +- .../quests/forgotten_knowledge/bosses/lady_tenebris.lua | 2 +- .../monster/quests/forgotten_knowledge/bosses/lloyd.lua | 2 +- .../forgotten_knowledge/bosses/mounted_thorn_knight.lua | 6 +++--- .../bosses/the_blazing_time_guardian.lua | 6 +++--- .../bosses/the_enraged_thorn_knight.lua | 6 +++--- .../bosses/the_freezing_time_guardian.lua | 6 +++--- .../forgotten_knowledge/bosses/the_last_lore_keeper.lua | 6 +++--- .../bosses/the_shielded_thorn_knight.lua | 6 +++--- .../forgotten_knowledge/bosses/the_time_guardian.lua | 6 +++--- .../quests/forgotten_knowledge/sword_of_vengeance.lua | 2 +- .../forgotten_knowledge/the_distorted_astral_source.lua | 2 +- .../monster/quests/forgotten_knowledge/thorn_minion.lua | 2 +- .../monster/quests/forgotten_knowledge/unbound_demon.lua | 2 +- .../quests/forgotten_knowledge/unbound_demon_outcast.lua | 4 ++-- .../monster/quests/grave_danger/bosses/count_vlarkorth.lua | 4 ++-- .../monster/quests/grave_danger/bosses/duke_krule.lua | 4 ++-- .../monster/quests/grave_danger/bosses/earl_osam.lua | 2 +- .../monster/quests/grave_danger/bosses/king_zelos.lua | 4 ++-- .../monster/quests/grave_danger/bosses/lord_azaram.lua | 2 +- .../monster/quests/grave_danger/bosses/sir_baeloc.lua | 2 +- .../monster/quests/grave_danger/bosses/sir_nictros.lua | 2 +- .../monster/quests/grave_danger/shard_of_magnor.lua | 4 ++-- .../monster/quests/grave_danger/vampiric_blood.lua | 4 ++-- .../monster/quests/heart_of_destruction/aftershock.lua | 2 +- .../monster/quests/heart_of_destruction/anomaly.lua | 4 ++-- .../quests/heart_of_destruction/charged_anomaly.lua | 4 ++-- .../quests/heart_of_destruction/charging_outburst.lua | 2 +- .../quests/heart_of_destruction/depolarized_crackler.lua | 2 +- .../monster/quests/heart_of_destruction/eradicator.lua | 4 ++-- .../monster/quests/heart_of_destruction/eradicator2.lua | 2 +- .../monster/quests/heart_of_destruction/foreshock.lua | 6 +++--- .../monster/quests/heart_of_destruction/greed.lua | 2 +- .../monster/quests/heart_of_destruction/outburst.lua | 4 ++-- .../monster/quests/heart_of_destruction/overcharge.lua | 2 +- .../monster/quests/heart_of_destruction/realityquake.lua | 4 ++-- .../monster/quests/heart_of_destruction/rupture.lua | 4 ++-- .../quests/heart_of_destruction/the_destruction.lua | 6 +++--- .../monster/quests/heart_of_destruction/the_hunger.lua | 4 ++-- .../monster/quests/heart_of_destruction/the_rage.lua | 4 ++-- .../monster/quests/heart_of_destruction/unstable_spark.lua | 2 +- .../monster/quests/heart_of_destruction/world_devourer.lua | 4 ++-- .../monster/quests/hero_of_rathleton/deep_terror.lua | 2 +- .../monster/quests/hero_of_rathleton/glooth_horror.lua | 2 +- .../monster/quests/hero_of_rathleton/professor_maxxen.lua | 4 ++-- .../quests/hero_of_rathleton/weakened_glooth_horror.lua | 2 +- .../monster/quests/in_service_of_yalahar/azerus.lua | 2 +- .../monster/quests/in_service_of_yalahar/azerus2.lua | 2 +- .../monster/quests/in_service_of_yalahar/inky.lua | 2 +- .../monster/quests/in_service_of_yalahar/rift_scythe.lua | 6 +++--- .../monster/quests/isle_of_evil/boogey.lua | 2 +- .../monster/quests/killing_in_the_name_of/bruise_payne.lua | 2 +- .../monster/quests/killing_in_the_name_of/zanakeph.lua | 2 +- .../monster/quests/kilmaresh/amenef_the_burning.lua | 2 +- .../mysterious_ornate_chest/reflection_of_mawhawk.lua | 4 ++-- .../monster/quests/pits_of_inferno/dracola.lua | 2 +- .../monster/quests/primal_ordeal_quest/the_end_of_days.lua | 2 +- data-otservbr-global/monster/quests/roshamuul/horadron.lua | 4 ++-- data-otservbr-global/monster/quests/roshamuul/terofar.lua | 4 ++-- .../monster/quests/soul_war/aspect_of_power.lua | 4 ++-- .../monster/quests/soul_war/dreadful_harvester.lua | 6 +++--- .../monster/quests/soul_war/goshnars_cruelty.lua | 2 +- .../monster/quests/soul_war/goshnars_greed.lua | 2 +- .../monster/quests/soul_war/goshnars_hatred.lua | 2 +- .../monster/quests/soul_war/goshnars_megalomania.lua | 4 ++-- .../monster/quests/soul_war/goshnars_spite.lua | 4 ++-- .../monster/quests/soul_war/hateful_soul.lua | 4 ++-- .../monster/quests/soul_war/malicious_soul.lua | 4 ++-- .../quests/svargrond_arena/warlord/deathbringer.lua | 2 +- .../warlord/fallen_mooh'tah_master_ghar.lua | 6 +++--- .../quests/svargrond_arena/warlord/the_obliverator.lua | 2 +- .../monster/quests/the_curse_spreads/black_vixen.lua | 2 +- .../monster/quests/the_curse_spreads/bloodback.lua | 2 +- .../monster/quests/the_curse_spreads/feroxa2.lua | 2 +- .../monster/quests/the_curse_spreads/feroxa3.lua | 2 +- .../monster/quests/the_curse_spreads/feroxa4.lua | 2 +- .../monster/quests/the_curse_spreads/feroxa5.lua | 2 +- .../monster/quests/the_curse_spreads/sharpclaw.lua | 2 +- .../monster/quests/the_dream_courts/bosses/alptramun.lua | 6 +++--- .../the_dream_courts/bosses/izcandar_the_banished.lua | 4 ++-- .../monster/quests/the_dream_courts/bosses/plagueroot.lua | 4 ++-- .../quests/the_dream_courts/mind-wrecking_dream.lua | 6 +++--- .../monster/quests/the_dream_courts/plant_abomination.lua | 2 +- .../the_elemental_spheres/blistering_fire_elemental.lua | 2 +- .../quests/the_elemental_spheres/earth_overlord.lua | 2 +- .../quests/the_elemental_spheres/energy_overlord.lua | 2 +- .../monster/quests/the_elemental_spheres/fire_overlord.lua | 2 +- .../the_elemental_spheres/jagged_earth_elemental.lua | 2 +- .../quests/the_elemental_spheres/muddy_earth_elemental.lua | 2 +- .../monster/quests/the_first_dragon/haunted_dragon.lua | 2 +- .../monster/quests/the_inquisition/ungreez.lua | 2 +- .../monster/quests/the_new_frontier/doomhowl.lua | 2 +- .../monster/quests/the_new_frontier/tirecz.lua | 2 +- .../the_order_of_lion/bosses/ancient_lion_knight.lua | 4 ++-- .../monster/quests/the_order_of_lion/bosses/drume.lua | 4 ++-- .../monster/quests/the_order_of_lion/bosses/kesar.lua | 4 ++-- .../monster/quests/the_order_of_lion/usurper_commander.lua | 2 +- .../quests/the_percht_queens_island/baleful_bunny.lua | 2 +- .../quests/the_percht_queens_island/bonny_bunny.lua | 2 +- .../monster/quests/the_percht_queens_island/percht.lua | 4 ++-- .../monster/quests/the_percht_queens_island/schiach.lua | 4 ++-- .../monster/quests/the_secret_library/biting_cold.lua | 2 +- .../monster/quests/the_secret_library/bone_jaw.lua | 2 +- .../monster/quests/the_secret_library/bosses/ghulosh.lua | 7 +++---- .../the_secret_library/bosses/grand_canon_dominus.lua | 2 +- .../the_secret_library/bosses/grand_chaplain_gaunder.lua | 2 +- .../the_secret_library/bosses/grand_commander_soeren.lua | 2 +- .../the_secret_library/bosses/thawing_dragon_lord.lua | 2 +- .../the_secret_library/bosses/the_scourge_of_oblivion.lua | 4 ++-- .../monster/quests/the_secret_library/brother_chill.lua | 2 +- .../monster/quests/the_secret_library/brother_freeze.lua | 2 +- .../quests/the_secret_library/concentrated_death.lua | 2 +- .../monster/quests/the_secret_library/dazed_leaf_golem.lua | 2 +- .../monster/quests/the_secret_library/demon_blood.lua | 2 +- .../monster/quests/the_secret_library/demon_slave.lua | 2 +- .../monster/quests/the_secret_library/furious_scorpion.lua | 2 +- .../quests/the_secret_library/ghulosh'_deathgaze.lua | 2 +- .../monster/quests/the_secret_library/imp_intruder.lua | 2 +- .../monster/quests/the_secret_library/invading_demon.lua | 2 +- .../monster/quests/the_secret_library/jailer.lua | 2 +- .../monster/quests/the_secret_library/librarian.lua | 2 +- .../monster/quests/the_secret_library/lokathmor.lua | 2 +- .../monster/quests/the_secret_library/lokathmor_stuck.lua | 2 +- .../monster/quests/the_secret_library/malicious_minion.lua | 2 +- .../monster/quests/the_secret_library/mazzinor.lua | 4 ++-- .../monster/quests/the_secret_library/mean_minion.lua | 2 +- .../quests/the_secret_library/ravenous_beyondling.lua | 2 +- .../monster/quests/the_secret_library/rift_breacher.lua | 2 +- .../monster/quests/the_secret_library/rift_minion.lua | 2 +- .../monster/quests/the_secret_library/rift_spawn.lua | 2 +- .../monster/quests/the_secret_library/spawn_of_havoc.lua | 2 +- .../the_secret_library/stolen_knowledge_of_armor.lua | 2 +- .../the_secret_library/stolen_knowledge_of_healing.lua | 2 +- .../the_secret_library/stolen_knowledge_of_lifesteal.lua | 2 +- .../the_secret_library/stolen_knowledge_of_spells.lua | 2 +- .../the_secret_library/stolen_knowledge_of_summoning.lua | 2 +- .../monster/quests/the_secret_library/the_blazing_rose.lua | 2 +- .../quests/the_secret_library/the_book_of_secrets.lua | 2 +- .../quests/the_secret_library/the_devourer_of_secrets.lua | 2 +- .../quests/the_secret_library/the_diamond_blossom.lua | 2 +- .../quests/the_secret_library/the_lily_of_night.lua | 2 +- .../quests/the_secret_library/the_scion_of_havoc.lua | 2 +- .../monster/quests/the_secret_library/the_spellstealer.lua | 2 +- .../monster/quests/the_secret_library/war_servant.lua | 2 +- .../quests/the_secret_library/yalahari_despoiler.lua | 2 +- data-otservbr-global/monster/raids/ferumbras.lua | 4 ++-- data-otservbr-global/monster/raids/furyosa.lua | 6 +++--- data-otservbr-global/monster/raids/ghazbaran.lua | 2 +- data-otservbr-global/monster/raids/glooth_bomb.lua | 2 +- data-otservbr-global/monster/raids/mawhawk.lua | 2 +- data-otservbr-global/monster/raids/ocyakao.lua | 2 +- data-otservbr-global/monster/raids/the_pale_count.lua | 2 +- data-otservbr-global/monster/raids/yakchal.lua | 2 +- data-otservbr-global/monster/reptiles/carnivostrich.lua | 4 ++-- data-otservbr-global/monster/reptiles/young_goanna.lua | 2 +- data-otservbr-global/monster/slimes/devourer.lua | 2 +- data-otservbr-global/monster/undeads/ahau.lua | 2 +- data-otservbr-global/monster/undeads/bonebeast.lua | 2 +- data-otservbr-global/monster/undeads/cursed_prospector.lua | 4 ++-- data-otservbr-global/monster/undeads/evil_prospector.lua | 4 ++-- data-otservbr-global/monster/undeads/falcon_knight.lua | 2 +- data-otservbr-global/monster/undeads/falcon_paladin.lua | 2 +- data-otservbr-global/monster/undeads/flimsy_lost_soul.lua | 4 ++-- .../monster/undeads/freakish_lost_soul.lua | 4 ++-- data-otservbr-global/monster/undeads/grim_reaper.lua | 6 +++--- data-otservbr-global/monster/undeads/iks_aucar.lua | 2 +- data-otservbr-global/monster/undeads/iks_churrascan.lua | 2 +- data-otservbr-global/monster/undeads/iks_pututu.lua | 2 +- data-otservbr-global/monster/undeads/lich.lua | 4 ++-- data-otservbr-global/monster/undeads/lost_soul.lua | 2 +- data-otservbr-global/monster/undeads/mean_lost_soul.lua | 4 ++-- .../monster/undeads/paladin's_apparition.lua | 2 +- data-otservbr-global/monster/undeads/rot_elemental.lua | 2 +- data-otservbr-global/monster/undeads/undead_dragon.lua | 2 +- data-otservbr-global/monster/undeads/vicious_manbat.lua | 4 ++-- data-otservbr-global/monster/vermins/cave_devourer.lua | 4 ++-- data-otservbr-global/monster/vermins/eyeless_devourer.lua | 2 +- data-otservbr-global/monster/vermins/lavafungus.lua | 2 +- data-otservbr-global/monster/vermins/tremendous_tyrant.lua | 2 +- data-otservbr-global/monster/vermins/tunnel_tyrant.lua | 4 ++-- data-otservbr-global/monster/vermins/wiggler.lua | 2 +- data-otservbr-global/scripts/lib/register_monster_type.lua | 5 +++++ 353 files changed, 478 insertions(+), 474 deletions(-) diff --git a/data-otservbr-global/monster/aquatics/deathling_spellsinger.lua b/data-otservbr-global/monster/aquatics/deathling_spellsinger.lua index 4324562c839..68d5df39ea4 100644 --- a/data-otservbr-global/monster/aquatics/deathling_spellsinger.lua +++ b/data-otservbr-global/monster/aquatics/deathling_spellsinger.lua @@ -102,7 +102,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -300, effect = CONST_ME_DRAWBLOOD }, { name = "combat", interval = 4000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -400, range = 5, shootEffect = CONST_ANI_HUNTINGSPEAR, target = false }, { name = "combat", interval = 4000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -150, maxDamage = -300, range = 5, shootEffect = CONST_ANI_LARGEROCK, target = false }, - { name = "combat", interval = 2000, chance = 14, type = COMBAT_HOLYDAMAGE, minDamage = -400, maxDamage = -700, length = 8, spread = 1, effect = CONST_ME_HOLYAREA, target = false }, + { name = "combat", interval = 2000, chance = 14, type = COMBAT_HOLYDAMAGE, minDamage = -400, maxDamage = -700, length = 8, spread = 0, effect = CONST_ME_HOLYAREA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/aquatics/manta_ray.lua b/data-otservbr-global/monster/aquatics/manta_ray.lua index 91254f37483..d7d3e301b3a 100644 --- a/data-otservbr-global/monster/aquatics/manta_ray.lua +++ b/data-otservbr-global/monster/aquatics/manta_ray.lua @@ -80,7 +80,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -110, effect = CONST_ME_DRAWBLOOD, condition = { type = CONDITION_POISON, totalDamage = 120, interval = 4000 } }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -75, maxDamage = -90, range = 7, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_ENERGYHIT, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -50, maxDamage = -110, length = 4, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -50, maxDamage = -110, length = 4, spread = 0, effect = CONST_ME_ENERGYHIT, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/aquatics/quara_hydromancer.lua b/data-otservbr-global/monster/aquatics/quara_hydromancer.lua index bcfff1bb973..4129dcfe81c 100644 --- a/data-otservbr-global/monster/aquatics/quara_hydromancer.lua +++ b/data-otservbr-global/monster/aquatics/quara_hydromancer.lua @@ -95,9 +95,9 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -80, effect = CONST_ME_DRAWBLOOD, condition = { type = CONDITION_POISON, totalDamage = 100, interval = 4000 } }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -180, length = 8, spread = 1, effect = CONST_ME_BUBBLES, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -180, length = 8, spread = 0, effect = CONST_ME_BUBBLES, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_ICEDAMAGE, minDamage = -90, maxDamage = -150, radius = 3, effect = CONST_ME_BUBBLES, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -170, maxDamage = -240, length = 8, spread = 1, effect = CONST_ME_HITBYPOISON, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -170, maxDamage = -240, length = 8, spread = 0, effect = CONST_ME_HITBYPOISON, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -170, range = 7, effect = CONST_ME_MAGIC_RED, target = true }, { name = "speed", interval = 2000, chance = 15, speedChange = -600, range = 7, effect = CONST_ME_MAGIC_RED, target = false, duration = 15000 }, } diff --git a/data-otservbr-global/monster/aquatics/quara_hydromancer_scout.lua b/data-otservbr-global/monster/aquatics/quara_hydromancer_scout.lua index b3ced121354..ad555715555 100644 --- a/data-otservbr-global/monster/aquatics/quara_hydromancer_scout.lua +++ b/data-otservbr-global/monster/aquatics/quara_hydromancer_scout.lua @@ -96,9 +96,9 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -80, effect = CONST_ME_DRAWBLOOD, condition = { type = CONDITION_POISON, totalDamage = 100, interval = 4000 } }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -180, length = 8, spread = 1, effect = CONST_ME_HITBYPOISON, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -180, length = 8, spread = 0, effect = CONST_ME_HITBYPOISON, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_ICEDAMAGE, minDamage = -90, maxDamage = -150, radius = 3, effect = CONST_ME_BUBBLES, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -170, maxDamage = -240, length = 8, spread = 1, effect = CONST_ME_BUBBLES, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -170, maxDamage = -240, length = 8, spread = 0, effect = CONST_ME_BUBBLES, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -170, range = 7, effect = CONST_ME_MAGIC_RED, target = true }, { name = "speed", interval = 2000, chance = 15, speedChange = -600, range = 7, effect = CONST_ME_MAGIC_RED, target = false, duration = 15000 }, } diff --git a/data-otservbr-global/monster/birds/demon_parrot.lua b/data-otservbr-global/monster/birds/demon_parrot.lua index 16490049cb8..e1112294753 100644 --- a/data-otservbr-global/monster/birds/demon_parrot.lua +++ b/data-otservbr-global/monster/birds/demon_parrot.lua @@ -83,7 +83,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 1200, chance = 100, minDamage = 0, maxDamage = -100 }, - { name = "drunk", interval = 1000, chance = 30, length = 5, spread = 1, effect = CONST_ME_SOUND_RED, target = false }, + { name = "drunk", interval = 1000, chance = 30, length = 5, spread = 0, effect = CONST_ME_SOUND_RED, target = false }, { name = "combat", interval = 1000, chance = 30, type = COMBAT_LIFEDRAIN, minDamage = -25, maxDamage = -45, range = 5, shootEffect = CONST_ANI_SUDDENDEATH, target = false }, { name = "combat", interval = 1000, chance = 30, type = COMBAT_LIFEDRAIN, minDamage = -15, maxDamage = -45, range = 1, target = false }, } diff --git a/data-otservbr-global/monster/bosses/apocalypse.lua b/data-otservbr-global/monster/bosses/apocalypse.lua index dd126524c83..3e60fe75e34 100644 --- a/data-otservbr-global/monster/bosses/apocalypse.lua +++ b/data-otservbr-global/monster/bosses/apocalypse.lua @@ -110,7 +110,7 @@ monster.attacks = { { name = "strength", interval = 1000, chance = 10, minDamage = -600, maxDamage = -1450, radius = 5, effect = CONST_ME_HITAREA, target = false }, { name = "combat", interval = 3000, chance = 13, type = COMBAT_FIREDAMAGE, minDamage = -300, maxDamage = -800, range = 7, radius = 7, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true }, { name = "combat", interval = 3000, chance = 8, type = COMBAT_MANADRAIN, minDamage = -600, maxDamage = -700, radius = 10, effect = CONST_ME_ENERGYAREA, target = false }, - { name = "combat", interval = 2000, chance = 9, type = COMBAT_ENERGYDAMAGE, minDamage = -400, maxDamage = -800, length = 8, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 9, type = COMBAT_ENERGYDAMAGE, minDamage = -400, maxDamage = -800, length = 8, spread = 0, effect = CONST_ME_MAGIC_RED, target = false }, -- poison { name = "condition", type = CONDITION_POISON, interval = 5000, chance = 18, minDamage = -800, maxDamage = -1000, effect = CONST_ME_HITBYPOISON, target = false }, { name = "combat", interval = 2000, chance = 6, type = COMBAT_LIFEDRAIN, minDamage = -600, maxDamage = -1200, radius = 14, effect = CONST_ME_MAGIC_GREEN, target = false }, diff --git a/data-otservbr-global/monster/bosses/bazir.lua b/data-otservbr-global/monster/bosses/bazir.lua index dc0f8a4d326..e9abbed723c 100644 --- a/data-otservbr-global/monster/bosses/bazir.lua +++ b/data-otservbr-global/monster/bosses/bazir.lua @@ -145,7 +145,7 @@ monster.attacks = { { name = "outfit", interval = 1000, chance = 2, radius = 8, effect = CONST_ME_LOSEENERGY, target = false, duration = 5000, outfitMonster = "demon" }, { name = "outfit", interval = 1000, chance = 2, radius = 8, effect = CONST_ME_LOSEENERGY, target = false, duration = 5000, outfitItem = 3058 }, { name = "combat", interval = 1000, chance = 34, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -900, range = 7, radius = 7, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true }, - { name = "combat", interval = 1000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -500, maxDamage = -850, length = 8, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 1000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -500, maxDamage = -850, length = 8, spread = 0, effect = CONST_ME_MAGIC_RED, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/bosses/brain_head.lua b/data-otservbr-global/monster/bosses/brain_head.lua index b070aba7140..c67524c5411 100644 --- a/data-otservbr-global/monster/bosses/brain_head.lua +++ b/data-otservbr-global/monster/bosses/brain_head.lua @@ -67,7 +67,7 @@ monster.loot = { monster.attacks = { { name = "combat", type = COMBAT_DEATHDAMAGE, interval = 2000, chance = 80, minDamage = -700, maxDamage = -1200, effect = CONST_ME_MORTAREA, shootEffect = CONST_ANI_SUDDENDEATH, target = true, range = 7 }, - { name = "combat", type = COMBAT_LIFEDRAIN, interval = 2000, chance = 20, length = 8, spread = 1, minDamage = -900, maxDamage = -1300, effect = CONST_ME_ELECTRICALSPARK }, + { name = "combat", type = COMBAT_LIFEDRAIN, interval = 2000, chance = 20, length = 8, spread = 0, minDamage = -900, maxDamage = -1300, effect = CONST_ME_ELECTRICALSPARK }, } monster.defenses = { diff --git a/data-otservbr-global/monster/bosses/diseased_bill.lua b/data-otservbr-global/monster/bosses/diseased_bill.lua index c2524dd8267..42df3b5c771 100644 --- a/data-otservbr-global/monster/bosses/diseased_bill.lua +++ b/data-otservbr-global/monster/bosses/diseased_bill.lua @@ -82,7 +82,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -207, condition = { type = CONDITION_POISON, totalDamage = 4, interval = 4000 } }, { name = "combat", interval = 2000, chance = 100, type = COMBAT_LIFEDRAIN, minDamage = -90, maxDamage = -140, effect = CONST_ME_MAGIC_RED, target = true }, - { name = "combat", interval = 1000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -175, radius = 2, shootEffect = CONST_ANI_SMALLEARTH, target = false }, + { name = "combat", interval = 1000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -175, radius = 2, shootEffect = CONST_ANI_SMALLEARTH, effect = CONST_ME_HITBYPOISON, target = false }, { name = "speed", interval = 3000, chance = 40, speedChange = -900, effect = CONST_ME_MAGIC_RED, target = true, duration = 20000 }, } diff --git a/data-otservbr-global/monster/bosses/diseased_dan.lua b/data-otservbr-global/monster/bosses/diseased_dan.lua index 7ee84a080a1..c44f9bc9702 100644 --- a/data-otservbr-global/monster/bosses/diseased_dan.lua +++ b/data-otservbr-global/monster/bosses/diseased_dan.lua @@ -82,7 +82,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -207, condition = { type = CONDITION_POISON, totalDamage = 4, interval = 4000 } }, { name = "combat", interval = 2000, chance = 100, type = COMBAT_LIFEDRAIN, minDamage = -90, maxDamage = -140, effect = CONST_ME_MAGIC_RED, target = true }, - { name = "combat", interval = 1000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -175, radius = 2, shootEffect = CONST_ANI_SMALLEARTH, target = false }, + { name = "combat", interval = 1000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -175, radius = 2, shootEffect = CONST_ANI_SMALLEARTH, effect = CONST_ME_HITBYPOISON, target = false }, { name = "speed", interval = 3000, chance = 40, speedChange = -900, effect = CONST_ME_MAGIC_RED, target = true, duration = 20000 }, } diff --git a/data-otservbr-global/monster/bosses/diseased_fred.lua b/data-otservbr-global/monster/bosses/diseased_fred.lua index d2ab31a5578..59304042e5c 100644 --- a/data-otservbr-global/monster/bosses/diseased_fred.lua +++ b/data-otservbr-global/monster/bosses/diseased_fred.lua @@ -82,7 +82,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -207, condition = { type = CONDITION_POISON, totalDamage = 4, interval = 4000 } }, { name = "combat", interval = 2000, chance = 100, type = COMBAT_LIFEDRAIN, minDamage = -90, maxDamage = -140, effect = CONST_ME_MAGIC_RED, target = true }, - { name = "combat", interval = 1000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -175, radius = 2, shootEffect = CONST_ANI_SMALLEARTH, target = false }, + { name = "combat", interval = 1000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -175, radius = 2, shootEffect = CONST_ANI_SMALLEARTH, effect = CONST_ME_HITBYPOISON, target = false }, { name = "speed", interval = 3000, chance = 40, speedChange = -900, effect = CONST_ME_MAGIC_RED, target = true, duration = 20000 }, } diff --git a/data-otservbr-global/monster/bosses/gaffir.lua b/data-otservbr-global/monster/bosses/gaffir.lua index 9eab5e3466c..a3e2feb16a6 100644 --- a/data-otservbr-global/monster/bosses/gaffir.lua +++ b/data-otservbr-global/monster/bosses/gaffir.lua @@ -109,7 +109,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -550 }, { name = "combat", interval = 2000, chance = 8, type = COMBAT_PHYSICALDAMAGE, minDamage = -450, maxDamage = -650, radius = 3, effect = CONST_ME_GROUNDSHAKER, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -400, maxDamage = -580, length = 5, spread = 1, effect = CONST_ME_EXPLOSIONHIT, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -400, maxDamage = -580, length = 5, spread = 0, effect = CONST_ME_EXPLOSIONHIT, target = false }, { name = "combat", interval = 3000, chance = 14, type = COMBAT_FIREDAMAGE, minDamage = -500, maxDamage = -750, shootEffect = CONST_ANI_FIRE, target = true }, { name = "combat", interval = 2000, chance = 16, type = COMBAT_EARTHDAMAGE, minDamage = -500, maxDamage = -620, radius = 4, shootEffect = CONST_ANI_EARTH, effect = CONST_ME_GREEN_RINGS, target = true }, { name = "combat", interval = 3000, chance = 12, type = COMBAT_EARTHDAMAGE, minDamage = -320, maxDamage = -500, radius = 2, effect = CONST_ME_GREEN_RINGS, target = false }, diff --git a/data-otservbr-global/monster/bosses/gravelord_oshuran.lua b/data-otservbr-global/monster/bosses/gravelord_oshuran.lua index a03db9c4b1b..442c014dcbb 100644 --- a/data-otservbr-global/monster/bosses/gravelord_oshuran.lua +++ b/data-otservbr-global/monster/bosses/gravelord_oshuran.lua @@ -90,8 +90,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -250 }, { name = "speed", interval = 2000, chance = 25, speedChange = -300, range = 7, effect = CONST_ME_MAGIC_RED, target = false, duration = 30000 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -180, maxDamage = -300, length = 7, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -100, maxDamage = -350, length = 7, spread = 1, effect = CONST_ME_HITBYPOISON, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -180, maxDamage = -300, length = 7, spread = 0, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -100, maxDamage = -350, length = 7, spread = 0, effect = CONST_ME_HITBYPOISON, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -200, maxDamage = -245, range = 1, effect = CONST_ME_MAGIC_RED, target = true }, } diff --git a/data-otservbr-global/monster/bosses/guard_captain_quaid.lua b/data-otservbr-global/monster/bosses/guard_captain_quaid.lua index e9a4dd322da..479757ca620 100644 --- a/data-otservbr-global/monster/bosses/guard_captain_quaid.lua +++ b/data-otservbr-global/monster/bosses/guard_captain_quaid.lua @@ -94,9 +94,9 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -580 }, { name = "combat", interval = 2000, chance = 18, type = COMBAT_EARTHDAMAGE, minDamage = -500, maxDamage = -620, radius = 4, shootEffect = CONST_ANI_EARTH, effect = CONST_ME_GREEN_RINGS, target = true }, { name = "combat", interval = 2000, chance = 22, type = COMBAT_PHYSICALDAMAGE, minDamage = -450, maxDamage = -700, shootEffect = CONST_ANI_THROWINGKNIFE, target = true }, - { name = "combat", interval = 2000, chance = 14, type = COMBAT_PHYSICALDAMAGE, minDamage = -350, maxDamage = -550, length = 5, spread = 1, effect = CONST_ME_EXPLOSIONHIT, target = false }, + { name = "combat", interval = 2000, chance = 14, type = COMBAT_PHYSICALDAMAGE, minDamage = -350, maxDamage = -550, length = 5, spread = 0, effect = CONST_ME_EXPLOSIONHIT, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -400, maxDamage = -550, radius = 1, shootEffect = CONST_ANI_BURSTARROW, effect = CONST_ME_FIREAREA, target = true }, - { name = "combat", interval = 2000, chance = 12, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -480, length = 5, spread = 1, effect = CONST_ME_EXPLOSIONHIT, target = false }, + { name = "combat", interval = 2000, chance = 12, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -480, length = 5, spread = 0, effect = CONST_ME_EXPLOSIONHIT, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -450, radius = 3, effect = CONST_ME_GREEN_RINGS, target = false }, } diff --git a/data-otservbr-global/monster/bosses/koshei_the_deathless.lua b/data-otservbr-global/monster/bosses/koshei_the_deathless.lua index 660a10942da..e0b1c5e1ecc 100644 --- a/data-otservbr-global/monster/bosses/koshei_the_deathless.lua +++ b/data-otservbr-global/monster/bosses/koshei_the_deathless.lua @@ -83,7 +83,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -170, condition = { type = CONDITION_POISON, totalDamage = 300, interval = 4000 } }, { name = "combat", interval = 3000, chance = 9, type = COMBAT_LIFEDRAIN, minDamage = -60, maxDamage = -250, range = 1, effect = CONST_ME_MAGIC_BLUE, target = false }, { name = "combat", interval = 1000, chance = 11, type = COMBAT_LIFEDRAIN, minDamage = -70, maxDamage = -135, radius = 3, effect = CONST_ME_MAGIC_RED, target = false }, - { name = "combat", interval = 2000, chance = 9, type = COMBAT_DEATHDAMAGE, minDamage = -50, maxDamage = -140, length = 8, spread = 1, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 9, type = COMBAT_DEATHDAMAGE, minDamage = -50, maxDamage = -140, length = 8, spread = 0, effect = CONST_ME_MORTAREA, target = false }, -- curse { name = "condition", type = CONDITION_CURSED, interval = 3000, chance = 15, minDamage = -54, maxDamage = -54, range = 1, target = false }, { name = "speed", interval = 2000, chance = 15, speedChange = -900, range = 7, effect = CONST_ME_MAGIC_RED, target = false, duration = 30000 }, diff --git a/data-otservbr-global/monster/bosses/kroazur.lua b/data-otservbr-global/monster/bosses/kroazur.lua index 478bc61bc8d..1664c14347a 100644 --- a/data-otservbr-global/monster/bosses/kroazur.lua +++ b/data-otservbr-global/monster/bosses/kroazur.lua @@ -95,7 +95,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 200, chance = 20, minDamage = 0, maxDamage = -650 }, { name = "combat", interval = 200, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -500, target = false }, - { name = "combat", interval = 500, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -200, maxDamage = -300, length = 8, spread = 1, effect = CONST_ME_MORTAREA, target = true }, + { name = "combat", interval = 500, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -200, maxDamage = -300, length = 8, spread = 0, effect = CONST_ME_MORTAREA, target = true }, { name = "combat", interval = 500, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -250, maxDamage = -300, radius = 8, effect = CONST_ME_MORTAREA, target = false }, } diff --git a/data-otservbr-global/monster/bosses/morshabaal.lua b/data-otservbr-global/monster/bosses/morshabaal.lua index c3e2da38cf8..4273977e2eb 100644 --- a/data-otservbr-global/monster/bosses/morshabaal.lua +++ b/data-otservbr-global/monster/bosses/morshabaal.lua @@ -97,7 +97,7 @@ monster.loot = { } monster.attacks = { - { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -5500, length = 8, spread = 1, effect = CONST_ME_GREYCHAIN }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -5500, length = 8, spread = 0, effect = CONST_ME_WHITE_ENERGY_SPARK }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_ICEDAMAGE, minDamage = -4000, maxDamage = -30000, effect = CONST_ME_ICEATTACK }, { name = "melee", interval = 2000, chance = 100, skill = 200, attack = 250 }, { name = "combat", interval = 1000, chance = 7, type = COMBAT_MANADRAIN, minDamage = -100, maxDamage = -1000, range = 7, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_POFF, target = false }, @@ -110,7 +110,7 @@ monster.attacks = { { name = "outfit", interval = 1000, chance = 2, radius = 8, effect = CONST_ME_LOSEENERGY, target = false, duration = 5000, outfitMonster = "demon" }, { name = "outfit", interval = 1000, chance = 2, radius = 8, effect = CONST_ME_LOSEENERGY, target = false, duration = 5000, outfitItem = 3058 }, { name = "combat", interval = 1000, chance = 34, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -900, range = 7, radius = 7, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true }, - { name = "combat", interval = 1000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -500, maxDamage = -850, length = 8, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 1000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -500, maxDamage = -850, length = 8, spread = 0, effect = CONST_ME_MAGIC_RED, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/bosses/pythius_the_rotten.lua b/data-otservbr-global/monster/bosses/pythius_the_rotten.lua index b635ea69133..80f694af6bc 100644 --- a/data-otservbr-global/monster/bosses/pythius_the_rotten.lua +++ b/data-otservbr-global/monster/bosses/pythius_the_rotten.lua @@ -81,10 +81,10 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -475 }, - { name = "combat", interval = 2000, chance = 16, type = COMBAT_PHYSICALDAMAGE, minDamage = -165, maxDamage = -200, range = 7, radius = 4, shootEffect = CONST_ANI_FIRE, target = true }, + { name = "combat", interval = 2000, chance = 16, type = COMBAT_PHYSICALDAMAGE, minDamage = -165, maxDamage = -200, range = 7, radius = 4, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true }, { name = "combat", interval = 2000, chance = 17, type = COMBAT_EARTHDAMAGE, minDamage = -55, maxDamage = -155, range = 7, radius = 4, shootEffect = CONST_ANI_POISON, effect = CONST_ME_POISONAREA, target = true }, { name = "combat", interval = 2500, chance = 14, type = COMBAT_EARTHDAMAGE, minDamage = -333, maxDamage = -413, length = 8, spread = 3, effect = CONST_ME_POISONAREA, target = false }, - { name = "combat", interval = 2500, chance = 22, type = COMBAT_MANADRAIN, minDamage = -85, maxDamage = -110, range = 7, radius = 4, shootEffect = CONST_ANI_ICE, target = true }, + { name = "combat", interval = 2500, chance = 22, type = COMBAT_MANADRAIN, minDamage = -85, maxDamage = -110, range = 7, radius = 4, shootEffect = CONST_ANI_ICE, effect = CONST_ME_LOSEENERGY, target = true }, { name = "speed", interval = 2000, chance = 20, speedChange = -300, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = true, duration = 30000 }, -- curse { name = "condition", type = CONDITION_CURSED, interval = 2000, chance = 15, range = 7, shootEffect = CONST_ANI_ICE, effect = CONST_ME_ICEATTACK, target = true }, diff --git a/data-otservbr-global/monster/bosses/splasher.lua b/data-otservbr-global/monster/bosses/splasher.lua index 570575b09f1..60b89710c4f 100644 --- a/data-otservbr-global/monster/bosses/splasher.lua +++ b/data-otservbr-global/monster/bosses/splasher.lua @@ -77,8 +77,8 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -109, condition = { type = CONDITION_POISON, totalDamage = 5, interval = 4000 } }, { name = "combat", interval = 2000, chance = 8, type = COMBAT_LIFEDRAIN, minDamage = -106, maxDamage = -169, range = 7, effect = CONST_ME_MAGIC_RED, target = true }, - { name = "combat", interval = 2000, chance = 7, type = COMBAT_LIFEDRAIN, minDamage = -162, maxDamage = -228, length = 8, spread = 1, effect = CONST_ME_HITBYPOISON, target = false }, - { name = "combat", interval = 2000, chance = 9, type = COMBAT_ICEDAMAGE, minDamage = -134, maxDamage = -148, length = 8, spread = 1, effect = CONST_ME_BUBBLES, target = false }, + { name = "combat", interval = 2000, chance = 7, type = COMBAT_LIFEDRAIN, minDamage = -162, maxDamage = -228, length = 8, spread = 0, effect = CONST_ME_HITBYPOISON, target = false }, + { name = "combat", interval = 2000, chance = 9, type = COMBAT_ICEDAMAGE, minDamage = -134, maxDamage = -148, length = 8, spread = 0, effect = CONST_ME_BUBBLES, target = false }, { name = "combat", interval = 2000, chance = 12, type = COMBAT_ICEDAMAGE, minDamage = -101, maxDamage = -149, radius = 3, effect = CONST_ME_BUBBLES, target = false }, { name = "speed", interval = 2000, chance = 20, speedChange = -300, range = 1, effect = CONST_ME_MAGIC_RED, target = false, duration = 3000 }, } diff --git a/data-otservbr-global/monster/bosses/the_abomination.lua b/data-otservbr-global/monster/bosses/the_abomination.lua index 1195b6ba10e..e6ba0b1ae06 100644 --- a/data-otservbr-global/monster/bosses/the_abomination.lua +++ b/data-otservbr-global/monster/bosses/the_abomination.lua @@ -95,7 +95,7 @@ monster.attacks = { { name = "speed", interval = 1000, chance = 12, speedChange = -800, radius = 6, effect = CONST_ME_POISONAREA, target = false, duration = 10000 }, { name = "combat", interval = 1000, chance = 9, type = COMBAT_EARTHDAMAGE, minDamage = -200, maxDamage = -650, radius = 4, effect = CONST_ME_POISONAREA, target = false }, { name = "combat", interval = 1000, chance = 11, type = COMBAT_LIFEDRAIN, minDamage = -400, maxDamage = -900, radius = 4, shootEffect = CONST_ANI_POISON, effect = CONST_ME_SOUND_GREEN, target = true }, - { name = "combat", interval = 2000, chance = 19, type = COMBAT_PHYSICALDAMAGE, minDamage = -350, maxDamage = -850, length = 7, spread = 1, shootEffect = CONST_ANI_POISON, target = false }, + { name = "combat", interval = 2000, chance = 19, type = COMBAT_PHYSICALDAMAGE, minDamage = -350, maxDamage = -850, length = 7, spread = 0, shootEffect = CONST_ANI_POISON, effect = CONST_ME_HITBYPOISON, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/bosses/the_astral_source.lua b/data-otservbr-global/monster/bosses/the_astral_source.lua index 8a8e02dcac9..abc46bfc1d4 100644 --- a/data-otservbr-global/monster/bosses/the_astral_source.lua +++ b/data-otservbr-global/monster/bosses/the_astral_source.lua @@ -66,7 +66,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -330 }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -500, range = 7, radius = 6, shootEffect = CONST_ANI_ENERGYBALL, effect = CONST_ME_PURPLEENERGY, target = true }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -500, range = 7, radius = 6, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_ENERGYHIT, target = true }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -400, length = 5, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -400, length = 5, spread = 0, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_MANADRAIN, minDamage = -200, maxDamage = -400, radius = 5, effect = CONST_ME_MAGIC_BLUE, target = false }, } diff --git a/data-otservbr-global/monster/bosses/the_book_of_death.lua b/data-otservbr-global/monster/bosses/the_book_of_death.lua index 8b65e1d0a48..6cea3d844aa 100644 --- a/data-otservbr-global/monster/bosses/the_book_of_death.lua +++ b/data-otservbr-global/monster/bosses/the_book_of_death.lua @@ -67,7 +67,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/bosses/the_brainstealer.lua b/data-otservbr-global/monster/bosses/the_brainstealer.lua index 2010de7b5c5..57a4beba537 100644 --- a/data-otservbr-global/monster/bosses/the_brainstealer.lua +++ b/data-otservbr-global/monster/bosses/the_brainstealer.lua @@ -93,7 +93,7 @@ monster.attacks = { { name = "melee", type = COMBAT_PHYSICALDAMAGE, interval = 2000, minDamage = 0, maxDamage = -900 }, { name = "combat", type = COMBAT_DEATHDAMAGE, interval = 2000, chance = 20, radius = 4, minDamage = -1200, maxDamage = -1900, effect = CONST_ME_MORTAREA, shootEffect = CONST_ANI_SUDDENDEATH, target = true, range = 7 }, { name = "combat", type = COMBAT_LIFEDRAIN, interval = 2000, chance = 20, radius = 4, minDamage = -700, maxDamage = -1000, effect = CONST_ME_DRAWBLOOD }, - { name = "combat", type = COMBAT_LIFEDRAIN, interval = 2000, chance = 10, length = 8, spread = 1, minDamage = -1200, maxDamage = -1600, effect = CONST_ME_ELECTRICALSPARK }, + { name = "combat", type = COMBAT_LIFEDRAIN, interval = 2000, chance = 10, length = 8, spread = 0, minDamage = -1200, maxDamage = -1600, effect = CONST_ME_ELECTRICALSPARK }, } monster.defenses = { diff --git a/data-otservbr-global/monster/bosses/the_collector.lua b/data-otservbr-global/monster/bosses/the_collector.lua index 8b506a4ce68..b3fa70f85c6 100644 --- a/data-otservbr-global/monster/bosses/the_collector.lua +++ b/data-otservbr-global/monster/bosses/the_collector.lua @@ -67,7 +67,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 100, attack = 40 }, - { name = "speed", interval = 1000, chance = 13, speedChange = -800, length = 8, spread = 1, effect = CONST_ME_ENERGYHIT, target = false, duration = 20000 }, + { name = "speed", interval = 1000, chance = 13, speedChange = -800, length = 8, spread = 0, effect = CONST_ME_ENERGYHIT, target = false, duration = 20000 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -85, range = 7, shootEffect = CONST_ANI_LARGEROCK, target = false }, { name = "melee", interval = 2000, chance = 15, minDamage = -10, maxDamage = -80 }, } diff --git a/data-otservbr-global/monster/bosses/visco.lua b/data-otservbr-global/monster/bosses/visco.lua index 3eb61243d45..96223ee28c0 100644 --- a/data-otservbr-global/monster/bosses/visco.lua +++ b/data-otservbr-global/monster/bosses/visco.lua @@ -92,7 +92,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 200, attack = 200 }, - { name = "combat", interval = 2000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -500, maxDamage = -1500, length = 8, spread = 1, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -500, maxDamage = -1500, length = 8, spread = 0, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 2000, chance = 30, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -1300, radius = 3, effect = CONST_ME_POISONAREA, target = false }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_MANADRAIN, minDamage = -50, maxDamage = -130, range = 7, effect = CONST_ME_MAGIC_GREEN, target = true }, { name = "speed", interval = 2000, chance = 20, speedChange = -500, range = 7, effect = CONST_ME_MAGIC_RED, target = false, duration = 20000 }, diff --git a/data-otservbr-global/monster/bosses/weakened_shlorg.lua b/data-otservbr-global/monster/bosses/weakened_shlorg.lua index 986ab7b836f..615bd45f158 100644 --- a/data-otservbr-global/monster/bosses/weakened_shlorg.lua +++ b/data-otservbr-global/monster/bosses/weakened_shlorg.lua @@ -89,7 +89,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 150, attack = 50, condition = { type = CONDITION_POISON, totalDamage = 180, interval = 4000 } }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -90, maxDamage = -180, length = 4, spread = 1, effect = CONST_ME_MAGIC_GREEN, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -90, maxDamage = -180, length = 4, spread = 0, effect = CONST_ME_MAGIC_GREEN, target = false }, { name = "combat", interval = 2000, chance = 14, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -150, radius = 5, effect = CONST_ME_GREEN_RINGS, target = false }, -- poison { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 13, minDamage = -360, maxDamage = -440, radius = 5, effect = CONST_ME_GREEN_RINGS, target = false }, diff --git a/data-otservbr-global/monster/bosses/zarabustor.lua b/data-otservbr-global/monster/bosses/zarabustor.lua index e0019ad46e0..8bb36a5e904 100644 --- a/data-otservbr-global/monster/bosses/zarabustor.lua +++ b/data-otservbr-global/monster/bosses/zarabustor.lua @@ -95,7 +95,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = 0, maxDamage = -250, range = 7, radius = 3, shootEffect = CONST_ANI_BURSTARROW, effect = CONST_ME_FIREAREA, target = true }, { name = "firefield", interval = 2000, chance = 10, range = 7, radius = 2, shootEffect = CONST_ANI_FIRE, target = true }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -250, range = 7, shootEffect = CONST_ANI_ENERGY, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -130, maxDamage = -350, length = 8, spread = 1, effect = CONST_ME_BIGCLOUDS, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -130, maxDamage = -350, length = 8, spread = 0, effect = CONST_ME_BIGCLOUDS, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = 0, maxDamage = -250, range = 7, target = false }, { name = "speed", interval = 2000, chance = 15, speedChange = -330, range = 7, effect = CONST_ME_MAGIC_RED, target = false, duration = 20000 }, { name = "warlock skill reducer", interval = 2000, chance = 5, range = 5, target = false }, diff --git a/data-otservbr-global/monster/bosses/zushuka.lua b/data-otservbr-global/monster/bosses/zushuka.lua index 8e37a23f312..2491261be7b 100644 --- a/data-otservbr-global/monster/bosses/zushuka.lua +++ b/data-otservbr-global/monster/bosses/zushuka.lua @@ -110,9 +110,9 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -560 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_ICEDAMAGE, minDamage = 0, maxDamage = -100, length = 8, spread = 1, effect = CONST_ME_ICEATTACK, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_ICEDAMAGE, minDamage = 0, maxDamage = -100, length = 8, spread = 0, effect = CONST_ME_ICEATTACK, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_ICEDAMAGE, minDamage = 0, maxDamage = -110, range = 7, shootEffect = CONST_ANI_SNOWBALL, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_ICEDAMAGE, minDamage = -300, maxDamage = -750, length = 8, spread = 1, effect = CONST_ME_ICEAREA, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_ICEDAMAGE, minDamage = -300, maxDamage = -750, length = 8, spread = 0, effect = CONST_ME_ICEAREA, target = false }, { name = "outfit", interval = 2000, chance = 10, range = 7, effect = CONST_ME_MAGIC_BLUE, target = false, duration = 4000, outfitItem = 7172 }, { name = "speed", interval = 2000, chance = 15, speedChange = -330, range = 7, effect = CONST_ME_ICETORNADO, target = false, duration = 20000 }, } diff --git a/data-otservbr-global/monster/constructs/golden_servant_replica.lua b/data-otservbr-global/monster/constructs/golden_servant_replica.lua index 4a93d0d9635..c5539f6d2d4 100644 --- a/data-otservbr-global/monster/constructs/golden_servant_replica.lua +++ b/data-otservbr-global/monster/constructs/golden_servant_replica.lua @@ -93,7 +93,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 40, attack = 40 }, - { name = "combat", interval = 2000, chance = 11, type = COMBAT_FIREDAMAGE, minDamage = -80, maxDamage = -110, length = 5, spread = 1, effect = CONST_ME_YELLOWENERGY, target = false }, + { name = "combat", interval = 2000, chance = 11, type = COMBAT_FIREDAMAGE, minDamage = -80, maxDamage = -110, length = 5, spread = 0, effect = CONST_ME_YELLOWENERGY, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -70, maxDamage = -110, range = 7, radius = 4, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_PURPLEENERGY, target = true }, } diff --git a/data-otservbr-global/monster/constructs/ice_golem.lua b/data-otservbr-global/monster/constructs/ice_golem.lua index 2f3a9d654ff..e5c226bae5c 100644 --- a/data-otservbr-global/monster/constructs/ice_golem.lua +++ b/data-otservbr-global/monster/constructs/ice_golem.lua @@ -94,7 +94,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -220 }, - { name = "speed", interval = 1000, chance = 13, speedChange = -800, length = 8, spread = 1, effect = CONST_ME_ENERGYHIT, target = false, duration = 20000 }, + { name = "speed", interval = 1000, chance = 13, speedChange = -800, length = 8, spread = 0, effect = CONST_ME_ENERGYHIT, target = false, duration = 20000 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_ICEDAMAGE, minDamage = -50, maxDamage = -85, range = 7, shootEffect = CONST_ANI_SMALLICE, effect = CONST_ME_ICEATTACK, target = false }, { name = "ice golem skill reducer", interval = 2000, chance = 10, target = false }, } diff --git a/data-otservbr-global/monster/constructs/lava_golem.lua b/data-otservbr-global/monster/constructs/lava_golem.lua index ec449392669..aed9ad864c0 100644 --- a/data-otservbr-global/monster/constructs/lava_golem.lua +++ b/data-otservbr-global/monster/constructs/lava_golem.lua @@ -108,7 +108,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400 }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -350, maxDamage = -700, length = 8, spread = 1, effect = CONST_ME_FIREATTACK, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -350, maxDamage = -700, length = 8, spread = 0, effect = CONST_ME_FIREATTACK, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -600, maxDamage = -1300, length = 8, spread = 3, effect = CONST_ME_MORTAREA, target = false }, { name = "lava golem soulfire", interval = 2000, chance = 15, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -220, maxDamage = -350, radius = 4, effect = CONST_ME_FIREAREA, target = true }, diff --git a/data-otservbr-global/monster/constructs/magma_crawler.lua b/data-otservbr-global/monster/constructs/magma_crawler.lua index c15ff702315..39c58ab8838 100644 --- a/data-otservbr-global/monster/constructs/magma_crawler.lua +++ b/data-otservbr-global/monster/constructs/magma_crawler.lua @@ -106,7 +106,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -203 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -1100, length = 8, spread = 1, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -1100, length = 8, spread = 0, effect = CONST_ME_MORTAREA, target = false }, { name = "magma crawler wave", interval = 2000, chance = 15, minDamage = -290, maxDamage = -800, target = false }, { name = "magma crawler soulfire", interval = 2000, chance = 20, target = false }, { name = "soulfire rune", interval = 2000, chance = 10, target = false }, diff --git a/data-otservbr-global/monster/constructs/metal_gargoyle.lua b/data-otservbr-global/monster/constructs/metal_gargoyle.lua index 6629b83bf4a..1cea2d7d8ac 100644 --- a/data-otservbr-global/monster/constructs/metal_gargoyle.lua +++ b/data-otservbr-global/monster/constructs/metal_gargoyle.lua @@ -97,7 +97,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 84, attack = 50 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -125, maxDamage = -230, length = 8, spread = 1, effect = CONST_ME_YELLOWENERGY, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -125, maxDamage = -230, length = 8, spread = 0, effect = CONST_ME_YELLOWENERGY, target = false }, { name = "combat", interval = 2000, chance = 9, type = COMBAT_LIFEDRAIN, minDamage = -85, maxDamage = -150, range = 7, radius = 3, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = true }, { name = "metal gargoyle curse", interval = 2000, chance = 13, target = false }, } diff --git a/data-otservbr-global/monster/constructs/stone_devourer.lua b/data-otservbr-global/monster/constructs/stone_devourer.lua index 8746e73f612..5a9174c3129 100644 --- a/data-otservbr-global/monster/constructs/stone_devourer.lua +++ b/data-otservbr-global/monster/constructs/stone_devourer.lua @@ -105,7 +105,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -990 }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -230, maxDamage = -460, range = 7, shootEffect = CONST_ANI_SMALLEARTH, effect = CONST_ME_STONES, target = true }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -650, range = 7, shootEffect = CONST_ANI_LARGEROCK, target = true }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -150, maxDamage = -260, length = 5, spread = 1, effect = CONST_ME_STONES, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -150, maxDamage = -260, length = 5, spread = 0, effect = CONST_ME_STONES, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/constructs/walker.lua b/data-otservbr-global/monster/constructs/walker.lua index 77cdf37192a..354f8fc2e6e 100644 --- a/data-otservbr-global/monster/constructs/walker.lua +++ b/data-otservbr-global/monster/constructs/walker.lua @@ -94,7 +94,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 70, attack = 50 }, { name = "walker skill reducer", interval = 2000, chance = 21, target = false }, - { name = "combat", interval = 2000, chance = 17, type = COMBAT_FIREDAMAGE, minDamage = -125, maxDamage = -245, length = 8, spread = 1, effect = CONST_ME_EXPLOSIONHIT, target = false }, + { name = "combat", interval = 2000, chance = 17, type = COMBAT_FIREDAMAGE, minDamage = -125, maxDamage = -245, length = 8, spread = 0, effect = CONST_ME_EXPLOSIONHIT, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/constructs/weeper.lua b/data-otservbr-global/monster/constructs/weeper.lua index cb09e9c5862..75a8d7ebb42 100644 --- a/data-otservbr-global/monster/constructs/weeper.lua +++ b/data-otservbr-global/monster/constructs/weeper.lua @@ -99,9 +99,9 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -450 }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -400, maxDamage = -1000, length = 8, spread = 1, effect = CONST_ME_FIREATTACK, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -400, maxDamage = -1000, length = 8, spread = 0, effect = CONST_ME_FIREATTACK, target = false }, { name = "combat", interval = 3000, chance = 100, type = COMBAT_FIREDAMAGE, minDamage = -80, maxDamage = -250, radius = 3, effect = CONST_ME_HITBYFIRE, target = false }, - { name = "speed", interval = 2000, chance = 10, speedChange = -800, length = 5, spread = 1, effect = CONST_ME_BLOCKHIT, target = false, duration = 30000 }, + { name = "speed", interval = 2000, chance = 10, speedChange = -800, length = 5, spread = 0, effect = CONST_ME_BLOCKHIT, target = false, duration = 30000 }, } monster.defenses = { diff --git a/data-otservbr-global/monster/demons/askarak_demon.lua b/data-otservbr-global/monster/demons/askarak_demon.lua index c9f9148febb..4802c5306ad 100644 --- a/data-otservbr-global/monster/demons/askarak_demon.lua +++ b/data-otservbr-global/monster/demons/askarak_demon.lua @@ -101,7 +101,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -143 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -20, maxDamage = -60, range = 7, radius = 6, shootEffect = CONST_ANI_POISON, effect = CONST_ME_GREEN_RINGS, target = false }, { name = "askarak wave", interval = 2000, chance = 15, minDamage = -75, maxDamage = -140, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -130, maxDamage = -170, length = 4, spread = 1, effect = CONST_ME_GREEN_RINGS, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -130, maxDamage = -170, length = 4, spread = 0, effect = CONST_ME_GREEN_RINGS, target = false }, { name = "speed", interval = 2000, chance = 10, speedChange = -600, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 15000 }, } diff --git a/data-otservbr-global/monster/demons/askarak_lord.lua b/data-otservbr-global/monster/demons/askarak_lord.lua index 407b90269a3..c16d893f0f9 100644 --- a/data-otservbr-global/monster/demons/askarak_lord.lua +++ b/data-otservbr-global/monster/demons/askarak_lord.lua @@ -101,7 +101,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -186 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -40, maxDamage = -80, range = 7, radius = 6, shootEffect = CONST_ANI_POISON, effect = CONST_ME_GREEN_RINGS, target = false }, { name = "askarak wave", interval = 2000, chance = 15, minDamage = -95, maxDamage = -180, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -130, maxDamage = -180, length = 4, spread = 1, effect = CONST_ME_GREEN_RINGS, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -130, maxDamage = -180, length = 4, spread = 0, effect = CONST_ME_GREEN_RINGS, target = false }, { name = "speed", interval = 2000, chance = 15, speedChange = -650, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 15000 }, } diff --git a/data-otservbr-global/monster/demons/askarak_prince.lua b/data-otservbr-global/monster/demons/askarak_prince.lua index b679df698fb..227ac9542ee 100644 --- a/data-otservbr-global/monster/demons/askarak_prince.lua +++ b/data-otservbr-global/monster/demons/askarak_prince.lua @@ -101,7 +101,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -353 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -70, maxDamage = -250, range = 7, radius = 6, shootEffect = CONST_ANI_POISON, effect = CONST_ME_GREEN_RINGS, target = false }, { name = "askarak wave", interval = 2000, chance = 15, minDamage = -100, maxDamage = -200, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -100, maxDamage = -200, length = 4, spread = 1, effect = CONST_ME_GREEN_RINGS, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -100, maxDamage = -200, length = 4, spread = 0, effect = CONST_ME_GREEN_RINGS, target = false }, { name = "speed", interval = 2000, chance = 15, speedChange = -700, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 15000 }, } diff --git a/data-otservbr-global/monster/demons/dawnfire_asura.lua b/data-otservbr-global/monster/demons/dawnfire_asura.lua index 2b58deba78d..ac6fb0d5308 100644 --- a/data-otservbr-global/monster/demons/dawnfire_asura.lua +++ b/data-otservbr-global/monster/demons/dawnfire_asura.lua @@ -107,7 +107,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -269 }, - { name = "combat", interval = 3700, chance = 17, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -300, length = 8, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false }, + { name = "combat", interval = 3700, chance = 17, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -300, length = 8, spread = 0, effect = CONST_ME_PURPLEENERGY, target = false }, { name = "combat", interval = 3200, chance = 25, type = COMBAT_DEATHDAMAGE, minDamage = -100, maxDamage = -350, radius = 4, range = 5, target = true, effect = CONST_ME_MORTAREA }, { name = "combat", interval = 2700, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -95, maxDamage = -180, range = 3, shootEffect = CONST_ANI_FIRE, target = true }, { name = "speed", interval = 2000, chance = 20, speedChange = -800, radius = 1, shootEffect = CONST_ANI_EXPLOSION, effect = CONST_ME_SLEEP, target = true, duration = 15000 }, diff --git a/data-otservbr-global/monster/demons/demon.lua b/data-otservbr-global/monster/demons/demon.lua index db0e6362102..3a1208c210b 100644 --- a/data-otservbr-global/monster/demons/demon.lua +++ b/data-otservbr-global/monster/demons/demon.lua @@ -132,7 +132,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = 0, maxDamage = -120, range = 7, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -150, maxDamage = -250, range = 7, radius = 7, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true }, { name = "firefield", interval = 2000, chance = 10, range = 7, radius = 1, shootEffect = CONST_ANI_FIRE, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -490, length = 8, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -490, length = 8, spread = 0, effect = CONST_ME_PURPLEENERGY, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -210, maxDamage = -300, range = 1, shootEffect = CONST_ANI_ENERGY, target = true }, { name = "speed", interval = 2000, chance = 15, speedChange = -700, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 30000 }, } diff --git a/data-otservbr-global/monster/demons/demon_outcast.lua b/data-otservbr-global/monster/demons/demon_outcast.lua index 18ddfc4c268..93c643d53dc 100644 --- a/data-otservbr-global/monster/demons/demon_outcast.lua +++ b/data-otservbr-global/monster/demons/demon_outcast.lua @@ -115,8 +115,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -250, maxDamage = -450, length = 6, spread = 1, effect = CONST_ME_PURPLEENERGY, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -350, maxDamage = -550, length = 8, spread = 1, effect = CONST_ME_YELLOWENERGY, target = true }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -250, maxDamage = -450, length = 6, spread = 0, effect = CONST_ME_PURPLEENERGY, target = true }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -350, maxDamage = -550, length = 8, spread = 0, effect = CONST_ME_YELLOWENERGY, target = true }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -100, maxDamage = -250, radius = 3, effect = CONST_ME_ENERGYHIT, target = true }, { name = "demon outcast skill reducer", interval = 2000, chance = 10, range = 5, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -80, maxDamage = -150, radius = 4, effect = CONST_ME_MAGIC_GREEN, target = false }, diff --git a/data-otservbr-global/monster/demons/duskbringer.lua b/data-otservbr-global/monster/demons/duskbringer.lua index 476ca99beeb..4d7c435f5ca 100644 --- a/data-otservbr-global/monster/demons/duskbringer.lua +++ b/data-otservbr-global/monster/demons/duskbringer.lua @@ -82,9 +82,9 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -350 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -165, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -350, maxDamage = -720, length = 8, spread = 1, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -300, length = 7, spread = 1, effect = CONST_ME_EXPLOSIONAREA, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -225, maxDamage = -275, radius = 4, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -350, maxDamage = -720, length = 8, spread = 0, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -300, length = 7, spread = 0, effect = CONST_ME_EXPLOSIONAREA, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -225, maxDamage = -275, radius = 4, effect = CONST_ME_MORTAREA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/demons/floating_savant.lua b/data-otservbr-global/monster/demons/floating_savant.lua index facdb6cbd12..dbe874c9c5f 100644 --- a/data-otservbr-global/monster/demons/floating_savant.lua +++ b/data-otservbr-global/monster/demons/floating_savant.lua @@ -97,7 +97,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -390, maxDamage = -480, range = 7, shootEffect = CONST_ANI_FIRE, target = false }, { name = "combat", interval = 2000, chance = 14, type = COMBAT_ENERGYDAMAGE, minDamage = -390, maxDamage = -480, range = 7, shootEffect = CONST_ANI_ENERGY, target = false }, { name = "combat", interval = 2000, chance = 12, type = COMBAT_FIREDAMAGE, minDamage = -300, maxDamage = -400, radius = 3, effect = CONST_ME_EXPLOSIONAREA, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -490, maxDamage = -630, length = 4, spread = 1, effect = CONST_ME_HITBYFIRE, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -490, maxDamage = -630, length = 4, spread = 0, effect = CONST_ME_HITBYFIRE, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/demons/frost_flower_asura.lua b/data-otservbr-global/monster/demons/frost_flower_asura.lua index 55a65961372..0f73f178e59 100644 --- a/data-otservbr-global/monster/demons/frost_flower_asura.lua +++ b/data-otservbr-global/monster/demons/frost_flower_asura.lua @@ -107,7 +107,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -110, maxDamage = -400 }, - { name = "combat", interval = 1300, chance = 14, type = COMBAT_HOLYDAMAGE, minDamage = -185, maxDamage = -210, length = 8, spread = 1, effect = CONST_ME_ICETORNADO, target = false }, + { name = "combat", interval = 1300, chance = 14, type = COMBAT_HOLYDAMAGE, minDamage = -185, maxDamage = -210, length = 8, spread = 0, effect = CONST_ME_ICETORNADO, target = false }, { name = "combat", interval = 1000, chance = 9, type = COMBAT_ICEDAMAGE, minDamage = -120, maxDamage = -200, range = 7, shootEffect = CONST_ANI_SMALLICE, effect = CONST_ME_ICEATTACK, target = true }, } diff --git a/data-otservbr-global/monster/demons/grimeleech.lua b/data-otservbr-global/monster/demons/grimeleech.lua index e4754df99ff..8db5e5d7069 100644 --- a/data-otservbr-global/monster/demons/grimeleech.lua +++ b/data-otservbr-global/monster/demons/grimeleech.lua @@ -114,7 +114,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 70, attack = 80 }, { name = "melee", interval = 2000, chance = 2, skill = 153, attack = 100 }, { name = "combat", interval = 2000, chance = 14, type = COMBAT_LIFEDRAINDAMAGE, minDamage = 100, maxDamage = -565, range = 7, shootEffect = CONST_ANI_DEATH, effect = CONST_ME_MORTAREA, target = true }, - { name = "combat", interval = 2000, chance = 12, type = COMBAT_LIFEDRAINDAMAGE, minDamage = -150, maxDamage = -220, length = 8, spread = 1, effect = CONST_ME_MAGIC_GREEN, target = false }, + { name = "combat", interval = 2000, chance = 12, type = COMBAT_LIFEDRAINDAMAGE, minDamage = -150, maxDamage = -220, length = 8, spread = 0, effect = CONST_ME_MAGIC_GREEN, target = false }, { name = "combat", interval = 2000, chance = 13, type = COMBAT_DEATHDAMAGE, minDamage = -225, maxDamage = -375, radius = 4, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 2000, chance = 9, type = COMBAT_MANADRAINDAMAGE, minDamage = 0, maxDamage = -300, length = 8, spread = 3, effect = CONST_ME_MAGIC_RED, target = false }, } diff --git a/data-otservbr-global/monster/demons/hellfire_fighter.lua b/data-otservbr-global/monster/demons/hellfire_fighter.lua index 00edc695381..446234df576 100644 --- a/data-otservbr-global/monster/demons/hellfire_fighter.lua +++ b/data-otservbr-global/monster/demons/hellfire_fighter.lua @@ -98,7 +98,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -520 }, { name = "firefield", interval = 2000, chance = 10, range = 7, radius = 3, shootEffect = CONST_ANI_FIRE, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -392, maxDamage = -1500, length = 8, spread = 1, effect = CONST_ME_FIREATTACK, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -392, maxDamage = -1500, length = 8, spread = 0, effect = CONST_ME_FIREATTACK, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -60, maxDamage = -330, range = 7, radius = 3, effect = CONST_ME_HITBYFIRE, target = false }, { name = "hellfire fighter soulfire", interval = 2000, chance = 15, target = false }, } diff --git a/data-otservbr-global/monster/demons/hellflayer.lua b/data-otservbr-global/monster/demons/hellflayer.lua index 54e2877f77b..93e9db81e1e 100644 --- a/data-otservbr-global/monster/demons/hellflayer.lua +++ b/data-otservbr-global/monster/demons/hellflayer.lua @@ -114,7 +114,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -170, maxDamage = -300, range = 7, shootEffect = CONST_ANI_POISON, target = false }, { name = "choking fear drown", interval = 2000, chance = 20, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -250, maxDamage = -500, radius = 4, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -50, maxDamage = -200, length = 8, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -50, maxDamage = -200, length = 8, spread = 0, effect = CONST_ME_PURPLEENERGY, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -300, maxDamage = -550, radius = 1, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREATTACK, target = true }, { name = "warlock skill reducer", interval = 2000, chance = 5, range = 5, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = 300, maxDamage = -500, radius = 1, shootEffect = CONST_ANI_EXPLOSION, effect = CONST_ME_SLEEP, target = true }, diff --git a/data-otservbr-global/monster/demons/midnight_asura.lua b/data-otservbr-global/monster/demons/midnight_asura.lua index d852da98af3..c3b0b3791e6 100644 --- a/data-otservbr-global/monster/demons/midnight_asura.lua +++ b/data-otservbr-global/monster/demons/midnight_asura.lua @@ -114,8 +114,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -387 }, { name = "combat", interval = 3300, chance = 10, type = COMBAT_MANADRAIN, minDamage = 0, maxDamage = -70, range = 7, target = true }, - { name = "combat", interval = 3700, chance = 17, type = COMBAT_ENERGYDAMAGE, minDamage = -150, maxDamage = -200, length = 5, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false }, - { name = "combat", interval = 4100, chance = 27, type = COMBAT_DEATHDAMAGE, minDamage = -150, maxDamage = -300, length = 8, spread = 1, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 3700, chance = 17, type = COMBAT_ENERGYDAMAGE, minDamage = -150, maxDamage = -200, length = 5, spread = 0, effect = CONST_ME_PURPLEENERGY, target = false }, + { name = "combat", interval = 4100, chance = 27, type = COMBAT_DEATHDAMAGE, minDamage = -150, maxDamage = -300, length = 8, spread = 0, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 2700, chance = 15, type = COMBAT_DEATHDAMAGE, minDamage = -50, maxDamage = -200, range = 5, shootEffect = CONST_ANI_SUDDENDEATH, target = true }, { name = "combat", interval = 3100, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -50, maxDamage = -100, range = 1, shootEffect = CONST_ANI_ENERGY, target = true }, { name = "speed", interval = 2000, chance = 20, speedChange = -800, radius = 1, shootEffect = CONST_ANI_EXPLOSION, effect = CONST_ME_SLEEP, target = true, duration = 15000 }, diff --git a/data-otservbr-global/monster/demons/shaburak_demon.lua b/data-otservbr-global/monster/demons/shaburak_demon.lua index ffa616ce2a8..043fd39641b 100644 --- a/data-otservbr-global/monster/demons/shaburak_demon.lua +++ b/data-otservbr-global/monster/demons/shaburak_demon.lua @@ -100,7 +100,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -113 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -20, maxDamage = -60, range = 7, radius = 6, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREATTACK, target = false }, { name = "shaburak wave", interval = 2000, chance = 15, minDamage = -70, maxDamage = -140, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -130, maxDamage = -170, length = 4, spread = 1, effect = CONST_ME_FIREATTACK, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -130, maxDamage = -170, length = 4, spread = 0, effect = CONST_ME_FIREATTACK, target = false }, { name = "speed", interval = 2000, chance = 10, speedChange = -600, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 15000 }, } diff --git a/data-otservbr-global/monster/demons/shaburak_lord.lua b/data-otservbr-global/monster/demons/shaburak_lord.lua index 7c07b202a96..3da72894836 100644 --- a/data-otservbr-global/monster/demons/shaburak_lord.lua +++ b/data-otservbr-global/monster/demons/shaburak_lord.lua @@ -100,7 +100,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -251 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -30, maxDamage = -75, range = 7, radius = 6, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREATTACK, target = false }, { name = "shaburak wave", interval = 2000, chance = 15, minDamage = -80, maxDamage = -170, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -140, maxDamage = -200, length = 4, spread = 1, effect = CONST_ME_FIREATTACK, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -140, maxDamage = -200, length = 4, spread = 0, effect = CONST_ME_FIREATTACK, target = false }, { name = "speed", interval = 2000, chance = 10, speedChange = -650, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 15000 }, } diff --git a/data-otservbr-global/monster/demons/shaburak_prince.lua b/data-otservbr-global/monster/demons/shaburak_prince.lua index 3044648a469..7885b5b086f 100644 --- a/data-otservbr-global/monster/demons/shaburak_prince.lua +++ b/data-otservbr-global/monster/demons/shaburak_prince.lua @@ -102,7 +102,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -319 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -40, maxDamage = -90, range = 7, radius = 6, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREATTACK, target = false }, { name = "shaburak wave", interval = 2000, chance = 15, minDamage = -100, maxDamage = -200, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -150, maxDamage = -250, length = 4, spread = 1, effect = CONST_ME_HITBYFIRE, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -150, maxDamage = -250, length = 4, spread = 0, effect = CONST_ME_HITBYFIRE, target = false }, { name = "speed", interval = 2000, chance = 15, speedChange = -700, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 15000 }, } diff --git a/data-otservbr-global/monster/demons/true_dawnfire_asura.lua b/data-otservbr-global/monster/demons/true_dawnfire_asura.lua index 20dba37c7e2..b434eb8be72 100644 --- a/data-otservbr-global/monster/demons/true_dawnfire_asura.lua +++ b/data-otservbr-global/monster/demons/true_dawnfire_asura.lua @@ -105,7 +105,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -700, condition = { type = CONDITION_FIRE, totalDamage = 500, interval = 4000 } }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -50, maxDamage = -300, range = 7, target = false }, -- mana drain beam - { name = "combat", interval = 1000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -450, maxDamage = -830, length = 1, spread = 1, effect = CONST_ME_HITBYFIRE, target = false }, -- fire missile + { name = "combat", interval = 1000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -450, maxDamage = -830, length = 1, spread = 0, effect = CONST_ME_HITBYFIRE, target = false }, -- fire missile { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -550, maxDamage = -750, radius = 4, effect = CONST_ME_BLACKSMOKE, target = false }, -- death ball { name = "speed", interval = 2000, chance = 15, speedChange = -200, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 30000 }, -- smoke berserk } diff --git a/data-otservbr-global/monster/demons/true_frost_flower_asura.lua b/data-otservbr-global/monster/demons/true_frost_flower_asura.lua index 19a231c7168..cd1b3bd8dda 100644 --- a/data-otservbr-global/monster/demons/true_frost_flower_asura.lua +++ b/data-otservbr-global/monster/demons/true_frost_flower_asura.lua @@ -110,8 +110,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -500, condition = { type = CONDITION_FREEZING, totalDamage = 400, interval = 4000 } }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = 0, maxDamage = -250, range = 7, target = false }, - { name = "combat", interval = 1000, chance = 10, type = COMBAT_ICEDAMAGE, minDamage = -550, maxDamage = -780, length = 8, spread = 1, effect = CONST_ME_ICETORNADO, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -300, length = 8, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false }, + { name = "combat", interval = 1000, chance = 10, type = COMBAT_ICEDAMAGE, minDamage = -550, maxDamage = -780, length = 8, spread = 0, effect = CONST_ME_ICETORNADO, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -300, length = 8, spread = 0, effect = CONST_ME_PURPLEENERGY, target = false }, { name = "speed", interval = 2000, chance = 15, speedChange = -100, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 30000 }, } diff --git a/data-otservbr-global/monster/demons/true_midnight_asura.lua b/data-otservbr-global/monster/demons/true_midnight_asura.lua index 48b05183a19..ebdac293ea6 100644 --- a/data-otservbr-global/monster/demons/true_midnight_asura.lua +++ b/data-otservbr-global/monster/demons/true_midnight_asura.lua @@ -112,8 +112,8 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -450 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -500, maxDamage = -650, range = 5, effect = CONST_ME_MORTAREA, target = true }, --Death Missile { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -50, maxDamage = -280, range = 7, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -240, length = 8, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -500, maxDamage = -700, length = 8, spread = 1, effect = CONST_ME_BLACKSMOKE, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -240, length = 8, spread = 0, effect = CONST_ME_PURPLEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -500, maxDamage = -700, length = 8, spread = 0, effect = CONST_ME_BLACKSMOKE, target = false }, { name = "speed", interval = 2000, chance = 15, speedChange = -100, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 30000 }, } diff --git a/data-otservbr-global/monster/demons/vexclaw.lua b/data-otservbr-global/monster/demons/vexclaw.lua index fa940a06bd1..d31045eacc8 100644 --- a/data-otservbr-global/monster/demons/vexclaw.lua +++ b/data-otservbr-global/monster/demons/vexclaw.lua @@ -121,9 +121,9 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -150, maxDamage = -250, range = 7, radius = 7, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true }, { name = "choking fear drown", interval = 2000, chance = 20, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -150, maxDamage = -400, radius = 4, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -50, maxDamage = -200, length = 8, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -50, maxDamage = -200, length = 8, spread = 0, effect = CONST_ME_PURPLEENERGY, target = false }, { name = "firefield", interval = 2000, chance = 10, range = 7, radius = 1, shootEffect = CONST_ANI_FIRE, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -490, length = 8, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -490, length = 8, spread = 0, effect = CONST_ME_PURPLEENERGY, target = false }, { name = "energy strike", interval = 2000, chance = 10, minDamage = -210, maxDamage = -300, range = 1, target = false }, { name = "speed", interval = 2000, chance = 15, speedChange = -300, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 30000 }, } diff --git a/data-otservbr-global/monster/elementals/cliff_strider.lua b/data-otservbr-global/monster/elementals/cliff_strider.lua index ffd9d0771fb..2690f356f23 100644 --- a/data-otservbr-global/monster/elementals/cliff_strider.lua +++ b/data-otservbr-global/monster/elementals/cliff_strider.lua @@ -118,7 +118,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -800, radius = 4, shootEffect = CONST_ANI_LARGEROCK, effect = CONST_ME_STONES, target = true }, { name = "cliff strider skill reducer", interval = 2000, chance = 10, target = false }, { name = "cliff strider electrify", interval = 2000, chance = 15, range = 1, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -1000, length = 6, spread = 1, effect = CONST_ME_GROUNDSHAKER, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -1000, length = 6, spread = 0, effect = CONST_ME_GROUNDSHAKER, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_MANADRAIN, minDamage = -100, maxDamage = -300, radius = 4, effect = CONST_ME_YELLOWENERGY, target = false }, } diff --git a/data-otservbr-global/monster/elementals/earth_elemental.lua b/data-otservbr-global/monster/elementals/earth_elemental.lua index 618618b5344..f71d6a7964d 100644 --- a/data-otservbr-global/monster/elementals/earth_elemental.lua +++ b/data-otservbr-global/monster/elementals/earth_elemental.lua @@ -96,7 +96,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -72, maxDamage = -105, range = 7, shootEffect = CONST_ANI_SMALLEARTH, effect = CONST_ME_GREEN_RINGS, target = true }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -100, range = 7, radius = 2, shootEffect = CONST_ANI_LARGEROCK, effect = CONST_ME_POFF, target = true }, -- poison - { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 20, minDamage = -200, maxDamage = -260, length = 6, spread = 1, effect = CONST_ME_BIGPLANTS, target = false }, + { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 20, minDamage = -200, maxDamage = -260, length = 6, spread = 0, effect = CONST_ME_BIGPLANTS, target = false }, -- poison { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -100, maxDamage = -140, radius = 5, shootEffect = CONST_ANI_POISON, effect = CONST_ME_POISONAREA, target = false }, { name = "speed", interval = 2000, chance = 10, speedChange = -330, range = 5, effect = CONST_ME_SMALLPLANTS, target = true, duration = 5000 }, diff --git a/data-otservbr-global/monster/elementals/foam_stalker.lua b/data-otservbr-global/monster/elementals/foam_stalker.lua index 1c98af0c129..5668eb0e29d 100644 --- a/data-otservbr-global/monster/elementals/foam_stalker.lua +++ b/data-otservbr-global/monster/elementals/foam_stalker.lua @@ -93,7 +93,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -300 }, { name = "foamsplash", interval = 5000, chance = 50, minDamage = -100, maxDamage = -300 }, - { name = "combat", interval = 2500, chance = 35, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -300, length = 6, spread = 1, effect = CONST_ME_LOSEENERGY }, + { name = "combat", interval = 2500, chance = 35, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -300, length = 6, spread = 0, effect = CONST_ME_LOSEENERGY }, { name = "combat", interval = 2000, chance = 45, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -300, range = 4, radius = 1, target = true, effect = CONST_ME_ICEATTACK, shootEffect = CONST_ANI_ICE }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -300, radius = 4, target = false, effect = CONST_ME_ICEAREA }, } diff --git a/data-otservbr-global/monster/elementals/ironblight.lua b/data-otservbr-global/monster/elementals/ironblight.lua index 4a1e81c1f66..593069318ed 100644 --- a/data-otservbr-global/monster/elementals/ironblight.lua +++ b/data-otservbr-global/monster/elementals/ironblight.lua @@ -108,9 +108,9 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -300 }, -- poison { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -460, maxDamage = -480, radius = 6, shootEffect = CONST_ANI_POISON, effect = CONST_ME_POISONAREA, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_ICEDAMAGE, minDamage = -260, maxDamage = -350, length = 7, spread = 1, shootEffect = CONST_ANI_ICE, effect = CONST_ME_ICEATTACK, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_ICEDAMAGE, minDamage = -260, maxDamage = -350, length = 7, spread = 0, shootEffect = CONST_ANI_ICE, effect = CONST_ME_ICEATTACK, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -180, maxDamage = -250, radius = 2, shootEffect = CONST_ANI_GREENSTAR, effect = CONST_ME_BIGPLANTS, target = true }, - { name = "speed", interval = 2000, chance = 10, speedChange = -800, length = 5, spread = 1, effect = CONST_ME_BLOCKHIT, target = false, duration = 30000 }, + { name = "speed", interval = 2000, chance = 10, speedChange = -800, length = 5, spread = 0, effect = CONST_ME_BLOCKHIT, target = false, duration = 30000 }, } monster.defenses = { diff --git a/data-otservbr-global/monster/elementals/lava_lurker.lua b/data-otservbr-global/monster/elementals/lava_lurker.lua index ff9125a958d..6a6e236f8c8 100644 --- a/data-otservbr-global/monster/elementals/lava_lurker.lua +++ b/data-otservbr-global/monster/elementals/lava_lurker.lua @@ -81,8 +81,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, - { name = "combat", interval = 1000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -70, maxDamage = -300, range = 7, length = 3, spread = 1, effect = CONST_ME_HITBYFIRE, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_FIREDAMAGE, minDamage = 0, maxDamage = -100, range = 7, length = 6, spread = 1, effect = CONST_ME_HITBYFIRE, target = false }, + { name = "combat", interval = 1000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -70, maxDamage = -300, range = 7, length = 3, spread = 0, effect = CONST_ME_HITBYFIRE, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_FIREDAMAGE, minDamage = 0, maxDamage = -100, range = 7, length = 6, spread = 0, effect = CONST_ME_HITBYFIRE, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/elementals/massive_earth_elemental.lua b/data-otservbr-global/monster/elementals/massive_earth_elemental.lua index f698324ba27..e894319b6ec 100644 --- a/data-otservbr-global/monster/elementals/massive_earth_elemental.lua +++ b/data-otservbr-global/monster/elementals/massive_earth_elemental.lua @@ -98,7 +98,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -99, maxDamage = -145, range = 7, shootEffect = CONST_ANI_SMALLEARTH, effect = CONST_ME_GREEN_RINGS, target = true }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = -95, maxDamage = -169, range = 7, radius = 2, shootEffect = CONST_ANI_LARGEROCK, effect = CONST_ME_POFF, target = true }, -- poison - { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 15, minDamage = -300, maxDamage = -320, length = 6, spread = 1, effect = CONST_ME_BIGPLANTS, target = false }, + { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 15, minDamage = -300, maxDamage = -320, length = 6, spread = 0, effect = CONST_ME_BIGPLANTS, target = false }, -- poison { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -200, maxDamage = -220, radius = 5, shootEffect = CONST_ANI_POISON, effect = CONST_ME_POISONAREA, target = false }, { name = "speed", interval = 2000, chance = 20, speedChange = -330, range = 5, effect = CONST_ME_SMALLPLANTS, target = true, duration = 5000 }, diff --git a/data-otservbr-global/monster/elementals/massive_fire_elemental.lua b/data-otservbr-global/monster/elementals/massive_fire_elemental.lua index f12696a35f8..e21cd8204dc 100644 --- a/data-otservbr-global/monster/elementals/massive_fire_elemental.lua +++ b/data-otservbr-global/monster/elementals/massive_fire_elemental.lua @@ -90,7 +90,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -300 }, { name = "firefield", interval = 2000, chance = 10, range = 7, radius = 3, shootEffect = CONST_ANI_FIRE, target = false }, { name = "firefield", interval = 2000, chance = 10, range = 7, radius = 3, shootEffect = CONST_ANI_FIRE, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -200, maxDamage = -700, length = 7, spread = 1, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -200, maxDamage = -700, length = 7, spread = 0, effect = CONST_ME_FIREAREA, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -60, maxDamage = -250, radius = 3, effect = CONST_ME_EXPLOSIONHIT, target = false }, { name = "massive fire elemental soulfire", interval = 2000, chance = 15, target = false }, } diff --git a/data-otservbr-global/monster/elementals/raging_fire.lua b/data-otservbr-global/monster/elementals/raging_fire.lua index 87e8f37de82..d83a26c3f81 100644 --- a/data-otservbr-global/monster/elementals/raging_fire.lua +++ b/data-otservbr-global/monster/elementals/raging_fire.lua @@ -77,7 +77,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 60, attack = 100 }, - { name = "combat", interval = 2000, chance = 9, type = COMBAT_FIREDAMAGE, minDamage = -65, maxDamage = -605, length = 7, spread = 1, target = false }, + { name = "combat", interval = 2000, chance = 9, type = COMBAT_FIREDAMAGE, minDamage = -65, maxDamage = -605, length = 7, spread = 0, effect = CONST_ME_FIREAREA, target = false }, { name = "massive fire elemental soulfire", interval = 2000, chance = 12, target = false }, { name = "firefield", interval = 2000, chance = 11, range = 7, radius = 3, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_EXPLOSIONHIT, target = true }, { name = "firefield", interval = 2000, chance = 11, radius = 3, effect = CONST_ME_HITBYFIRE, target = false }, diff --git a/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_frazzlemaw.lua b/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_frazzlemaw.lua index aed8ef34d48..2c10fd67059 100644 --- a/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_frazzlemaw.lua +++ b/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_frazzlemaw.lua @@ -79,8 +79,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -100 }, -- bleed - { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 10, minDamage = -50, maxDamage = -120, radius = 3, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -110, length = 5, spread = 1, effect = CONST_ME_EXPLOSIONAREA, target = false }, + { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 10, minDamage = -50, maxDamage = -120, radius = 3, effect = CONST_ME_DRAWBLOOD, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -110, length = 5, spread = 0, effect = CONST_ME_EXPLOSIONAREA, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -100, radius = 2, shootEffect = CONST_ANI_LARGEROCK, effect = CONST_ME_STONES, target = true }, { name = "speed", interval = 2000, chance = 15, speedChange = -600, radius = 5, effect = CONST_ME_MAGIC_RED, target = false, duration = 15000 }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -80, maxDamage = -150, radius = 4, effect = CONST_ME_MAGIC_RED, target = false }, diff --git a/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_fungus.lua b/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_fungus.lua index 951a19a9196..0860ca7a275 100644 --- a/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_fungus.lua +++ b/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_fungus.lua @@ -77,8 +77,8 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -50, maxDamage = -150, range = 7, shootEffect = CONST_ANI_SMALLEARTH, effect = CONST_ME_SMALLPLANTS, target = false }, { name = "poisonfield", interval = 2000, chance = 20, radius = 4, target = false }, -- poison - { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -30, maxDamage = -150, length = 8, spread = 1, effect = CONST_ME_GREEN_RINGS, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -80, maxDamage = -130, length = 5, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -30, maxDamage = -150, length = 8, spread = 0, effect = CONST_ME_GREEN_RINGS, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -80, maxDamage = -130, length = 5, spread = 0, effect = CONST_ME_MAGIC_RED, target = false }, -- poison { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -50, maxDamage = -180, range = 7, radius = 3, effect = CONST_ME_HITBYPOISON, target = false }, } diff --git a/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_manticore.lua b/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_manticore.lua index 24f0cfdd8ab..15bd40073bd 100644 --- a/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_manticore.lua +++ b/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_manticore.lua @@ -70,7 +70,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -100 }, - { name = "combat", interval = 2000, chance = 13, type = COMBAT_FIREDAMAGE, minDamage = -50, maxDamage = -150, length = 8, spread = 1, effect = CONST_ME_HITBYFIRE, target = false }, + { name = "combat", interval = 2000, chance = 13, type = COMBAT_FIREDAMAGE, minDamage = -50, maxDamage = -150, length = 8, spread = 0, effect = CONST_ME_HITBYFIRE, target = false }, { name = "combat", interval = 4000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -50, maxDamage = -150, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, effect = CONST_ME_GREEN_RINGS, target = true }, { name = "combat", interval = 2000, chance = 22, type = COMBAT_FIREDAMAGE, minDamage = -10, maxDamage = -100, range = 4, shootEffect = CONST_ANI_BURSTARROW, target = true }, } diff --git a/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_shaper.lua b/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_shaper.lua index b6dbeb3e46d..25ef89c48b4 100644 --- a/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_shaper.lua +++ b/data-otservbr-global/monster/event_creatures/memory_creatures/memory_of_a_shaper.lua @@ -76,7 +76,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = -50, maxDamage = -100, range = 7, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_ENERGYHIT, target = true }, - { name = "combat", interval = 2000, chance = 35, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -100, length = 5, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 35, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -100, length = 5, spread = 0, effect = CONST_ME_MAGIC_RED, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -50, maxDamage = -100, radius = 7, effect = CONST_ME_MAGIC_BLUE, target = false }, { name = "speed", interval = 2000, chance = 9, speedChange = -440, effect = CONST_ME_GIANTICE, target = true, duration = 7000 }, } diff --git a/data-otservbr-global/monster/extra_dimensional/courage_leech.lua b/data-otservbr-global/monster/extra_dimensional/courage_leech.lua index 4942741341e..d8ad3147a8e 100644 --- a/data-otservbr-global/monster/extra_dimensional/courage_leech.lua +++ b/data-otservbr-global/monster/extra_dimensional/courage_leech.lua @@ -99,7 +99,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -700 }, { name = "combat", interval = 2000, chance = 17, type = COMBAT_ENERGYDAMAGE, minDamage = -1100, maxDamage = -1400, radius = 4, shootEffect = CONST_ANI_ETHEREALSPEAR, effect = CONST_ME_ENERGYAREA, target = true }, { name = "combat", interval = 3000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -1100, maxDamage = -1400, radius = 4, effect = CONST_ME_ENERGYHIT, target = false }, - { name = "combat", interval = 3000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -900, maxDamage = -1100, length = 7, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 3000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -900, maxDamage = -1100, length = 7, spread = 0, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_HOLYDAMAGE, minDamage = -1100, maxDamage = -1300, range = 7, shootEffect = CONST_ANI_SMALLHOLY, effect = CONST_ME_HOLYDAMAGE, target = true }, { name = "energy chain", interval = 2000, chance = 20, minDamage = -900, maxDamage = -1000, range = 3, target = true }, } diff --git a/data-otservbr-global/monster/extra_dimensional/instable_sparkion.lua b/data-otservbr-global/monster/extra_dimensional/instable_sparkion.lua index 3844eda9275..f3e677200a6 100644 --- a/data-otservbr-global/monster/extra_dimensional/instable_sparkion.lua +++ b/data-otservbr-global/monster/extra_dimensional/instable_sparkion.lua @@ -95,7 +95,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -250 }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -250, maxDamage = -350, length = 6, spread = 1, effect = CONST_ME_GROUNDSHAKER, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -250, maxDamage = -350, length = 6, spread = 0, effect = CONST_ME_GROUNDSHAKER, target = false }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -150, maxDamage = -200, range = 5, shootEffect = CONST_ANI_ENERGYBALL, effect = CONST_ME_ENERGYHIT, target = true }, -- energy damage { name = "condition", type = CONDITION_ENERGY, interval = 2000, chance = 20, minDamage = -300, maxDamage = -600, range = 6, radius = 4, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_PURPLEENERGY, target = true }, diff --git a/data-otservbr-global/monster/extra_dimensional/sparkion.lua b/data-otservbr-global/monster/extra_dimensional/sparkion.lua index df175e251d9..94933e33f5b 100644 --- a/data-otservbr-global/monster/extra_dimensional/sparkion.lua +++ b/data-otservbr-global/monster/extra_dimensional/sparkion.lua @@ -105,7 +105,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400 }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -250, maxDamage = -400, length = 6, spread = 1, effect = CONST_ME_GROUNDSHAKER, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -250, maxDamage = -400, length = 6, spread = 0, effect = CONST_ME_GROUNDSHAKER, target = false }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -200, maxDamage = -400, range = 5, shootEffect = CONST_ANI_ENERGYBALL, effect = CONST_ME_ENERGYHIT, target = true }, -- energy damage { name = "condition", type = CONDITION_ENERGY, interval = 2000, chance = 20, minDamage = -300, maxDamage = -600, range = 6, radius = 4, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_PURPLEENERGY, target = true }, diff --git a/data-otservbr-global/monster/extra_dimensional/yielothax.lua b/data-otservbr-global/monster/extra_dimensional/yielothax.lua index 0896666ebe3..bfde638d1a8 100644 --- a/data-otservbr-global/monster/extra_dimensional/yielothax.lua +++ b/data-otservbr-global/monster/extra_dimensional/yielothax.lua @@ -104,10 +104,10 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 1000, chance = 100, minDamage = 0, maxDamage = -203 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -130, length = 4, spread = 1, effect = CONST_ME_ENERGYAREA, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -130, length = 4, spread = 0, effect = CONST_ME_ENERGYAREA, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -150, maxDamage = -250, radius = 3, effect = CONST_ME_HITBYPOISON, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -70, maxDamage = -120, radius = 3, effect = CONST_ME_HITBYPOISON, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -50, maxDamage = -150, length = 4, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -50, maxDamage = -150, length = 4, spread = 0, effect = CONST_ME_MAGIC_RED, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/familiars/druid_familiar.lua b/data-otservbr-global/monster/familiars/druid_familiar.lua index 3531af0921b..4e3861b5ba8 100644 --- a/data-otservbr-global/monster/familiars/druid_familiar.lua +++ b/data-otservbr-global/monster/familiars/druid_familiar.lua @@ -68,7 +68,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -300 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -230, maxDamage = -260, range = 5, shootEffect = CONST_ANI_EARTH, effect = CONST_ME_STONES, target = true }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_EARTHDAMAGE, minDamage = -90, maxDamage = -150, length = 2, spread = 1, effect = CONST_ME_GROUNDSHAKER, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_EARTHDAMAGE, minDamage = -90, maxDamage = -150, length = 2, spread = 0, effect = CONST_ME_GROUNDSHAKER, target = false }, { name = "summon challenge", interval = 2000, chance = 40, target = false }, } diff --git a/data-otservbr-global/monster/familiars/sorcerer_familiar.lua b/data-otservbr-global/monster/familiars/sorcerer_familiar.lua index 5c0463674f8..31d61dfbf28 100644 --- a/data-otservbr-global/monster/familiars/sorcerer_familiar.lua +++ b/data-otservbr-global/monster/familiars/sorcerer_familiar.lua @@ -67,8 +67,8 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -280 }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_LIFEDRAIN, minDamage = -90, maxDamage = -150, length = 2, spread = 1, target = false }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -190, maxDamage = -210, length = 2, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_LIFEDRAIN, minDamage = -90, maxDamage = -150, length = 2, spread = 0, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -190, maxDamage = -210, length = 2, spread = 0, effect = CONST_ME_ENERGYHIT, target = false }, { name = "summon challenge", interval = 2000, chance = 40, target = false }, } diff --git a/data-otservbr-global/monster/fey/arctic_faun.lua b/data-otservbr-global/monster/fey/arctic_faun.lua index 28970675211..d3ab41582dd 100644 --- a/data-otservbr-global/monster/fey/arctic_faun.lua +++ b/data-otservbr-global/monster/fey/arctic_faun.lua @@ -101,7 +101,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/fey/boogy.lua b/data-otservbr-global/monster/fey/boogy.lua index 997d476acec..681428a2713 100644 --- a/data-otservbr-global/monster/fey/boogy.lua +++ b/data-otservbr-global/monster/fey/boogy.lua @@ -99,7 +99,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -450 }, -- bleed - { name = "condition", type = CONDITION_BLEEDING, interval = 3000, chance = 11, minDamage = -100, maxDamage = -300, radius = 6, shootEffect = CONST_ANI_WHIRLWINDCLUB, target = true }, + { name = "condition", type = CONDITION_BLEEDING, interval = 3000, chance = 11, minDamage = -100, maxDamage = -300, radius = 6, shootEffect = CONST_ANI_WHIRLWINDCLUB, effect = CONST_ME_DRAWBLOOD, target = true }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -60, maxDamage = -115, range = 7, shootEffect = CONST_ANI_LARGEROCK, effect = CONST_ME_EXPLOSIONAREA, target = true }, } diff --git a/data-otservbr-global/monster/giants/ogre_shaman.lua b/data-otservbr-global/monster/giants/ogre_shaman.lua index 6e185f36aae..6e3dd2c2586 100644 --- a/data-otservbr-global/monster/giants/ogre_shaman.lua +++ b/data-otservbr-global/monster/giants/ogre_shaman.lua @@ -114,7 +114,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -269, condition = { type = CONDITION_FIRE, totalDamage = 6, interval = 9000 } }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -70, maxDamage = -180, range = 7, shootEffect = CONST_ANI_POISON, target = false }, { name = "outfit", interval = 2000, chance = 8, range = 7, effect = CONST_ME_MAGIC_BLUE, target = false, duration = 4000, outfitMonster = "chicken" }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -15, maxDamage = -120, length = 8, spread = 1, effect = CONST_ME_CARNIPHILA, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -15, maxDamage = -120, length = 8, spread = 0, effect = CONST_ME_CARNIPHILA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/humanoids/broken_shaper.lua b/data-otservbr-global/monster/humanoids/broken_shaper.lua index cefb789bb57..9ed950bbc70 100644 --- a/data-otservbr-global/monster/humanoids/broken_shaper.lua +++ b/data-otservbr-global/monster/humanoids/broken_shaper.lua @@ -105,7 +105,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 2000, chance = 35, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -150, range = 7, shootEffect = CONST_ANI_SMALLSTONE, target = true }, - { name = "combat", interval = 2000, chance = 35, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -100, length = 5, spread = 1, effect = CONST_ME_SOUND_RED, target = false }, + { name = "combat", interval = 2000, chance = 35, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -100, length = 5, spread = 0, effect = CONST_ME_SOUND_RED, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/humanoids/chakoya_toolshaper.lua b/data-otservbr-global/monster/humanoids/chakoya_toolshaper.lua index e7a68a152a3..010c4cf0603 100644 --- a/data-otservbr-global/monster/humanoids/chakoya_toolshaper.lua +++ b/data-otservbr-global/monster/humanoids/chakoya_toolshaper.lua @@ -92,7 +92,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -35 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -45, range = 7, radius = 3, shootEffect = CONST_ANI_SMALLSTONE, target = true }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -45, range = 7, radius = 1, shootEffect = CONST_ANI_SMALLSTONE, target = true }, } monster.defenses = { diff --git a/data-otservbr-global/monster/humanoids/crazed_summer_vanguard.lua b/data-otservbr-global/monster/humanoids/crazed_summer_vanguard.lua index e3e334fc775..38fe860c679 100644 --- a/data-otservbr-global/monster/humanoids/crazed_summer_vanguard.lua +++ b/data-otservbr-global/monster/humanoids/crazed_summer_vanguard.lua @@ -97,7 +97,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -450 }, - { name = "combat", interval = 2500, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -300, length = 3, spread = 1, effect = CONST_ME_FIREAREA, target = false }, + { name = "combat", interval = 2500, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -300, length = 3, spread = 0, effect = CONST_ME_FIREAREA, target = false }, { name = "combat", interval = 3000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -300, radius = 1, effect = CONST_ME_FIREAREA, target = false }, { name = "combat", interval = 3500, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -250, maxDamage = -300, range = 7, shootEffect = CONST_ANI_FIRE, target = false }, { name = "combat", interval = 4000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -300, radius = 3, effect = CONST_ME_EXPLOSIONHIT, target = true }, diff --git a/data-otservbr-global/monster/humanoids/crazed_winter_rearguard.lua b/data-otservbr-global/monster/humanoids/crazed_winter_rearguard.lua index 696c3535b01..d7d54c49c01 100644 --- a/data-otservbr-global/monster/humanoids/crazed_winter_rearguard.lua +++ b/data-otservbr-global/monster/humanoids/crazed_winter_rearguard.lua @@ -101,7 +101,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400 }, { name = "combat", interval = 2500, chance = 20, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -300, range = 5, radius = 1, effect = CONST_ME_ICEAREA, target = true }, - { name = "combat", interval = 3000, chance = 25, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -300, length = 4, spread = 1, effect = CONST_ME_GIANTICE, target = false }, + { name = "combat", interval = 3000, chance = 25, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -300, length = 4, spread = 0, effect = CONST_ME_GIANTICE, target = false }, { name = "combat", interval = 3500, chance = 25, type = COMBAT_ICEDAMAGE, minDamage = -250, maxDamage = -300, radius = 3, effect = CONST_ME_ICEAREA, target = false }, } diff --git a/data-otservbr-global/monster/humanoids/crazed_winter_vanguard.lua b/data-otservbr-global/monster/humanoids/crazed_winter_vanguard.lua index be072031382..22cac33bccb 100644 --- a/data-otservbr-global/monster/humanoids/crazed_winter_vanguard.lua +++ b/data-otservbr-global/monster/humanoids/crazed_winter_vanguard.lua @@ -97,7 +97,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400 }, { name = "combat", interval = 2500, chance = 30, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -300, range = 5, radius = 1, effect = CONST_ME_ICEAREA, target = true }, - { name = "combat", interval = 3000, chance = 20, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -300, length = 4, spread = 1, effect = CONST_ME_GIANTICE, target = false }, + { name = "combat", interval = 3000, chance = 20, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -300, length = 4, spread = 0, effect = CONST_ME_GIANTICE, target = false }, { name = "combat", interval = 3500, chance = 20, type = COMBAT_ICEDAMAGE, minDamage = -250, maxDamage = -300, radius = 3, effect = CONST_ME_ICEAREA, target = false }, } diff --git a/data-otservbr-global/monster/humanoids/execowtioner.lua b/data-otservbr-global/monster/humanoids/execowtioner.lua index 77b37dcd9c8..7de794d5cf3 100644 --- a/data-otservbr-global/monster/humanoids/execowtioner.lua +++ b/data-otservbr-global/monster/humanoids/execowtioner.lua @@ -102,7 +102,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 90, attack = 80 }, - { name = "combat", interval = 2000, chance = 8, type = COMBAT_LIFEDRAIN, minDamage = -135, maxDamage = -280, range = 7, radius = 5, shootEffect = CONST_ANI_WHIRLWINDAXE, target = true }, + { name = "combat", interval = 2000, chance = 8, type = COMBAT_LIFEDRAIN, minDamage = -135, maxDamage = -280, range = 7, radius = 5, shootEffect = CONST_ANI_WHIRLWINDAXE, effect = CONST_ME_DRAWBLOOD, target = true }, { name = "combat", interval = 2000, chance = 8, type = COMBAT_PHYSICALDAMAGE, minDamage = -90, maxDamage = -200, range = 7, shootEffect = CONST_ANI_WHIRLWINDAXE, effect = CONST_ME_EXPLOSIONAREA, target = true }, } diff --git a/data-otservbr-global/monster/humanoids/insane_siren.lua b/data-otservbr-global/monster/humanoids/insane_siren.lua index 3df81ea68f4..b5a6d3acddd 100644 --- a/data-otservbr-global/monster/humanoids/insane_siren.lua +++ b/data-otservbr-global/monster/humanoids/insane_siren.lua @@ -95,7 +95,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -450 }, - { name = "combat", interval = 2300, chance = 17, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -300, length = 3, spread = 1, effect = CONST_ME_FIREAREA, target = false }, + { name = "combat", interval = 2300, chance = 17, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -300, length = 3, spread = 0, effect = CONST_ME_FIREAREA, target = false }, { name = "combat", interval = 2600, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -300, radius = 1, effect = CONST_ME_FIREAREA, target = false }, { name = "combat", interval = 2900, chance = 17, type = COMBAT_FIREDAMAGE, minDamage = -250, maxDamage = -300, range = 7, shootEffect = CONST_ANI_FIRE, target = false }, { name = "combat", interval = 3200, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -300, radius = 3, effect = CONST_ME_EXPLOSIONHIT, target = true }, diff --git a/data-otservbr-global/monster/humanoids/lost_exile.lua b/data-otservbr-global/monster/humanoids/lost_exile.lua index d1eeeea20ae..0acd587804b 100644 --- a/data-otservbr-global/monster/humanoids/lost_exile.lua +++ b/data-otservbr-global/monster/humanoids/lost_exile.lua @@ -114,7 +114,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -120 }, - { name = "sudden death rune", interval = 2000, chance = 15, minDamage = -150, maxDamage = -350, range = 3, length = 6, spread = 1, effect = CONST_ME_MORTAREA, target = false }, + { name = "sudden death rune", interval = 2000, chance = 15, minDamage = -150, maxDamage = -350, range = 3, length = 6, spread = 0, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_MANADRAIN, minDamage = -150, maxDamage = -250, range = 3, length = 5, spread = 5, effect = CONST_ME_SMOKE, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -150, maxDamage = -290, range = 3, length = 5, spread = 5, shootEffect = CONST_ANI_LARGEROCK, effect = CONST_ME_POISONAREA, target = false }, { name = "sudden death rune", interval = 2000, chance = 15, minDamage = -70, maxDamage = -250, range = 7, target = false }, diff --git a/data-otservbr-global/monster/humanoids/lost_husher.lua b/data-otservbr-global/monster/humanoids/lost_husher.lua index e62611fff84..d8167f9710d 100644 --- a/data-otservbr-global/monster/humanoids/lost_husher.lua +++ b/data-otservbr-global/monster/humanoids/lost_husher.lua @@ -102,7 +102,7 @@ monster.loot = { } monster.attacks = { - { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -150, maxDamage = -300, length = 6, spread = 1, effect = CONST_ME_BLACKSMOKE, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -150, maxDamage = -300, length = 6, spread = 0, effect = CONST_ME_BLACKSMOKE, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -150, maxDamage = -250, radius = 5, effect = CONST_ME_BLACKSMOKE, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -150, maxDamage = -200, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -150, maxDamage = -250, range = 7, radius = 2, shootEffect = CONST_ANI_SMALLEARTH, effect = CONST_ME_MAGIC_GREEN, target = true }, diff --git a/data-otservbr-global/monster/humanoids/minotaur_amazon.lua b/data-otservbr-global/monster/humanoids/minotaur_amazon.lua index 5fae57a6df1..7139b2bc776 100644 --- a/data-otservbr-global/monster/humanoids/minotaur_amazon.lua +++ b/data-otservbr-global/monster/humanoids/minotaur_amazon.lua @@ -104,11 +104,11 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 50, attack = 50 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -50, maxDamage = -305, length = 8, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -50, maxDamage = -305, length = 8, spread = 0, effect = CONST_ME_MAGIC_RED, target = false }, { name = "combat", interval = 2000, chance = 16, type = COMBAT_LIFEDRAIN, minDamage = -50, maxDamage = -150, radius = 4, effect = CONST_ME_MAGIC_RED, target = false }, { name = "combat", interval = 2000, chance = 22, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -150, range = 7, shootEffect = CONST_ANI_HUNTINGSPEAR, effect = CONST_ME_EXPLOSIONAREA, target = false }, -- bleed - { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 40, minDamage = -300, maxDamage = -400, radius = 4, shootEffect = CONST_ANI_THROWINGKNIFE, target = true }, + { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 40, minDamage = -300, maxDamage = -400, radius = 4, effect = CONST_ME_DRAWBLOOD, shootEffect = CONST_ANI_THROWINGKNIFE, target = true }, { name = "minotaur amazon paralyze", interval = 2000, chance = 15, target = false }, } diff --git a/data-otservbr-global/monster/humanoids/mooh'tah_warrior.lua b/data-otservbr-global/monster/humanoids/mooh'tah_warrior.lua index 6efa23ca5dc..d163ac881f2 100644 --- a/data-otservbr-global/monster/humanoids/mooh'tah_warrior.lua +++ b/data-otservbr-global/monster/humanoids/mooh'tah_warrior.lua @@ -99,7 +99,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 45, attack = 80 }, - { name = "combat", interval = 2000, chance = 14, type = COMBAT_ENERGYDAMAGE, minDamage = -150, maxDamage = -200, length = 4, spread = 1, effect = CONST_ME_YELLOWENERGY, target = false }, + { name = "combat", interval = 2000, chance = 14, type = COMBAT_ENERGYDAMAGE, minDamage = -150, maxDamage = -200, length = 4, spread = 0, effect = CONST_ME_YELLOWENERGY, target = false }, { name = "combat", interval = 2000, chance = 11, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -135, range = 7, shootEffect = CONST_ANI_LARGEROCK, effect = CONST_ME_EXPLOSIONAREA, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -50, maxDamage = -150, radius = 3, effect = CONST_ME_HITAREA, target = false }, { name = "mooh'tah master skill reducer", interval = 2000, chance = 19, range = 7, target = false }, diff --git a/data-otservbr-global/monster/humanoids/moohtant.lua b/data-otservbr-global/monster/humanoids/moohtant.lua index f871a077ed8..dc730c4f488 100644 --- a/data-otservbr-global/monster/humanoids/moohtant.lua +++ b/data-otservbr-global/monster/humanoids/moohtant.lua @@ -96,7 +96,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 110, attack = 50 }, - { name = "combat", interval = 2000, chance = 13, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -230, length = 3, spread = 1, effect = CONST_ME_GROUNDSHAKER, target = false }, + { name = "combat", interval = 2000, chance = 13, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -230, length = 3, spread = 0, effect = CONST_ME_GROUNDSHAKER, target = false }, { name = "combat", interval = 2000, chance = 12, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -200, radius = 3, effect = CONST_ME_GROUNDSHAKER, target = false }, { name = "combat", interval = 2000, chance = 19, type = COMBAT_LIFEDRAIN, minDamage = -50, maxDamage = -225, radius = 5, effect = CONST_ME_MAGIC_RED, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -150, maxDamage = -235, range = 7, radius = 4, shootEffect = CONST_ANI_LARGEROCK, effect = CONST_ME_EXPLOSIONAREA, target = true }, diff --git a/data-otservbr-global/monster/humanoids/soul-broken_harbinger.lua b/data-otservbr-global/monster/humanoids/soul-broken_harbinger.lua index 845a3419548..d4d36d4733c 100644 --- a/data-otservbr-global/monster/humanoids/soul-broken_harbinger.lua +++ b/data-otservbr-global/monster/humanoids/soul-broken_harbinger.lua @@ -95,7 +95,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400 }, { name = "combat", interval = 2100, chance = 40, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -300, range = 5, radius = 1, effect = CONST_ME_ICEAREA, target = true }, - { name = "combat", interval = 2600, chance = 30, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -300, length = 4, spread = 1, effect = CONST_ME_GIANTICE, target = false }, + { name = "combat", interval = 2600, chance = 30, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -300, length = 4, spread = 0, effect = CONST_ME_GIANTICE, target = false }, { name = "combat", interval = 3100, chance = 20, type = COMBAT_ICEDAMAGE, minDamage = -250, maxDamage = -300, radius = 3, effect = CONST_ME_ICEAREA, target = false }, } diff --git a/data-otservbr-global/monster/humanoids/twisted_shaper.lua b/data-otservbr-global/monster/humanoids/twisted_shaper.lua index c5f6f7fecb9..564d71cb077 100644 --- a/data-otservbr-global/monster/humanoids/twisted_shaper.lua +++ b/data-otservbr-global/monster/humanoids/twisted_shaper.lua @@ -98,7 +98,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = -50, maxDamage = -100, range = 7, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_ENERGYHIT, target = true }, - { name = "combat", interval = 2000, chance = 35, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -100, length = 5, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 35, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -100, length = 5, spread = 0, effect = CONST_ME_MAGIC_RED, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -50, maxDamage = -100, radius = 7, effect = CONST_ME_MAGIC_BLUE, target = false }, { name = "speed", interval = 2000, chance = 9, speedChange = -440, effect = CONST_ME_GIANTICE, target = true, duration = 7000 }, } diff --git a/data-otservbr-global/monster/humans/blood_priest.lua b/data-otservbr-global/monster/humans/blood_priest.lua index 822d15b06e1..ecf8642d4f3 100644 --- a/data-otservbr-global/monster/humans/blood_priest.lua +++ b/data-otservbr-global/monster/humans/blood_priest.lua @@ -100,7 +100,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -80, condition = { type = CONDITION_POISON, totalDamage = 100, interval = 4000 } }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -60, maxDamage = -100, range = 7, shootEffect = CONST_ANI_DEATH, effect = CONST_ME_SMALLCLOUDS, target = true }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -40, maxDamage = -60, radius = 4, effect = CONST_ME_MAGIC_RED, target = false }, - { name = "combat", interval = 3000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -80, maxDamage = -130, range = 1, length = 7, spread = 1, effect = CONST_ME_HITAREA, target = true }, + { name = "combat", interval = 3000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -80, maxDamage = -130, range = 1, length = 7, spread = 0, effect = CONST_ME_HITAREA, target = true }, -- bleed { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 5, minDamage = -160, maxDamage = -290, range = 1, radius = 1, target = true }, } diff --git a/data-otservbr-global/monster/humans/burning_gladiator.lua b/data-otservbr-global/monster/humans/burning_gladiator.lua index a14d8061470..8923d0928cb 100644 --- a/data-otservbr-global/monster/humans/burning_gladiator.lua +++ b/data-otservbr-global/monster/humans/burning_gladiator.lua @@ -108,7 +108,7 @@ monster.attacks = { { name = "firering", interval = 2000, chance = 10, minDamage = -300, maxDamage = -500, target = false }, { name = "firex", interval = 2000, chance = 15, minDamage = -300, maxDamage = -500, target = false }, { name = "combat", interval = 2000, chance = 17, type = COMBAT_FIREDAMAGE, minDamage = -300, maxDamage = -500, radius = 2, effect = CONST_ME_FIREATTACK, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -500, length = 3, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -500, length = 3, spread = 0, effect = CONST_ME_ENERGYHIT, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/humans/hardened_usurper_knight.lua b/data-otservbr-global/monster/humans/hardened_usurper_knight.lua index 3bb4fb98b6d..341b85f2de2 100644 --- a/data-otservbr-global/monster/humans/hardened_usurper_knight.lua +++ b/data-otservbr-global/monster/humans/hardened_usurper_knight.lua @@ -67,7 +67,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -500, effect = CONST_ME_DRAWBLOOD }, { name = "combat", interval = 6000, chance = 9, type = COMBAT_DEATHDAMAGE, minDamage = -150, maxDamage = -300, radius = 3, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 6000, chance = 13, type = COMBAT_ICEDAMAGE, minDamage = -150, maxDamage = -400, length = 4, spread = 1, effect = CONST_ME_ICEATTACK, target = false }, + { name = "combat", interval = 6000, chance = 13, type = COMBAT_ICEDAMAGE, minDamage = -150, maxDamage = -400, length = 4, spread = 0, effect = CONST_ME_ICEATTACK, target = false }, { name = "singlecloudchain", interval = 8000, chance = 12, minDamage = -200, maxDamage = -450, range = 4, effect = CONST_ME_ENERGYHIT, target = true }, } diff --git a/data-otservbr-global/monster/humans/hulking_carnisylvan.lua b/data-otservbr-global/monster/humans/hulking_carnisylvan.lua index 27585b39b85..46cd198afc0 100644 --- a/data-otservbr-global/monster/humans/hulking_carnisylvan.lua +++ b/data-otservbr-global/monster/humans/hulking_carnisylvan.lua @@ -93,7 +93,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -300 }, { name = "combat", interval = 2000, chance = 60, type = COMBAT_EARTHDAMAGE, minDamage = -350, maxDamage = -450, range = 5, shootEffect = CONST_ANI_SMALLEARTH, effect = CONST_ME_POISONAREA, target = true }, { name = "combat", interval = 2000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -600, maxDamage = -800, radius = 4, effect = CONST_ME_EXPLOSIONHIT, target = false }, - { name = "combat", interval = 2000, chance = 30, type = COMBAT_PHYSICALDAMAGE, minDamage = -350, maxDamage = -400, length = 4, spread = 1, effect = CONST_ME_EXPLOSIONHIT, target = false }, + { name = "combat", interval = 2000, chance = 30, type = COMBAT_PHYSICALDAMAGE, minDamage = -350, maxDamage = -400, length = 4, spread = 0, effect = CONST_ME_EXPLOSIONHIT, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/humans/infernalist.lua b/data-otservbr-global/monster/humans/infernalist.lua index c1df6e1d267..7a7931e86db 100644 --- a/data-otservbr-global/monster/humans/infernalist.lua +++ b/data-otservbr-global/monster/humans/infernalist.lua @@ -110,7 +110,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -90, maxDamage = -180, range = 7, radius = 3, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_MANADRAIN, minDamage = -53, maxDamage = -120, range = 7, radius = 3, shootEffect = CONST_ANI_ENERGYBALL, effect = CONST_ME_TELEPORT, target = true }, { name = "firefield", interval = 2000, chance = 15, range = 7, radius = 3, shootEffect = CONST_ANI_FIRE, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -150, maxDamage = -250, length = 8, spread = 1, effect = CONST_ME_FIREATTACK, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -150, maxDamage = -250, length = 8, spread = 0, effect = CONST_ME_FIREATTACK, target = false }, { name = "combat", interval = 2000, chance = 5, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -150, radius = 2, effect = CONST_ME_EXPLOSIONAREA, target = false }, } diff --git a/data-otservbr-global/monster/humans/usurper_knight.lua b/data-otservbr-global/monster/humans/usurper_knight.lua index 52f737e675a..7116b67fbfa 100644 --- a/data-otservbr-global/monster/humans/usurper_knight.lua +++ b/data-otservbr-global/monster/humans/usurper_knight.lua @@ -96,7 +96,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -500, effect = CONST_ME_DRAWBLOOD }, { name = "combat", interval = 6000, chance = 14, type = COMBAT_DEATHDAMAGE, minDamage = -150, maxDamage = -300, radius = 3, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 6000, chance = 20, type = COMBAT_ICEDAMAGE, minDamage = -150, maxDamage = -400, length = 4, spread = 1, effect = CONST_ME_ICEATTACK, target = false }, + { name = "combat", interval = 6000, chance = 20, type = COMBAT_ICEDAMAGE, minDamage = -150, maxDamage = -400, length = 4, spread = 0, effect = CONST_ME_ICEATTACK, target = false }, { name = "singlecloudchain", interval = 8000, chance = 17, minDamage = -200, maxDamage = -450, range = 4, effect = CONST_ME_ENERGYHIT, target = true }, } diff --git a/data-otservbr-global/monster/humans/vile_grandmaster.lua b/data-otservbr-global/monster/humans/vile_grandmaster.lua index f04f5361b8a..8fe45841071 100644 --- a/data-otservbr-global/monster/humans/vile_grandmaster.lua +++ b/data-otservbr-global/monster/humans/vile_grandmaster.lua @@ -108,7 +108,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 10, maxDamage = -260 }, -- bleed - { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 20, minDamage = -150, maxDamage = -225, radius = 4, shootEffect = CONST_ANI_THROWINGKNIFE, target = true }, + { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 20, minDamage = -150, maxDamage = -225, radius = 4, shootEffect = CONST_ANI_THROWINGKNIFE, effect = CONST_ME_DRAWBLOOD, target = true }, } monster.defenses = { diff --git a/data-otservbr-global/monster/humans/warlock.lua b/data-otservbr-global/monster/humans/warlock.lua index 2f3def2a200..027399c07a6 100644 --- a/data-otservbr-global/monster/humans/warlock.lua +++ b/data-otservbr-global/monster/humans/warlock.lua @@ -118,7 +118,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = 0, maxDamage = -120, range = 7, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -50, maxDamage = -180, range = 7, radius = 3, shootEffect = CONST_ANI_BURSTARROW, effect = CONST_ME_FIREAREA, target = true }, { name = "firefield", interval = 2000, chance = 10, range = 7, radius = 2, shootEffect = CONST_ANI_FIRE, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -150, maxDamage = -230, length = 8, spread = 1, effect = CONST_ME_BIGCLOUDS, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -150, maxDamage = -230, length = 8, spread = 0, effect = CONST_ME_BIGCLOUDS, target = false }, { name = "speed", interval = 2000, chance = 15, speedChange = -600, range = 7, effect = CONST_ME_MAGIC_RED, target = false, duration = 20000 }, } diff --git a/data-otservbr-global/monster/lycanthropes/werebadger.lua b/data-otservbr-global/monster/lycanthropes/werebadger.lua index 1e052aed9e9..3ae7a6b8c0e 100644 --- a/data-otservbr-global/monster/lycanthropes/werebadger.lua +++ b/data-otservbr-global/monster/lycanthropes/werebadger.lua @@ -101,7 +101,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 50, attack = 60, condition = { type = CONDITION_POISON, totalDamage = 140, interval = 4000 } }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -21, maxDamage = -150, range = 7, shootEffect = CONST_ANI_EARTH, effect = CONST_ME_CARNIPHILA, target = true }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -10, maxDamage = -100, length = 8, spread = 1, effect = CONST_ME_CARNIPHILA, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -10, maxDamage = -100, length = 8, spread = 0, effect = CONST_ME_CARNIPHILA, target = false }, { name = "speed", interval = 4000, chance = 20, radius = 7, effect = CONST_ME_POFF, target = true }, } diff --git a/data-otservbr-global/monster/lycanthropes/werefox.lua b/data-otservbr-global/monster/lycanthropes/werefox.lua index fff16330124..5a6f1f256c1 100644 --- a/data-otservbr-global/monster/lycanthropes/werefox.lua +++ b/data-otservbr-global/monster/lycanthropes/werefox.lua @@ -107,7 +107,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -290 }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -200, shootEffect = CONST_ANI_GREENSTAR, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -225, range = 7, radius = 4, effect = CONST_ME_MAGIC_RED, target = true }, - { name = "combat", interval = 2000, chance = 14, type = COMBAT_DEATHDAMAGE, minDamage = -100, maxDamage = -700, length = 5, spread = 1, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 14, type = COMBAT_DEATHDAMAGE, minDamage = -100, maxDamage = -700, length = 5, spread = 0, effect = CONST_ME_MORTAREA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/lycanthropes/werehyaena.lua b/data-otservbr-global/monster/lycanthropes/werehyaena.lua index e55cf22d9a5..62a890f771f 100644 --- a/data-otservbr-global/monster/lycanthropes/werehyaena.lua +++ b/data-otservbr-global/monster/lycanthropes/werehyaena.lua @@ -97,7 +97,7 @@ monster.attacks = { { name = "melee", type = COMBAT_PHYSICALDAMAGE, interval = 2 * 1000, minDamage = 0, maxDamage = -300 }, { name = "combat", type = COMBAT_EARTHDAMAGE, interval = 2 * 1000, chance = 17, minDamage = -175, maxDamage = -255, radius = 3, effect = CONST_ME_HITBYPOISON }, { name = "combat", type = COMBAT_DEATHDAMAGE, interval = 2 * 1000, chance = 15, minDamage = -330, maxDamage = -370, target = true, range = 5, radius = 1, shootEffect = CONST_ANI_LARGEROCK, effect = CONST_ME_MORTAREA }, - { name = "combat", type = COMBAT_DEATHDAMAGE, interval = 2 * 1000, chance = 13, minDamage = -225, maxDamage = -275, length = 3, spread = 1, effect = CONST_ME_MORTAREA }, + { name = "combat", type = COMBAT_DEATHDAMAGE, interval = 2 * 1000, chance = 13, minDamage = -225, maxDamage = -275, length = 3, spread = 0, effect = CONST_ME_MORTAREA }, } monster.defenses = { diff --git a/data-otservbr-global/monster/lycanthropes/werehyaena_shaman.lua b/data-otservbr-global/monster/lycanthropes/werehyaena_shaman.lua index 6cb0c872167..184a4c56e05 100644 --- a/data-otservbr-global/monster/lycanthropes/werehyaena_shaman.lua +++ b/data-otservbr-global/monster/lycanthropes/werehyaena_shaman.lua @@ -96,7 +96,7 @@ monster.attacks = { { name = "combat", type = COMBAT_DEATHDAMAGE, interval = 2 * 1000, chance = 10, minDamage = -280, maxDamage = -325, radius = 3, effect = CONST_ME_HITBYPOISON }, { name = "combat", type = COMBAT_EARTHDAMAGE, interval = 2 * 1000, chance = 17, minDamage = -280, maxDamage = -315, range = 5, radius = 4, target = true, shootEffect = CONST_ANI_EARTH, effect = CONST_ME_GREEN_RINGS }, { name = "combat", type = COMBAT_DEATHDAMAGE, interval = 2 * 1000, chance = 15, minDamage = -370, maxDamage = -430, range = 5, radius = 1, target = true, shootEffect = CONST_ANI_DEATH, effect = CONST_ME_MORTAREA }, - { name = "combat", type = COMBAT_DEATHDAMAGE, interval = 2 * 1000, chance = 13, minDamage = -280, maxDamage = -325, length = 3, spread = 1, effect = CONST_ME_MORTAREA }, + { name = "combat", type = COMBAT_DEATHDAMAGE, interval = 2 * 1000, chance = 13, minDamage = -280, maxDamage = -325, length = 3, spread = 0, effect = CONST_ME_MORTAREA }, } monster.defenses = { diff --git a/data-otservbr-global/monster/lycanthropes/werelioness.lua b/data-otservbr-global/monster/lycanthropes/werelioness.lua index 302ecc81a61..d7cf7fac4a2 100644 --- a/data-otservbr-global/monster/lycanthropes/werelioness.lua +++ b/data-otservbr-global/monster/lycanthropes/werelioness.lua @@ -96,7 +96,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -300 }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_HOLYDAMAGE, minDamage = -300, maxDamage = -410, range = 3, effect = CONST_ME_HOLYAREA, target = true }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_HOLYDAMAGE, minDamage = -170, maxDamage = -350, range = 3, shootEffect = CONST_ANI_HOLY, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -250, maxDamage = -300, length = 4, spread = 1, effect = CONST_ME_FIREAREA, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -250, maxDamage = -300, length = 4, spread = 0, effect = CONST_ME_FIREAREA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/magicals/bashmu.lua b/data-otservbr-global/monster/magicals/bashmu.lua index 04c27209288..31be5b2a61d 100644 --- a/data-otservbr-global/monster/magicals/bashmu.lua +++ b/data-otservbr-global/monster/magicals/bashmu.lua @@ -97,7 +97,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -600 }, - { name = "combat", interval = 2000, chance = 50, type = COMBAT_ENERGYDAMAGE, minDamage = -400, maxDamage = -800, length = 4, spread = 1, effect = CONST_ME_ENERGYAREA, target = false }, + { name = "combat", interval = 2000, chance = 50, type = COMBAT_ENERGYDAMAGE, minDamage = -400, maxDamage = -800, length = 4, spread = 0, effect = CONST_ME_ENERGYAREA, target = false }, { name = "combat", interval = 2000, chance = 40, type = COMBAT_ENERGYDAMAGE, minDamage = -400, maxDamage = -500, range = 3, radius = 3, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -400, maxDamage = -800, range = 7, shootEffect = CONST_ANI_EARTHARROW, target = true }, } diff --git a/data-otservbr-global/monster/magicals/burning_book.lua b/data-otservbr-global/monster/magicals/burning_book.lua index 2edca67ee46..f12bbab7a25 100644 --- a/data-otservbr-global/monster/magicals/burning_book.lua +++ b/data-otservbr-global/monster/magicals/burning_book.lua @@ -94,7 +94,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -200, maxDamage = -700 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -500, maxDamage = -780, range = 7, shootEffect = CONST_ANI_FLAMMINGARROW, effect = CONST_ME_HITBYFIRE, target = false }, { name = "combat", interval = 1500, chance = 12, type = COMBAT_PHYSICALDAMAGE, minDamage = -500, maxDamage = -900, radius = 3, effect = CONST_ME_EXPLOSIONAREA, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -400, maxDamage = -850, length = 5, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -400, maxDamage = -850, length = 5, spread = 0, effect = CONST_ME_MAGIC_RED, target = false }, { name = "combat", interval = 2000, chance = 12, type = COMBAT_FIREDAMAGE, minDamage = -400, maxDamage = -775, radius = 3, effect = CONST_ME_HITBYFIRE, target = false }, } diff --git a/data-otservbr-global/monster/magicals/choking_fear.lua b/data-otservbr-global/monster/magicals/choking_fear.lua index 9b0ddc1f49b..16361bab0e9 100644 --- a/data-otservbr-global/monster/magicals/choking_fear.lua +++ b/data-otservbr-global/monster/magicals/choking_fear.lua @@ -107,7 +107,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -499, condition = { type = CONDITION_POISON, totalDamage = 600, interval = 4000 } }, -- poison - { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -700, maxDamage = -900, length = 5, spread = 1, effect = CONST_ME_HITBYPOISON, target = false }, + { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -700, maxDamage = -900, length = 5, spread = 0, effect = CONST_ME_HITBYPOISON, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -300, radius = 1, shootEffect = CONST_ANI_EXPLOSION, effect = CONST_ME_SLEEP, target = true }, { name = "speed", interval = 2000, chance = 20, speedChange = -800, radius = 1, shootEffect = CONST_ANI_EXPLOSION, effect = CONST_ME_SLEEP, target = true, duration = 15000 }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -130, maxDamage = -300, radius = 4, effect = CONST_ME_SOUND_RED, target = false }, diff --git a/data-otservbr-global/monster/magicals/crypt_warden.lua b/data-otservbr-global/monster/magicals/crypt_warden.lua index b5b319728ab..e5a2db7ec77 100644 --- a/data-otservbr-global/monster/magicals/crypt_warden.lua +++ b/data-otservbr-global/monster/magicals/crypt_warden.lua @@ -95,7 +95,7 @@ monster.attacks = { { name = "warden x", interval = 2000, chance = 15, minDamage = -250, maxDamage = -430, target = false }, { name = "warden ring", interval = 2000, chance = 8, minDamage = -250, maxDamage = -380, target = false }, { name = "combat", interval = 2000, chance = 12, type = COMBAT_EARTHDAMAGE, minDamage = -200, maxDamage = -480, radius = 2, effect = CONST_ME_GROUNDSHAKER, target = false }, - { name = "combat", interval = 2000, chance = 13, type = COMBAT_HOLYDAMAGE, minDamage = -300, maxDamage = -450, length = 5, spread = 1, effect = CONST_ME_HOLYAREA, target = false }, + { name = "combat", interval = 2000, chance = 13, type = COMBAT_HOLYDAMAGE, minDamage = -300, maxDamage = -450, length = 5, spread = 0, effect = CONST_ME_HOLYAREA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/magicals/cursed_book.lua b/data-otservbr-global/monster/magicals/cursed_book.lua index f9a517b03a2..329a841b7ba 100644 --- a/data-otservbr-global/monster/magicals/cursed_book.lua +++ b/data-otservbr-global/monster/magicals/cursed_book.lua @@ -95,7 +95,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -400, maxDamage = -680, range = 7, shootEffect = CONST_ANI_EARTHARROW, target = false }, - { name = "combat", interval = 1000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -400, maxDamage = -575, length = 5, spread = 1, effect = CONST_ME_POISONAREA, target = false }, + { name = "combat", interval = 1000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -400, maxDamage = -575, length = 5, spread = 0, effect = CONST_ME_POISONAREA, target = false }, { name = "combat", interval = 1000, chance = 12, type = COMBAT_PHYSICALDAMAGE, minDamage = -230, maxDamage = -880, range = 7, radius = 3, effect = CONST_ME_GROUNDSHAKER, target = false }, } diff --git a/data-otservbr-global/monster/magicals/energetic_book.lua b/data-otservbr-global/monster/magicals/energetic_book.lua index 782bb395081..70270f968cf 100644 --- a/data-otservbr-global/monster/magicals/energetic_book.lua +++ b/data-otservbr-global/monster/magicals/energetic_book.lua @@ -96,7 +96,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -200 }, { name = "combat", interval = 2000, chance = 14, type = COMBAT_ENERGYDAMAGE, minDamage = -200, maxDamage = -680, range = 7, shootEffect = CONST_ANI_ENERGY, target = false }, { name = "combat", interval = 2000, chance = 40, type = COMBAT_ENERGYDAMAGE, minDamage = -200, maxDamage = -505, radius = 3, effect = CONST_ME_ENERGYAREA, target = false }, - { name = "combat", interval = 1500, chance = 30, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -700, length = 8, spread = 1, effect = CONST_ME_STUN, target = false }, + { name = "combat", interval = 1500, chance = 30, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -700, length = 8, spread = 0, effect = CONST_ME_STUN, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/magicals/feral_sphinx.lua b/data-otservbr-global/monster/magicals/feral_sphinx.lua index 8f64bea4816..481057d5654 100644 --- a/data-otservbr-global/monster/magicals/feral_sphinx.lua +++ b/data-otservbr-global/monster/magicals/feral_sphinx.lua @@ -89,7 +89,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -450 }, - { name = "fire wave", interval = 2000, chance = 15, minDamage = -350, maxDamage = -500, length = 1, spread = 1, target = true }, + { name = "fire wave", interval = 2000, chance = 15, minDamage = -350, maxDamage = -500, length = 1, spread = 1, effect = CONST_ME_FIREAREA, target = true }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -500, radius = 4, effect = CONST_ME_ENERGYAREA, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -350, maxDamage = -550, range = 1, shootEffect = CONST_ANI_FIRE, target = false }, { name = "combat", interval = 2000, chance = 18, type = COMBAT_HOLYDAMAGE, minDamage = -400, maxDamage = -580, length = 6, spread = 3, effect = CONST_ME_HOLYAREA, target = false }, diff --git a/data-otservbr-global/monster/magicals/feversleep.lua b/data-otservbr-global/monster/magicals/feversleep.lua index 4da09ad0943..dae681d08d6 100644 --- a/data-otservbr-global/monster/magicals/feversleep.lua +++ b/data-otservbr-global/monster/magicals/feversleep.lua @@ -97,7 +97,7 @@ monster.attacks = { { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 20, minDamage = -800, maxDamage = -1000, radius = 7, effect = CONST_ME_YELLOW_RINGS, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -70, maxDamage = -100, radius = 5, effect = CONST_ME_MAGIC_RED, target = false }, { name = "feversleep skill reducer", interval = 2000, chance = 10, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -250, maxDamage = -300, length = 6, spread = 1, effect = CONST_ME_YELLOWENERGY, target = true }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -250, maxDamage = -300, length = 6, spread = 0, effect = CONST_ME_YELLOWENERGY, target = true }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_DEATHDAMAGE, minDamage = -150, maxDamage = -300, radius = 1, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = true }, } diff --git a/data-otservbr-global/monster/magicals/frazzlemaw.lua b/data-otservbr-global/monster/magicals/frazzlemaw.lua index d2a4334a0fb..09df1f13008 100644 --- a/data-otservbr-global/monster/magicals/frazzlemaw.lua +++ b/data-otservbr-global/monster/magicals/frazzlemaw.lua @@ -118,8 +118,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400 }, -- bleed - { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 10, minDamage = -300, maxDamage = -400, radius = 3, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -700, length = 5, spread = 1, effect = CONST_ME_EXPLOSIONAREA, target = false }, + { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 10, minDamage = -300, maxDamage = -400, radius = 3, effect = CONST_ME_DRAWBLOOD, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -700, length = 5, spread = 0, effect = CONST_ME_EXPLOSIONAREA, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -400, radius = 2, shootEffect = CONST_ANI_LARGEROCK, effect = CONST_ME_STONES, target = true }, { name = "speed", interval = 2000, chance = 15, speedChange = -600, radius = 5, effect = CONST_ME_MAGIC_RED, target = false, duration = 15000 }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -80, maxDamage = -150, radius = 4, effect = CONST_ME_MAGIC_RED, target = false }, diff --git a/data-otservbr-global/monster/magicals/gryphon.lua b/data-otservbr-global/monster/magicals/gryphon.lua index 77830131175..39e919e600f 100644 --- a/data-otservbr-global/monster/magicals/gryphon.lua +++ b/data-otservbr-global/monster/magicals/gryphon.lua @@ -77,7 +77,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = 350 }, { name = "combat", interval = 2000, chance = 13, type = COMBAT_HOLYDAMAGE, minDamage = -250, maxDamage = -450, radius = 3, effect = CONST_ME_HOLYAREA, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -200, maxDamage = -300, length = 3, spread = 1, effect = CONST_ME_HITBYFIRE, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -200, maxDamage = -300, length = 3, spread = 0, effect = CONST_ME_HITBYFIRE, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/magicals/guardian_of_tales.lua b/data-otservbr-global/monster/magicals/guardian_of_tales.lua index 25c8556a77e..01ee4a29711 100644 --- a/data-otservbr-global/monster/magicals/guardian_of_tales.lua +++ b/data-otservbr-global/monster/magicals/guardian_of_tales.lua @@ -92,7 +92,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -200, maxDamage = -550 }, { name = "combat", interval = 2000, chance = 13, type = COMBAT_ENERGYDAMAGE, minDamage = -200, maxDamage = -605, radius = 3, effect = CONST_ME_ENERGYAREA, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -375, maxDamage = -500, length = 5, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -375, maxDamage = -500, length = 5, spread = 0, effect = CONST_ME_MAGIC_RED, target = false }, { name = "combat", interval = 2000, chance = 12, type = COMBAT_FIREDAMAGE, minDamage = -400, maxDamage = -775, radius = 3, effect = CONST_ME_HITBYFIRE, target = false }, } diff --git a/data-otservbr-global/monster/magicals/guzzlemaw.lua b/data-otservbr-global/monster/magicals/guzzlemaw.lua index 9941e56d161..d402a6921da 100644 --- a/data-otservbr-global/monster/magicals/guzzlemaw.lua +++ b/data-otservbr-global/monster/magicals/guzzlemaw.lua @@ -110,11 +110,11 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -499 }, -- bleed - { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 10, minDamage = -500, maxDamage = -1000, radius = 3, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -900, length = 8, spread = 1, effect = CONST_ME_EXPLOSIONAREA, target = false }, + { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 10, minDamage = -500, maxDamage = -1000, radius = 3, effect = CONST_ME_DRAWBLOOD, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -900, length = 8, spread = 0, effect = CONST_ME_EXPLOSIONAREA, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -500, radius = 2, shootEffect = CONST_ANI_LARGEROCK, effect = CONST_ME_STONES, target = true }, { name = "speed", interval = 2000, chance = 15, speedChange = -800, radius = 6, effect = CONST_ME_MAGIC_RED, target = false, duration = 15000 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -800, length = 8, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -800, length = 8, spread = 0, effect = CONST_ME_MAGIC_RED, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/magicals/icecold_book.lua b/data-otservbr-global/monster/magicals/icecold_book.lua index e3acf422ef6..42c058a8a43 100644 --- a/data-otservbr-global/monster/magicals/icecold_book.lua +++ b/data-otservbr-global/monster/magicals/icecold_book.lua @@ -100,7 +100,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 10, type = COMBAT_ICEDAMAGE, minDamage = -700, maxDamage = -850, range = 7, shootEffect = CONST_ANI_SMALLICE, effect = CONST_ME_ICEATTACK, target = false }, { name = "combat", interval = 1000, chance = 10, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -380, range = 7, shootEffect = CONST_ANI_SMALLICE, effect = CONST_ME_ICEATTACK, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_ICEDAMAGE, minDamage = -350, maxDamage = -980, length = 5, spread = 1, shootEffect = CONST_ANI_SMALLICE, effect = CONST_ME_ICEATTACK, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_ICEDAMAGE, minDamage = -350, maxDamage = -980, length = 5, spread = 0, shootEffect = CONST_ANI_SMALLICE, effect = CONST_ME_ICEATTACK, target = false }, { name = "combat", interval = 1000, chance = 12, type = COMBAT_ICEDAMAGE, minDamage = -230, maxDamage = -880, range = 7, radius = 3, shootEffect = CONST_ANI_SMALLICE, effect = CONST_ME_ICETORNADO, target = false }, } diff --git a/data-otservbr-global/monster/magicals/juvenile_bashmu.lua b/data-otservbr-global/monster/magicals/juvenile_bashmu.lua index fa1e7f881f4..fe7bb499bb0 100644 --- a/data-otservbr-global/monster/magicals/juvenile_bashmu.lua +++ b/data-otservbr-global/monster/magicals/juvenile_bashmu.lua @@ -99,7 +99,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400 }, - { name = "combat", interval = 2000, chance = 50, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -400, length = 4, spread = 1, effect = CONST_ME_ENERGYAREA, target = false }, + { name = "combat", interval = 2000, chance = 50, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -400, length = 4, spread = 0, effect = CONST_ME_ENERGYAREA, target = false }, { name = "combat", interval = 2000, chance = 40, type = COMBAT_ENERGYDAMAGE, minDamage = -400, maxDamage = -500, range = 3, radius = 3, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -400, maxDamage = -500, range = 7, shootEffect = CONST_ANI_EARTHARROW, target = true }, } diff --git a/data-otservbr-global/monster/magicals/medusa.lua b/data-otservbr-global/monster/magicals/medusa.lua index de4bf5139d2..e945b600fd0 100644 --- a/data-otservbr-global/monster/magicals/medusa.lua +++ b/data-otservbr-global/monster/magicals/medusa.lua @@ -99,7 +99,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -450, condition = { type = CONDITION_POISON, totalDamage = 840, interval = 4000 } }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -21, maxDamage = -350, range = 7, shootEffect = CONST_ANI_EARTH, effect = CONST_ME_CARNIPHILA, target = true }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -250, maxDamage = -500, length = 8, spread = 1, effect = CONST_ME_CARNIPHILA, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -250, maxDamage = -500, length = 8, spread = 0, effect = CONST_ME_CARNIPHILA, target = false }, { name = "speed", interval = 2000, chance = 25, radius = 7, effect = CONST_ME_POFF, target = true }, { name = "outfit", interval = 2000, chance = 1, range = 7, target = true, duration = 3000, outfitMonster = "clay guardian" }, } diff --git a/data-otservbr-global/monster/magicals/menacing_carnivor.lua b/data-otservbr-global/monster/magicals/menacing_carnivor.lua index 6ff42fe9202..fa314084b33 100644 --- a/data-otservbr-global/monster/magicals/menacing_carnivor.lua +++ b/data-otservbr-global/monster/magicals/menacing_carnivor.lua @@ -102,8 +102,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -300, maxDamage = -450 }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -180, length = 4, spread = 1, effect = CONST_ME_SMOKE, target = false }, - { name = "combat", interval = 2000, chance = 14, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -200, length = 4, spread = 1, effect = CONST_ME_POISONAREA, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -180, length = 4, spread = 0, effect = CONST_ME_SMOKE, target = false }, + { name = "combat", interval = 2000, chance = 14, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -200, length = 4, spread = 0, effect = CONST_ME_POISONAREA, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -150, maxDamage = -330, radius = 4, effect = CONST_ME_GROUNDSHAKER, target = false }, } diff --git a/data-otservbr-global/monster/magicals/rage_squid.lua b/data-otservbr-global/monster/magicals/rage_squid.lua index ae28f557d1e..0bbd087da45 100644 --- a/data-otservbr-global/monster/magicals/rage_squid.lua +++ b/data-otservbr-global/monster/magicals/rage_squid.lua @@ -107,7 +107,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -500 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -200, maxDamage = -280, range = 7, shootEffect = CONST_ANI_FLAMMINGARROW, effect = CONST_ME_HITBYFIRE, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -200, maxDamage = -380, range = 7, shootEffect = CONST_ANI_FIRE, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -175, maxDamage = -200, length = 5, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -175, maxDamage = -200, length = 5, spread = 0, effect = CONST_ME_MAGIC_RED, target = false }, { name = "combat", interval = 2000, chance = 12, type = COMBAT_FIREDAMAGE, minDamage = -200, maxDamage = -475, radius = 3, effect = CONST_ME_HITBYFIRE, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -200, maxDamage = -475, radius = 2, effect = CONST_ME_FIREAREA, target = false }, } diff --git a/data-otservbr-global/monster/magicals/retching_horror.lua b/data-otservbr-global/monster/magicals/retching_horror.lua index 696c7cfa8b9..a6814343eaf 100644 --- a/data-otservbr-global/monster/magicals/retching_horror.lua +++ b/data-otservbr-global/monster/magicals/retching_horror.lua @@ -99,7 +99,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400 }, - { name = "drunk", interval = 2000, chance = 10, length = 4, spread = 1, effect = CONST_ME_MAGIC_GREEN, target = true, duration = 5000 }, + { name = "drunk", interval = 2000, chance = 10, length = 4, spread = 0, effect = CONST_ME_MAGIC_GREEN, target = true, duration = 5000 }, { name = "speed", interval = 2000, chance = 15, speedChange = -700, radius = 4, shootEffect = CONST_ANI_WHIRLWINDCLUB, effect = CONST_ME_STUN, target = true, duration = 15000 }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -110, radius = 4, effect = CONST_ME_HITAREA, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -200, radius = 1, shootEffect = CONST_ANI_SNIPERARROW, target = true }, diff --git a/data-otservbr-global/monster/magicals/shiversleep.lua b/data-otservbr-global/monster/magicals/shiversleep.lua index da35f00b265..c81c741eddc 100644 --- a/data-otservbr-global/monster/magicals/shiversleep.lua +++ b/data-otservbr-global/monster/magicals/shiversleep.lua @@ -66,7 +66,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -450 }, - { name = "combat", interval = 1800, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -685, length = 7, spread = 1, effect = CONST_ME_STONES, target = false }, + { name = "combat", interval = 1800, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -685, length = 7, spread = 0, effect = CONST_ME_STONES, target = false }, { name = "combat", interval = 2000, chance = 9, type = COMBAT_EARTHDAMAGE, minDamage = -250, maxDamage = -590, radius = 6, effect = CONST_ME_BIGPLANTS, target = false }, } diff --git a/data-otservbr-global/monster/magicals/shock_head.lua b/data-otservbr-global/monster/magicals/shock_head.lua index b211f9fb9b9..22c1e30890e 100644 --- a/data-otservbr-global/monster/magicals/shock_head.lua +++ b/data-otservbr-global/monster/magicals/shock_head.lua @@ -86,7 +86,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -798 }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_DEATHDAMAGE, minDamage = -200, maxDamage = -300, length = 5, spread = 2, effect = CONST_ME_BLACKSMOKE, target = false }, - { name = "speed", interval = 2000, chance = 15, speedChange = -800, length = 8, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false, duration = 7500 }, + { name = "speed", interval = 2000, chance = 15, speedChange = -800, length = 8, spread = 0, effect = CONST_ME_PURPLEENERGY, target = false, duration = 7500 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -350, radius = 4, shootEffect = CONST_ANI_EARTH, effect = CONST_ME_STONES, target = true }, { name = "shock head skill reducer 1", interval = 2000, chance = 5, range = 5, target = false }, { name = "shock head skill reducer 2", interval = 2000, chance = 5, target = false }, diff --git a/data-otservbr-global/monster/magicals/sight_of_surrender.lua b/data-otservbr-global/monster/magicals/sight_of_surrender.lua index f225c132200..d98c86153b5 100644 --- a/data-otservbr-global/monster/magicals/sight_of_surrender.lua +++ b/data-otservbr-global/monster/magicals/sight_of_surrender.lua @@ -110,7 +110,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -1100 }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -500, maxDamage = -800, length = 8, spread = 1, effect = CONST_ME_YELLOWENERGY, target = true }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -500, maxDamage = -800, length = 8, spread = 0, effect = CONST_ME_YELLOWENERGY, target = true }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -500, radius = 1, shootEffect = CONST_ANI_LARGEROCK, target = true }, } diff --git a/data-otservbr-global/monster/magicals/sphinx.lua b/data-otservbr-global/monster/magicals/sphinx.lua index 3e65180f75a..2ca6c8f4dba 100644 --- a/data-otservbr-global/monster/magicals/sphinx.lua +++ b/data-otservbr-global/monster/magicals/sphinx.lua @@ -91,7 +91,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400 }, - { name = "combat", interval = 2000, chance = 30, type = COMBAT_FIREDAMAGE, minDamage = -200, maxDamage = -500, length = 6, spread = 1, effect = CONST_ME_FIREAREA, target = false }, + { name = "combat", interval = 2000, chance = 30, type = COMBAT_FIREDAMAGE, minDamage = -200, maxDamage = -500, length = 6, spread = 0, effect = CONST_ME_FIREAREA, target = false }, { name = "combat", interval = 2000, chance = 35, type = COMBAT_HOLYDAMAGE, minDamage = -100, maxDamage = -350, range = 5, radius = 3, shootEffect = CONST_ANI_SMALLHOLY, effect = CONST_ME_HOLYAREA, target = true }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -200, maxDamage = -400, radius = 3, effect = CONST_ME_ENERGYAREA, target = false }, } diff --git a/data-otservbr-global/monster/magicals/terrorsleep.lua b/data-otservbr-global/monster/magicals/terrorsleep.lua index 0fef7bc832e..531081d1cdd 100644 --- a/data-otservbr-global/monster/magicals/terrorsleep.lua +++ b/data-otservbr-global/monster/magicals/terrorsleep.lua @@ -106,7 +106,7 @@ monster.attacks = { { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 20, minDamage = -1000, maxDamage = -1500, radius = 7, effect = CONST_ME_YELLOW_RINGS, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -100, maxDamage = -300, radius = 5, effect = CONST_ME_MAGIC_RED, target = false }, { name = "feversleep skill reducer", interval = 2000, chance = 10, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -350, maxDamage = -500, length = 6, spread = 1, effect = CONST_ME_YELLOWENERGY, target = true }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -350, maxDamage = -500, length = 6, spread = 0, effect = CONST_ME_YELLOWENERGY, target = true }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -200, maxDamage = -450, radius = 1, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = true }, } diff --git a/data-otservbr-global/monster/magicals/thanatursus.lua b/data-otservbr-global/monster/magicals/thanatursus.lua index 80d21c1c2cc..eb4217bc4cb 100644 --- a/data-otservbr-global/monster/magicals/thanatursus.lua +++ b/data-otservbr-global/monster/magicals/thanatursus.lua @@ -103,7 +103,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -200, maxDamage = -450 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_HOLYDAMAGE, minDamage = -250, maxDamage = -400, radius = 3, effect = CONST_ME_HOLYAREA, target = true }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -280, maxDamage = -450, length = 4, spread = 1, effect = CONST_ME_ENERGYAREA, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -280, maxDamage = -450, length = 4, spread = 0, effect = CONST_ME_ENERGYAREA, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -250, maxDamage = -400, radius = 6, effect = CONST_ME_BLOCKHIT, target = true }, } diff --git a/data-otservbr-global/monster/magicals/venerable_girtablilu.lua b/data-otservbr-global/monster/magicals/venerable_girtablilu.lua index 0b50c26edb9..00da4d9320d 100644 --- a/data-otservbr-global/monster/magicals/venerable_girtablilu.lua +++ b/data-otservbr-global/monster/magicals/venerable_girtablilu.lua @@ -103,7 +103,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -550, effect = CONST_ME_DRAWBLOOD }, { name = "combat", interval = 2750, chance = 30, type = COMBAT_DEATHDAMAGE, minDamage = -200, maxDamage = -500, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = true }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -200, maxDamage = -400, length = 4, spread = 1, effect = CONST_ME_HITBYPOISON, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -200, maxDamage = -400, length = 4, spread = 0, effect = CONST_ME_HITBYPOISON, target = false }, { name = "combat", interval = 2000, chance = 40, type = COMBAT_EARTHDAMAGE, minDamage = -200, maxDamage = -400, radius = 3, effect = CONST_ME_HITBYPOISON, target = false }, { name = "girtablilu poison wave", interval = 2000, chance = 30, minDamage = -200, maxDamage = -400 }, } diff --git a/data-otservbr-global/monster/magicals/weakened_frazzlemaw.lua b/data-otservbr-global/monster/magicals/weakened_frazzlemaw.lua index 4cdeb53b528..b496e017346 100644 --- a/data-otservbr-global/monster/magicals/weakened_frazzlemaw.lua +++ b/data-otservbr-global/monster/magicals/weakened_frazzlemaw.lua @@ -107,8 +107,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 90, attack = 80 }, -- bleed - { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 10, minDamage = -80, maxDamage = -200, radius = 3, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -200, length = 5, spread = 1, effect = CONST_ME_EXPLOSIONAREA, target = false }, + { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 10, minDamage = -80, maxDamage = -200, radius = 3, effect = CONST_ME_DRAWBLOOD, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -200, length = 5, spread = 0, effect = CONST_ME_EXPLOSIONAREA, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -100, radius = 2, shootEffect = CONST_ANI_LARGEROCK, effect = CONST_ME_STONES, target = true }, { name = "speed", interval = 2000, chance = 15, speedChange = -600, radius = 5, effect = CONST_ME_MAGIC_RED, target = false, duration = 15000 }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -80, maxDamage = -50, radius = 4, effect = CONST_ME_MAGIC_RED, target = false }, diff --git a/data-otservbr-global/monster/mammals/doom_deer.lua b/data-otservbr-global/monster/mammals/doom_deer.lua index 7ba33d128c6..126f18cdac4 100644 --- a/data-otservbr-global/monster/mammals/doom_deer.lua +++ b/data-otservbr-global/monster/mammals/doom_deer.lua @@ -79,7 +79,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -100 }, - { name = "combat", interval = 4000, chance = 30, type = COMBAT_ENERGYDAMAGE, minDamage = -35, maxDamage = -55, length = 5, spread = 1, effect = CONST_ME_BIGCLOUDS, target = false }, + { name = "combat", interval = 4000, chance = 30, type = COMBAT_ENERGYDAMAGE, minDamage = -35, maxDamage = -55, length = 5, spread = 0, effect = CONST_ME_BIGCLOUDS, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/mammals/gore_horn.lua b/data-otservbr-global/monster/mammals/gore_horn.lua index 708f327934f..37ca6c70b2b 100644 --- a/data-otservbr-global/monster/mammals/gore_horn.lua +++ b/data-otservbr-global/monster/mammals/gore_horn.lua @@ -87,7 +87,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -1000 }, - { name = "combat", interval = 3500, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -450, maxDamage = -750, length = 7, spread = 1, effect = CONST_ME_ENERGYAREA, target = false }, + { name = "combat", interval = 3500, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -450, maxDamage = -750, length = 7, spread = 0, effect = CONST_ME_ENERGYAREA, target = false }, { name = "combat", interval = 4100, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -500, maxDamage = -900, radius = 7, effect = CONST_ME_EXPLOSIONAREA, target = false }, { name = "combat", interval = 2700, chance = 35, type = COMBAT_ENERGYDAMAGE, minDamage = -500, maxDamage = -850, range = 1, shootEffect = CONST_ANI_ENERGY, target = true }, { name = "root", interval = 2000, chance = 1, target = true }, diff --git a/data-otservbr-global/monster/mammals/vulcongra.lua b/data-otservbr-global/monster/mammals/vulcongra.lua index 90674dbef96..3c728dd8da6 100644 --- a/data-otservbr-global/monster/mammals/vulcongra.lua +++ b/data-otservbr-global/monster/mammals/vulcongra.lua @@ -100,7 +100,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -235 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -195, maxDamage = -340, length = 8, spread = 1, effect = CONST_ME_EXPLOSIONHIT, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -195, maxDamage = -340, length = 8, spread = 0, effect = CONST_ME_EXPLOSIONHIT, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -200, range = 7, shootEffect = CONST_ANI_FIRE, target = true }, { name = "vulcongra soulfire", interval = 3000, chance = 100, target = false }, } diff --git a/data-otservbr-global/monster/mammals/yeti.lua b/data-otservbr-global/monster/mammals/yeti.lua index 853dfa5a140..7ef601194dc 100644 --- a/data-otservbr-global/monster/mammals/yeti.lua +++ b/data-otservbr-global/monster/mammals/yeti.lua @@ -87,7 +87,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/plants/haunted_treeling.lua b/data-otservbr-global/monster/plants/haunted_treeling.lua index b419db0400c..c8b13f61553 100644 --- a/data-otservbr-global/monster/plants/haunted_treeling.lua +++ b/data-otservbr-global/monster/plants/haunted_treeling.lua @@ -96,7 +96,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -150 }, { name = "combat", interval = 2000, chance = 5, type = COMBAT_MANADRAIN, minDamage = -30, maxDamage = -100, radius = 4, effect = CONST_ME_GREEN_RINGS, target = false }, - { name = "speed", interval = 2000, chance = 15, speedChange = -700, length = 5, spread = 1, effect = CONST_ME_SMALLPLANTS, target = false, duration = 15000 }, + { name = "speed", interval = 2000, chance = 15, speedChange = -700, length = 5, spread = 0, effect = CONST_ME_SMALLPLANTS, target = false, duration = 15000 }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -100, range = 7, radius = 1, shootEffect = CONST_ANI_SMALLEARTH, effect = CONST_ME_CARNIPHILA, target = true }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -55, maxDamage = -100, radius = 4, effect = CONST_ME_HITBYPOISON, target = true }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, radius = 1, effect = CONST_ME_POISONAREA, target = false }, diff --git a/data-otservbr-global/monster/plants/hideous_fungus.lua b/data-otservbr-global/monster/plants/hideous_fungus.lua index 5fdb550063c..a80ba080fd7 100644 --- a/data-otservbr-global/monster/plants/hideous_fungus.lua +++ b/data-otservbr-global/monster/plants/hideous_fungus.lua @@ -109,7 +109,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -450 }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -250, maxDamage = -430, range = 7, shootEffect = CONST_ANI_SMALLEARTH, effect = CONST_ME_SMALLPLANTS, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_ICEDAMAGE, minDamage = -250, maxDamage = -550, length = 8, spread = 1, shootEffect = CONST_ANI_SNOWBALL, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_ICEDAMAGE, minDamage = -250, maxDamage = -550, length = 8, spread = 0, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_ICEAREA, target = false }, { name = "speed", interval = 2000, chance = 10, speedChange = -600, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 60000 }, { name = "drunk", interval = 2000, chance = 10, range = 7, radius = 5, shootEffect = CONST_ANI_SMALLSTONE, effect = CONST_ME_STUN, target = true, duration = 4000 }, -- poison diff --git a/data-otservbr-global/monster/plants/humongous_fungus.lua b/data-otservbr-global/monster/plants/humongous_fungus.lua index ab29138715f..942684e732c 100644 --- a/data-otservbr-global/monster/plants/humongous_fungus.lua +++ b/data-otservbr-global/monster/plants/humongous_fungus.lua @@ -106,8 +106,8 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -180, maxDamage = -350, range = 7, shootEffect = CONST_ANI_SMALLEARTH, effect = CONST_ME_SMALLPLANTS, target = false }, { name = "poisonfield", interval = 2000, chance = 20, radius = 4, target = false }, -- poison - { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -500, maxDamage = -1000, length = 8, spread = 1, effect = CONST_ME_GREEN_RINGS, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -130, maxDamage = -260, length = 5, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -500, maxDamage = -1000, length = 8, spread = 0, effect = CONST_ME_GREEN_RINGS, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -130, maxDamage = -260, length = 5, spread = 0, effect = CONST_ME_MAGIC_RED, target = false }, -- poison { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -400, maxDamage = -640, range = 7, radius = 3, effect = CONST_ME_HITBYPOISON, target = false }, } diff --git a/data-otservbr-global/monster/plants/omnivora.lua b/data-otservbr-global/monster/plants/omnivora.lua index 26ac8ea4d9d..0136d014a19 100644 --- a/data-otservbr-global/monster/plants/omnivora.lua +++ b/data-otservbr-global/monster/plants/omnivora.lua @@ -96,7 +96,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -150 }, { name = "speed", interval = 4000, chance = 20, speedChange = -350, range = 7, shootEffect = CONST_ANI_POISON, target = true, duration = 12000 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -80, maxDamage = -100, range = 7, shootEffect = CONST_ANI_POISON, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -50, maxDamage = -100, length = 8, spread = 1, effect = CONST_ME_POISONAREA, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -50, maxDamage = -100, length = 8, spread = 0, effect = CONST_ME_POISONAREA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/a_pirates_tail_quest/ratmiral_blackwhiskers.lua b/data-otservbr-global/monster/quests/a_pirates_tail_quest/ratmiral_blackwhiskers.lua index 98e510bb9b4..d399413ed93 100644 --- a/data-otservbr-global/monster/quests/a_pirates_tail_quest/ratmiral_blackwhiskers.lua +++ b/data-otservbr-global/monster/quests/a_pirates_tail_quest/ratmiral_blackwhiskers.lua @@ -113,7 +113,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -270, maxDamage = -500 }, { name = "combat", interval = 2000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -300, maxDamage = -600, range = 7, shootEffect = CONST_ANI_WHIRLWINDCLUB, target = true }, { name = "combat", interval = 2000, chance = 40, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -600, radius = 4, effect = CONST_ME_MAGIC_RED, target = false }, - { name = "combat", interval = 2000, chance = 30, type = COMBAT_LIFEDRAIN, minDamage = -600, maxDamage = -1000, length = 4, spread = 1, effect = CONST_ME_SOUND_PURPLE, target = false }, + { name = "combat", interval = 2000, chance = 30, type = COMBAT_LIFEDRAIN, minDamage = -600, maxDamage = -1000, length = 4, spread = 0, effect = CONST_ME_SOUND_PURPLE, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/ancient_feud/yirkas_blue_scales.lua b/data-otservbr-global/monster/quests/ancient_feud/yirkas_blue_scales.lua index 588610e04c0..e469fa36986 100644 --- a/data-otservbr-global/monster/quests/ancient_feud/yirkas_blue_scales.lua +++ b/data-otservbr-global/monster/quests/ancient_feud/yirkas_blue_scales.lua @@ -96,7 +96,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -100, condition = { type = CONDITION_POISON, totalDamage = 15, interval = 4000 } }, - { name = "combat", interval = 2000, chance = 30, type = COMBAT_EARTHDAMAGE, minDamage = -400, maxDamage = -500, length = 3, spread = 1, effect = CONST_ME_POISONAREA, target = false }, + { name = "combat", interval = 2000, chance = 30, type = COMBAT_EARTHDAMAGE, minDamage = -400, maxDamage = -500, length = 3, spread = 0, effect = CONST_ME_POISONAREA, target = false }, { name = "combat", interval = 2000, chance = 30, type = COMBAT_ENERGYDAMAGE, minDamage = -250, maxDamage = -350, range = 3, radius = 3, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_ENERGYHIT, target = true }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -400, maxDamage = -500, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_ENERGYAREA, target = true }, { name = "combat", interval = 2000, chance = 30, type = COMBAT_ENERGYDAMAGE, minDamage = -200, maxDamage = -300, radius = 4, effect = CONST_ME_ENERGYAREA, target = false }, diff --git a/data-otservbr-global/monster/quests/ancient_tombs/horestis.lua b/data-otservbr-global/monster/quests/ancient_tombs/horestis.lua index 10a677505e8..1fb41b7b2dc 100644 --- a/data-otservbr-global/monster/quests/ancient_tombs/horestis.lua +++ b/data-otservbr-global/monster/quests/ancient_tombs/horestis.lua @@ -98,7 +98,7 @@ monster.attacks = { { name = "drunk", interval = 3000, chance = 11, radius = 6, effect = CONST_ME_POISONAREA, target = false, duration = 25000 }, { name = "speed", interval = 1000, chance = 25, speedChange = -350, length = 7, spread = 3, effect = CONST_ME_POISONAREA, target = false, duration = 30000 }, -- poison - { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 30, minDamage = -35, maxDamage = -35, radius = 5, target = false }, + { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 30, minDamage = -35, maxDamage = -35, radius = 5, effect = CONST_ME_HITBYPOISON, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/annihilator/angry_demon.lua b/data-otservbr-global/monster/quests/annihilator/angry_demon.lua index 970638924ea..043bd12affe 100644 --- a/data-otservbr-global/monster/quests/annihilator/angry_demon.lua +++ b/data-otservbr-global/monster/quests/annihilator/angry_demon.lua @@ -112,14 +112,14 @@ monster.attacks = { -- {name ="combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = 0, maxDamage = -120, range = 7, target = false}, -- {name ="combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -150, maxDamage = -250, range = 7, radius = 7, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true}, -- {name ="firefield", interval = 2000, chance = 10, range = 7, radius = 1, shootEffect = CONST_ANI_FIRE, target = true}, - -- {name ="combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -490, length = 8,spread = 13, effect = CONST_ME_PURPLEENERGY, target = false}, + -- {name ="combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -490, length = 8,spread = 03, effect = CONST_ME_PURPLEENERGY, target = false}, -- {name ="combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -210, maxDamage = -300, range = 1, shootEffect = CONST_ANI_ENERGY, target = false}, -- {name ="speed", interval = 2000, chance = 15, speedChange = -700, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 30000} { name = "melee", interval = 2000, chance = 500, minDamage = 0, maxDamage = -1940 }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = 0, maxDamage = -150, range = 7, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -650, maxDamage = -900, range = 7, radius = 7, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true }, { name = "firefield", interval = 2000, chance = 10, range = 7, radius = 1, shootEffect = CONST_ANI_FIRE, target = true }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -800, length = 8, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -800, length = 8, spread = 0, effect = CONST_ME_PURPLEENERGY, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -1050, maxDamage = -1500, range = 1, shootEffect = CONST_ANI_ENERGY, target = true }, { name = "speed", interval = 2000, chance = 15, speedChange = -700, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 30000 }, } diff --git a/data-otservbr-global/monster/quests/bigfoots_burden/minion_of_versperoth.lua b/data-otservbr-global/monster/quests/bigfoots_burden/minion_of_versperoth.lua index b047898ea09..bc1cb2539f2 100644 --- a/data-otservbr-global/monster/quests/bigfoots_burden/minion_of_versperoth.lua +++ b/data-otservbr-global/monster/quests/bigfoots_burden/minion_of_versperoth.lua @@ -65,8 +65,8 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -390 }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -350, maxDamage = -700, length = 8, spread = 1, effect = CONST_ME_FIREATTACK, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -600, maxDamage = -1300, length = 8, spread = 1, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -350, maxDamage = -700, length = 8, spread = 0, effect = CONST_ME_FIREATTACK, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -600, maxDamage = -1300, length = 8, spread = 0, effect = CONST_ME_MORTAREA, target = false }, { name = "lava golem soulfire", interval = 2000, chance = 15, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -220, maxDamage = -350, radius = 4, effect = CONST_ME_FIREAREA, target = true }, { name = "speed", interval = 2000, chance = 10, speedChange = -300, length = 5, spread = 3, effect = CONST_ME_BLOCKHIT, target = false, duration = 10000 }, diff --git a/data-otservbr-global/monster/quests/cults_of_tibia/animated_guzzlemaw.lua b/data-otservbr-global/monster/quests/cults_of_tibia/animated_guzzlemaw.lua index c781b4ba290..009f8a83209 100644 --- a/data-otservbr-global/monster/quests/cults_of_tibia/animated_guzzlemaw.lua +++ b/data-otservbr-global/monster/quests/cults_of_tibia/animated_guzzlemaw.lua @@ -96,11 +96,11 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -499 }, -- bleed - { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 10, minDamage = -500, maxDamage = -1000, radius = 3, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -900, length = 8, spread = 1, effect = CONST_ME_EXPLOSIONAREA, target = true }, + { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 10, minDamage = -500, maxDamage = -1000, radius = 3, effect = CONST_ME_DRAWBLOOD, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -900, length = 8, spread = 0, effect = CONST_ME_EXPLOSIONAREA, target = true }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -500, radius = 2, shootEffect = CONST_ANI_LARGEROCK, effect = CONST_ME_STONES, target = true }, { name = "speed", interval = 2000, chance = 15, speedChange = -800, radius = 6, effect = CONST_ME_MAGIC_RED, target = false, duration = 15000 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -800, length = 8, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -800, length = 8, spread = 0, effect = CONST_ME_MAGIC_RED, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/cults_of_tibia/animated_moohtant.lua b/data-otservbr-global/monster/quests/cults_of_tibia/animated_moohtant.lua index 334fd68d2ea..6823e0afed9 100644 --- a/data-otservbr-global/monster/quests/cults_of_tibia/animated_moohtant.lua +++ b/data-otservbr-global/monster/quests/cults_of_tibia/animated_moohtant.lua @@ -85,7 +85,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 110, attack = 50 }, - { name = "combat", interval = 2000, chance = 13, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -230, length = 3, spread = 1, effect = CONST_ME_GROUNDSHAKER, target = false }, + { name = "combat", interval = 2000, chance = 13, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -230, length = 3, spread = 0, effect = CONST_ME_GROUNDSHAKER, target = false }, { name = "combat", interval = 2000, chance = 12, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -200, radius = 3, effect = CONST_ME_GROUNDSHAKER, target = false }, { name = "combat", interval = 2000, chance = 19, type = COMBAT_LIFEDRAIN, minDamage = -50, maxDamage = -225, radius = 5, effect = CONST_ME_MAGIC_RED, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -150, maxDamage = -235, range = 7, radius = 4, shootEffect = CONST_ANI_LARGEROCK, effect = CONST_ME_EXPLOSIONAREA, target = true }, diff --git a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/eliz_the_unyielding.lua b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/eliz_the_unyielding.lua index 41c7815e73c..27e60f9562f 100644 --- a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/eliz_the_unyielding.lua +++ b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/eliz_the_unyielding.lua @@ -76,7 +76,7 @@ monster.defenses = { defense = 50, armor = 35, -- mitigation = ???, - { name = "cults of tibia armor buff", interval = 2000, chance = 40, radius = 8, target = false }, + { name = "cults of tibia armor buff", interval = 2000, chance = 40, radius = 8, effect = CONST_ME_MAGIC_GREEN, target = false }, } monster.elements = { diff --git a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/eliz_the_unyielding_stop.lua b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/eliz_the_unyielding_stop.lua index d740224c443..68fbd743163 100644 --- a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/eliz_the_unyielding_stop.lua +++ b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/eliz_the_unyielding_stop.lua @@ -72,7 +72,7 @@ monster.attacks = { monster.defenses = { defense = 50, armor = 35, - { name = "cults of tibia armor buff", interval = 2000, chance = 40, radius = 9, target = false }, + { name = "cults of tibia armor buff", interval = 2000, chance = 40, radius = 9, effect = CONST_ME_MAGIC_GREEN, target = false }, } monster.elements = { diff --git a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/essence_of_malice.lua b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/essence_of_malice.lua index 5b6a669022d..26aceb32010 100644 --- a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/essence_of_malice.lua +++ b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/essence_of_malice.lua @@ -99,7 +99,7 @@ monster.attacks = { -- poison { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -520, maxDamage = -780, range = 5, effect = CONST_ME_SMALLCLOUDS, target = true }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -80, maxDamage = -230, range = 7, effect = CONST_ME_MAGIC_RED, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -120, maxDamage = -250, length = 8, spread = 1, effect = CONST_ME_LOSEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -120, maxDamage = -250, length = 8, spread = 0, effect = CONST_ME_LOSEENERGY, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_DEATHDAMAGE, minDamage = -110, maxDamage = -180, radius = 4, effect = CONST_ME_MORTAREA, target = false }, { name = "speed", interval = 2000, chance = 20, speedChange = -800, range = 7, effect = CONST_ME_SMALLCLOUDS, target = true, duration = 30000 }, } diff --git a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_armored_voidborn.lua b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_armored_voidborn.lua index d9996962a2f..ca74cf1da8f 100644 --- a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_armored_voidborn.lua +++ b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_armored_voidborn.lua @@ -73,7 +73,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -550 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = 0, maxDamage = -400, length = 7, spread = 5, effect = CONST_ME_SMALLCLOUDS, target = false }, - { name = "combat", interval = 2000, chance = 30, type = COMBAT_ENERGYDAMAGE, minDamage = -250, maxDamage = -440, radius = 5, target = false }, + { name = "combat", interval = 2000, chance = 30, type = COMBAT_ENERGYDAMAGE, minDamage = -250, maxDamage = -440, radius = 5, effect = CONST_ME_ENERGYHIT, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_corruptor_of_souls.lua b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_corruptor_of_souls.lua index a2a2510e381..97191072a25 100644 --- a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_corruptor_of_souls.lua +++ b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_corruptor_of_souls.lua @@ -73,8 +73,8 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 25, type = COMBAT_DEATHDAMAGE, minDamage = 0, maxDamage = -500, length = 9, spread = 7, effect = CONST_ME_SMALLCLOUDS, target = false }, { name = "remorseless wave", interval = 2000, chance = 25, target = false }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -500, radius = 7, effect = CONST_ME_HITAREA, target = false }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -500, length = 9, spread = 1, effect = CONST_ME_STUN, target = false }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_DEATHDAMAGE, minDamage = 0, maxDamage = -500, length = 9, spread = 1, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -500, length = 9, spread = 0, effect = CONST_ME_STUN, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_DEATHDAMAGE, minDamage = 0, maxDamage = -500, length = 9, spread = 0, effect = CONST_ME_MORTAREA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_remorseless_corruptor.lua b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_remorseless_corruptor.lua index c9595cecc14..76087b32c2a 100644 --- a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_remorseless_corruptor.lua +++ b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_remorseless_corruptor.lua @@ -66,11 +66,11 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -150, maxDamage = -500 }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -500, length = 9, spread = 1, effect = CONST_ME_LOSEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -500, length = 9, spread = 0, effect = CONST_ME_LOSEENERGY, target = false }, { name = "remorseless wave", interval = 2000, chance = 25, target = false }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -500, radius = 7, effect = CONST_ME_HITAREA, target = false }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -500, length = 9, spread = 1, effect = CONST_ME_STUN, target = false }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_DEATHDAMAGE, minDamage = 0, maxDamage = -500, length = 9, spread = 1, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -500, length = 9, spread = 0, effect = CONST_ME_STUN, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_DEATHDAMAGE, minDamage = 0, maxDamage = -500, length = 9, spread = 0, effect = CONST_ME_MORTAREA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_souldespoiler.lua b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_souldespoiler.lua index fe775bbd1cb..976fe5fe317 100644 --- a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_souldespoiler.lua +++ b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_souldespoiler.lua @@ -125,7 +125,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -783 }, { name = "combat", interval = 2000, chance = 60, type = COMBAT_DEATHDAMAGE, minDamage = -30, maxDamage = -181, range = 7, radius = 3, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_SMALLCLOUDS, target = true }, { name = "combat", interval = 2000, chance = 50, type = COMBAT_ENERGYDAMAGE, minDamage = -210, maxDamage = -538, length = 7, spread = 2, effect = CONST_ME_PURPLEENERGY, target = false }, - { name = "combat", interval = 3000, chance = 30, type = COMBAT_DROWNDAMAGE, minDamage = -125, maxDamage = -640, length = 9, spread = 1, effect = CONST_ME_LOSEENERGY, target = false }, + { name = "combat", interval = 3000, chance = 30, type = COMBAT_DROWNDAMAGE, minDamage = -125, maxDamage = -640, length = 9, spread = 0, effect = CONST_ME_LOSEENERGY, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_unarmored_voidborn.lua b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_unarmored_voidborn.lua index 0dbf6743e2d..04df78685ac 100644 --- a/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_unarmored_voidborn.lua +++ b/data-otservbr-global/monster/quests/cults_of_tibia/bosses/the_unarmored_voidborn.lua @@ -107,7 +107,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -550 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = 0, maxDamage = -400, length = 7, spread = 5, effect = CONST_ME_SMALLCLOUDS, target = false }, - { name = "combat", interval = 2000, chance = 30, type = COMBAT_ENERGYDAMAGE, minDamage = -250, maxDamage = -440, radius = 5, target = false }, + { name = "combat", interval = 2000, chance = 30, type = COMBAT_ENERGYDAMAGE, minDamage = -250, maxDamage = -440, radius = 5, effect = CONST_ME_ENERGYHIT, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/cults_of_tibia/goldhanded_cultist.lua b/data-otservbr-global/monster/quests/cults_of_tibia/goldhanded_cultist.lua index 285d72caac0..428924ad140 100644 --- a/data-otservbr-global/monster/quests/cults_of_tibia/goldhanded_cultist.lua +++ b/data-otservbr-global/monster/quests/cults_of_tibia/goldhanded_cultist.lua @@ -91,9 +91,9 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -250 }, - { name = "combat", interval = 3000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -150, radius = 5, target = false }, + { name = "combat", interval = 3000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -150, radius = 5, effect = CONST_ME_DRAWBLOOD, target = false }, { name = "combat", interval = 3000, chance = 10, type = COMBAT_MANADRAIN, minDamage = 0, maxDamage = -200, effect = CONST_ME_LOSEENERGY, target = true }, - { name = "combat", interval = 1000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -250, range = 5, radius = 2, target = true }, + { name = "combat", interval = 1000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -250, range = 5, radius = 2, effect = CONST_ME_DRAWBLOOD, target = true }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/dangerous_depth/aggressive_matter.lua b/data-otservbr-global/monster/quests/dangerous_depth/aggressive_matter.lua index 8678370837d..8d97c0d010e 100644 --- a/data-otservbr-global/monster/quests/dangerous_depth/aggressive_matter.lua +++ b/data-otservbr-global/monster/quests/dangerous_depth/aggressive_matter.lua @@ -67,7 +67,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 58, attack = 50, condition = { type = CONDITION_POISON, totalDamage = 280, interval = 4000 } }, { name = "combat", interval = 2000, chance = 13, type = COMBAT_EARTHDAMAGE, minDamage = -150, maxDamage = -250, range = 7, radius = 3, shootEffect = CONST_ANI_GLOOTHSPEAR, effect = CONST_ME_POISONAREA, target = true }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -150, maxDamage = -230, length = 6, spread = 1, effect = CONST_ME_POISONAREA, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -150, maxDamage = -230, length = 6, spread = 0, effect = CONST_ME_POISONAREA, target = false }, -- poison { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -200, maxDamage = -300, range = 7, shootEffect = CONST_ANI_POISON, effect = CONST_ME_POISONAREA, target = true }, { name = "rot elemental paralyze", interval = 2000, chance = 11, target = false }, diff --git a/data-otservbr-global/monster/quests/dangerous_depth/bosses/ancient_spawn_of_morgathla.lua b/data-otservbr-global/monster/quests/dangerous_depth/bosses/ancient_spawn_of_morgathla.lua index 5d505317891..07b4e43819e 100644 --- a/data-otservbr-global/monster/quests/dangerous_depth/bosses/ancient_spawn_of_morgathla.lua +++ b/data-otservbr-global/monster/quests/dangerous_depth/bosses/ancient_spawn_of_morgathla.lua @@ -90,7 +90,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 90, attack = 80 }, - { name = "combat", interval = 2000, chance = 8, type = COMBAT_LIFEDRAIN, minDamage = -135, maxDamage = -280, range = 7, radius = 5, shootEffect = CONST_ANI_WHIRLWINDAXE, target = true }, + { name = "combat", interval = 2000, chance = 8, type = COMBAT_LIFEDRAIN, minDamage = -135, maxDamage = -280, range = 7, radius = 5, shootEffect = CONST_ANI_WHIRLWINDAXE, effect = CONST_ME_HITAREA, target = true }, { name = "combat", interval = 2000, chance = 8, type = COMBAT_PHYSICALDAMAGE, minDamage = -90, maxDamage = -200, range = 7, shootEffect = CONST_ANI_WHIRLWINDAXE, effect = CONST_ME_EXPLOSIONAREA, target = true }, } diff --git a/data-otservbr-global/monster/quests/dangerous_depth/bosses/the_count_of_the_core.lua b/data-otservbr-global/monster/quests/dangerous_depth/bosses/the_count_of_the_core.lua index 9f477eb7a71..d611e78d84b 100644 --- a/data-otservbr-global/monster/quests/dangerous_depth/bosses/the_count_of_the_core.lua +++ b/data-otservbr-global/monster/quests/dangerous_depth/bosses/the_count_of_the_core.lua @@ -120,7 +120,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -900 }, - { name = "combat", interval = 6000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = 0, maxDamage = -1500, range = 3, length = 9, spread = 1, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 6000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = 0, maxDamage = -1500, range = 3, length = 9, spread = 0, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 4000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = 0, maxDamage = -1500, range = 3, length = 9, spread = 4, effect = CONST_ME_SMALLCLOUDS, target = false }, { name = "combat", interval = 4000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -1500, radius = 8, effect = CONST_ME_HITAREA, target = false }, { name = "combat", interval = 4000, chance = 15, type = COMBAT_DEATHDAMAGE, minDamage = 0, maxDamage = -1500, radius = 8, effect = CONST_ME_BLACKSMOKE, target = false }, diff --git a/data-otservbr-global/monster/quests/feaster_of_souls/irgix_the_flimsy.lua b/data-otservbr-global/monster/quests/feaster_of_souls/irgix_the_flimsy.lua index db4a3c7ce3c..307f1b27380 100644 --- a/data-otservbr-global/monster/quests/feaster_of_souls/irgix_the_flimsy.lua +++ b/data-otservbr-global/monster/quests/feaster_of_souls/irgix_the_flimsy.lua @@ -82,8 +82,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -500 }, - { name = "combat", interval = 1500, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -500, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, target = true }, - { name = "combat", interval = 1500, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -650, length = 4, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 1500, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -500, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, effect = CONST_ME_HITBYPOISON, target = true }, + { name = "combat", interval = 1500, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -650, length = 4, spread = 0, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 1500, chance = 35, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -650, radius = 4, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 1500, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -650, radius = 4, effect = CONST_ME_ENERGYAREA, target = false }, } diff --git a/data-otservbr-global/monster/quests/feaster_of_souls/the_fear_feaster.lua b/data-otservbr-global/monster/quests/feaster_of_souls/the_fear_feaster.lua index b5f69b05e3f..85a6444085b 100644 --- a/data-otservbr-global/monster/quests/feaster_of_souls/the_fear_feaster.lua +++ b/data-otservbr-global/monster/quests/feaster_of_souls/the_fear_feaster.lua @@ -100,7 +100,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 600, maxDamage = -1050, condition = { type = CONDITION_POISON, totalDamage = 4, interval = 4000 } }, { name = "combat", interval = 2000, chance = 100, type = COMBAT_LIFEDRAIN, minDamage = -900, maxDamage = -1400, effect = CONST_ME_MAGIC_RED, target = true }, - { name = "combat", interval = 1000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -1000, maxDamage = -1750, radius = 2, shootEffect = CONST_ANI_SMALLEARTH, target = false }, + { name = "combat", interval = 1000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -1000, maxDamage = -1750, radius = 2, shootEffect = CONST_ANI_SMALLEARTH, effect = CONST_ME_HITBYPOISON, target = false }, { name = "drunk", interval = 1000, chance = 70, range = 7, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_ENERGYAREA, target = false }, { name = "strength", interval = 1000, chance = 60, range = 7, shootEffect = CONST_ANI_LARGEROCK, effect = CONST_ME_ENERGYAREA, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -900, length = 5, spread = 3, effect = CONST_ME_ENERGYHIT, target = false }, diff --git a/data-otservbr-global/monster/quests/feaster_of_souls/the_pale_worm.lua b/data-otservbr-global/monster/quests/feaster_of_souls/the_pale_worm.lua index a2d99ab1f13..ab309d2f583 100644 --- a/data-otservbr-global/monster/quests/feaster_of_souls/the_pale_worm.lua +++ b/data-otservbr-global/monster/quests/feaster_of_souls/the_pale_worm.lua @@ -108,7 +108,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 600, maxDamage = -1050, condition = { type = CONDITION_POISON, totalDamage = 4, interval = 4000 } }, { name = "combat", interval = 2000, chance = 100, type = COMBAT_LIFEDRAIN, minDamage = -900, maxDamage = -1400, effect = CONST_ME_MAGIC_RED, target = true }, - { name = "combat", interval = 1000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -1000, maxDamage = -1750, radius = 2, shootEffect = CONST_ANI_SMALLEARTH, target = false }, + { name = "combat", interval = 1000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -1000, maxDamage = -1750, radius = 2, shootEffect = CONST_ANI_SMALLEARTH, effect = CONST_ME_HITBYPOISON, target = false }, { name = "drunk", interval = 1000, chance = 70, range = 7, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_ENERGYAREA, target = false }, { name = "strength", interval = 1000, chance = 60, range = 7, shootEffect = CONST_ANI_LARGEROCK, effect = CONST_ME_ENERGYAREA, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -900, length = 5, spread = 3, effect = CONST_ME_ENERGYHIT, target = false }, diff --git a/data-otservbr-global/monster/quests/feaster_of_souls/the_unwelcome.lua b/data-otservbr-global/monster/quests/feaster_of_souls/the_unwelcome.lua index 7c0cd052961..e4abf230b1d 100644 --- a/data-otservbr-global/monster/quests/feaster_of_souls/the_unwelcome.lua +++ b/data-otservbr-global/monster/quests/feaster_of_souls/the_unwelcome.lua @@ -102,7 +102,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 600, maxDamage = -1050, condition = { type = CONDITION_POISON, totalDamage = 4, interval = 4000 } }, { name = "combat", interval = 2000, chance = 100, type = COMBAT_LIFEDRAIN, minDamage = -900, maxDamage = -1400, effect = CONST_ME_MAGIC_RED, target = true }, - { name = "combat", interval = 1000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -1000, maxDamage = -1750, radius = 2, shootEffect = CONST_ANI_SMALLEARTH, target = false }, + { name = "combat", interval = 1000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -1000, maxDamage = -1750, radius = 2, shootEffect = CONST_ANI_SMALLEARTH, effect = CONST_ME_HITBYPOISON, target = false }, { name = "drunk", interval = 1000, chance = 70, range = 7, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_ENERGYAREA, target = false }, { name = "strength", interval = 1000, chance = 60, range = 7, shootEffect = CONST_ANI_LARGEROCK, effect = CONST_ME_ENERGYAREA, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -900, length = 5, spread = 3, effect = CONST_ME_ENERGYHIT, target = false }, diff --git a/data-otservbr-global/monster/quests/feaster_of_souls/unaz_the_mean.lua b/data-otservbr-global/monster/quests/feaster_of_souls/unaz_the_mean.lua index b58d4d4c9d6..fb871252bea 100644 --- a/data-otservbr-global/monster/quests/feaster_of_souls/unaz_the_mean.lua +++ b/data-otservbr-global/monster/quests/feaster_of_souls/unaz_the_mean.lua @@ -81,8 +81,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -500 }, - { name = "combat", interval = 1500, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -500, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, target = true }, - { name = "combat", interval = 1500, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -650, length = 4, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 1500, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -500, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, effect = CONST_ME_HITBYPOISON, target = true }, + { name = "combat", interval = 1500, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -650, length = 4, spread = 0, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 1500, chance = 35, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -650, radius = 4, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 1500, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -650, radius = 4, effect = CONST_ME_ENERGYAREA, target = false }, } diff --git a/data-otservbr-global/monster/quests/feaster_of_souls/vok_the_freakish.lua b/data-otservbr-global/monster/quests/feaster_of_souls/vok_the_freakish.lua index 68157a12226..4efff07d202 100644 --- a/data-otservbr-global/monster/quests/feaster_of_souls/vok_the_freakish.lua +++ b/data-otservbr-global/monster/quests/feaster_of_souls/vok_the_freakish.lua @@ -79,8 +79,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -500 }, - { name = "combat", interval = 1500, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -500, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, target = true }, - { name = "combat", interval = 1500, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -650, length = 4, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 1500, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -500, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, effect = CONST_ME_HITBYPOISON, target = true }, + { name = "combat", interval = 1500, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -650, length = 4, spread = 0, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 1500, chance = 35, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -650, radius = 4, effect = CONST_ME_MORTAREA, target = true }, { name = "combat", interval = 1500, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -650, radius = 4, effect = CONST_ME_GREEN_RINGS, target = true }, } diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/death_dragon.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/death_dragon.lua index 9d96b8a2845..09c0bd382be 100644 --- a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/death_dragon.lua +++ b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/death_dragon.lua @@ -96,7 +96,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 150, attack = 60 }, { name = "combat", interval = 2000, chance = 9, type = COMBAT_EARTHDAMAGE, minDamage = -100, maxDamage = -400, range = 7, radius = 4, shootEffect = CONST_ANI_POISON, effect = CONST_ME_POISONAREA, target = true }, - { name = "combat", interval = 2000, chance = 9, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -400, range = 7, radius = 4, shootEffect = CONST_ANI_DEATH, target = true }, + { name = "combat", interval = 2000, chance = 9, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -400, range = 7, radius = 4, shootEffect = CONST_ANI_DEATH, effect = CONST_ME_MORTAREA, target = true }, { name = "combat", interval = 2000, chance = 11, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -615, range = 7, shootEffect = CONST_ANI_DEATH, effect = CONST_ME_MORTAREA, target = false }, { name = "undead dragon curse", interval = 2000, chance = 9, target = false }, { name = "combat", interval = 2000, chance = 9, type = COMBAT_LIFEDRAIN, minDamage = -200, maxDamage = -700, length = 8, spread = 3, effect = CONST_ME_MAGIC_RED, target = false }, diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/destabilized_ferumbras.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/destabilized_ferumbras.lua index 3d3917d00f6..2f67c54e633 100644 --- a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/destabilized_ferumbras.lua +++ b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/destabilized_ferumbras.lua @@ -83,7 +83,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 16, type = COMBAT_MANADRAIN, minDamage = -225, maxDamage = -410, radius = 6, effect = CONST_ME_MAGIC_RED, target = false }, { name = "combat", interval = 2000, chance = 21, type = COMBAT_LIFEDRAIN, minDamage = -200, maxDamage = -450, radius = 6, effect = CONST_ME_POFF, target = false }, { name = "ferumbras soulfire", interval = 2000, chance = 20, range = 7, target = false }, - { name = "combat", interval = 2000, chance = 17, type = COMBAT_LIFEDRAIN, minDamage = -590, maxDamage = -1050, length = 8, spread = 1, effect = CONST_ME_HITBYPOISON, target = false }, + { name = "combat", interval = 2000, chance = 17, type = COMBAT_LIFEDRAIN, minDamage = -590, maxDamage = -1050, length = 8, spread = 0, effect = CONST_ME_HITBYPOISON, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ferumbras_mortal_shell.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ferumbras_mortal_shell.lua index 1c2944caabc..ca11ccb542a 100644 --- a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ferumbras_mortal_shell.lua +++ b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ferumbras_mortal_shell.lua @@ -153,7 +153,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 21, type = COMBAT_ENERGYDAMAGE, minDamage = -400, maxDamage = -650, radius = 9, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 2000, chance = 21, type = COMBAT_LIFEDRAIN, minDamage = -200, maxDamage = -450, radius = 6, effect = CONST_ME_POFF, target = false }, { name = "ferumbras soulfire", interval = 2000, chance = 20, range = 7, target = false }, - { name = "combat", interval = 2000, chance = 17, type = COMBAT_LIFEDRAIN, minDamage = -590, maxDamage = -1050, length = 8, spread = 1, effect = CONST_ME_HITBYPOISON, target = false }, + { name = "combat", interval = 2000, chance = 17, type = COMBAT_LIFEDRAIN, minDamage = -590, maxDamage = -1050, length = 8, spread = 0, effect = CONST_ME_HITBYPOISON, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ferumbras_soul_splinter.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ferumbras_soul_splinter.lua index c973c1a1020..c712c874376 100644 --- a/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ferumbras_soul_splinter.lua +++ b/data-otservbr-global/monster/quests/ferumbras_ascendant/bosses/ferumbras_soul_splinter.lua @@ -83,7 +83,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 16, type = COMBAT_MANADRAIN, minDamage = -225, maxDamage = -410, radius = 6, effect = CONST_ME_MAGIC_RED, target = false }, { name = "combat", interval = 2000, chance = 21, type = COMBAT_LIFEDRAIN, minDamage = -200, maxDamage = -450, radius = 6, effect = CONST_ME_POFF, target = false }, { name = "ferumbras soulfire", interval = 2000, chance = 20, range = 7, target = false }, - { name = "combat", interval = 2000, chance = 17, type = COMBAT_LIFEDRAIN, minDamage = -590, maxDamage = -1050, length = 8, spread = 1, effect = CONST_ME_HITBYPOISON, target = false }, + { name = "combat", interval = 2000, chance = 17, type = COMBAT_LIFEDRAIN, minDamage = -590, maxDamage = -1050, length = 8, spread = 0, effect = CONST_ME_HITBYPOISON, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/disgusting_ooze.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/disgusting_ooze.lua index 7760d93ed53..1f3ab4fe550 100644 --- a/data-otservbr-global/monster/quests/ferumbras_ascendant/disgusting_ooze.lua +++ b/data-otservbr-global/monster/quests/ferumbras_ascendant/disgusting_ooze.lua @@ -93,7 +93,7 @@ monster.attacks = { -- poison { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -300, maxDamage = -500, radius = 8, effect = CONST_ME_HITBYPOISON, target = false }, -- poison - { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -400, maxDamage = -725, length = 8, spread = 1, effect = CONST_ME_SMALLPLANTS, target = false }, + { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -400, maxDamage = -725, length = 8, spread = 0, effect = CONST_ME_SMALLPLANTS, target = false }, { name = "combat", interval = 2000, chance = 14, type = COMBAT_EARTHDAMAGE, minDamage = -120, maxDamage = -170, radius = 3, effect = CONST_ME_POISONAREA, target = false }, } diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_frazzlemaw.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_frazzlemaw.lua index ab81f63766f..41745ffb925 100644 --- a/data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_frazzlemaw.lua +++ b/data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_frazzlemaw.lua @@ -100,8 +100,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 90, attack = 80 }, - { name = "combat", interval = 2000, chance = 12, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -400, radius = 3, target = false }, - { name = "combat", interval = 2000, chance = 13, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -700, length = 5, spread = 1, effect = CONST_ME_EXPLOSIONAREA, target = true }, + { name = "combat", interval = 2000, chance = 12, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -400, radius = 3, effect = CONST_ME_HITAREA, target = false }, + { name = "combat", interval = 2000, chance = 13, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -700, length = 5, spread = 0, effect = CONST_ME_EXPLOSIONAREA, target = true }, -- bleed { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 16, minDamage = -400, maxDamage = -600, radius = 2, shootEffect = CONST_ANI_LARGEROCK, effect = CONST_ME_STONES, target = true }, { name = "frazzlemaw paralyze", interval = 2000, chance = 15, target = false }, diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_yielothax.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_yielothax.lua index 7e1c7517be1..58eb5cac0ec 100644 --- a/data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_yielothax.lua +++ b/data-otservbr-global/monster/quests/ferumbras_ascendant/lovely/lovely_yielothax.lua @@ -86,8 +86,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 70, attack = 50 }, - { name = "combat", interval = 2000, chance = 18, type = COMBAT_LIFEDRAIN, minDamage = -70, maxDamage = -130, length = 4, spread = 1, effect = CONST_ME_ENERGYAREA, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -50, maxDamage = -150, length = 5, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 18, type = COMBAT_LIFEDRAIN, minDamage = -70, maxDamage = -130, length = 4, spread = 0, effect = CONST_ME_ENERGYAREA, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -50, maxDamage = -150, length = 5, spread = 0, effect = CONST_ME_MAGIC_RED, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -75, maxDamage = -120, radius = 3, shootEffect = CONST_ANI_EARTH, effect = CONST_ME_HITBYPOISON, target = true }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -120, maxDamage = -215, radius = 3, effect = CONST_ME_HITBYPOISON, target = false }, -- poison diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/summons/enthralled_demon.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/summons/enthralled_demon.lua index c77762c1013..bc6f8460708 100644 --- a/data-otservbr-global/monster/quests/ferumbras_ascendant/summons/enthralled_demon.lua +++ b/data-otservbr-global/monster/quests/ferumbras_ascendant/summons/enthralled_demon.lua @@ -68,11 +68,11 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 70, attack = 130 }, { name = "combat", interval = 2000, chance = 13, type = COMBAT_MANADRAIN, minDamage = -60, maxDamage = -120, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_SMALLCLOUDS, target = false }, { name = "combat", interval = 2000, chance = 33, type = COMBAT_FIREDAMAGE, minDamage = -150, maxDamage = -250, range = 7, radius = 7, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_DROWNDAMAGE, minDamage = -350, maxDamage = -450, radius = 7, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_DROWNDAMAGE, minDamage = -350, maxDamage = -450, radius = 7, effect = CONST_ME_LOSEENERGY, target = false }, { name = "combat", interval = 2000, chance = 7, type = COMBAT_ENERGYDAMAGE, minDamage = -210, maxDamage = -300, range = 1, radius = 1, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_ENERGYHIT, target = true }, { name = "firefield", interval = 2000, chance = 14, range = 7, radius = 1, shootEffect = CONST_ANI_FIRE, target = true }, { name = "demon paralyze", interval = 2000, chance = 10, range = 7, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -480, length = 8, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -480, length = 8, spread = 0, effect = CONST_ME_PURPLEENERGY, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/animated_sword.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/animated_sword.lua index 23f2877b6c1..3c5063742b9 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/animated_sword.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/animated_sword.lua @@ -62,7 +62,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 50, attack = 50 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_MANADRAIN, minDamage = -40, maxDamage = -160, radius = 6, effect = CONST_ME_MAGIC_BLUE, target = false }, { name = "berserk", interval = 2000, chance = 15, minDamage = -40, maxDamage = -160, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -40, maxDamage = -100, length = 4, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -40, maxDamage = -100, length = 4, spread = 0, effect = CONST_ME_ENERGYHIT, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/lady_tenebris.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/lady_tenebris.lua index b75511b2dc8..17d68ca6994 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/lady_tenebris.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/lady_tenebris.lua @@ -115,7 +115,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -800, maxDamage = -1800 }, - { name = "combat", interval = 6000, chance = 13, type = COMBAT_DEATHDAMAGE, minDamage = -1200, maxDamage = -1500, length = 8, spread = 1, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 6000, chance = 13, type = COMBAT_DEATHDAMAGE, minDamage = -1200, maxDamage = -1500, length = 8, spread = 0, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 2000, chance = 13, type = COMBAT_DEATHDAMAGE, minDamage = -400, maxDamage = -600, radius = 4, shootEffect = CONST_ANI_DEATH, effect = CONST_ME_SMALLCLOUDS, target = true }, { name = "tenebris summon", interval = 2000, chance = 14, target = false }, { name = "tenebris ultimate", interval = 15000, chance = 30, target = false }, diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/lloyd.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/lloyd.lua index 8abf24b5ef8..5d5f729e749 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/lloyd.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/lloyd.lua @@ -113,7 +113,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -200, maxDamage = -1400 }, - { name = "combat", interval = 2000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = -330, maxDamage = -660, length = 6, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = -330, maxDamage = -660, length = 6, spread = 0, effect = CONST_ME_PURPLEENERGY, target = false }, { name = "lloyd wave", interval = 2000, chance = 12, minDamage = -430, maxDamage = -560, target = false }, { name = "lloyd wave2", interval = 2000, chance = 12, minDamage = -230, maxDamage = -460, target = false }, { name = "lloyd wave3", interval = 2000, chance = 12, minDamage = -430, maxDamage = -660, target = false }, diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/mounted_thorn_knight.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/mounted_thorn_knight.lua index d9e18471318..8d68b77c1e1 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/mounted_thorn_knight.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/mounted_thorn_knight.lua @@ -72,9 +72,9 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -600, maxDamage = -1000 }, - { name = "combat", interval = 2000, chance = 12, type = COMBAT_LIFEDRAIN, minDamage = -400, maxDamage = -700, length = 4, spread = 1, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 2000, chance = 12, type = COMBAT_MANADRAIN, minDamage = -1400, maxDamage = -1700, length = 9, spread = 1, effect = CONST_ME_CARNIPHILA, target = false }, - { name = "combat", interval = 2000, chance = 12, type = COMBAT_DEATHDAMAGE, minDamage = -400, maxDamage = -700, length = 9, spread = 1, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 12, type = COMBAT_LIFEDRAIN, minDamage = -400, maxDamage = -700, length = 4, spread = 0, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 2000, chance = 12, type = COMBAT_MANADRAIN, minDamage = -1400, maxDamage = -1700, length = 9, spread = 0, effect = CONST_ME_CARNIPHILA, target = false }, + { name = "combat", interval = 2000, chance = 12, type = COMBAT_DEATHDAMAGE, minDamage = -400, maxDamage = -700, length = 9, spread = 0, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -250, radius = 10, effect = CONST_ME_BLOCKHIT, target = false }, } diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_blazing_time_guardian.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_blazing_time_guardian.lua index d81dfdc2e9a..fef77ab81cf 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_blazing_time_guardian.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_blazing_time_guardian.lua @@ -92,12 +92,12 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 190, attack = 300 }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_DEATHDAMAGE, minDamage = -600, maxDamage = -780, range = 7, radius = 4, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_ENERGYHIT, target = true }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -600, maxDamage = -780, length = 9, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -600, maxDamage = -780, length = 9, spread = 1, effect = CONST_ME_ENERGYAREA, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -600, maxDamage = -780, length = 9, spread = 0, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -600, maxDamage = -780, length = 9, spread = 0, effect = CONST_ME_ENERGYAREA, target = false }, -- energy damage { name = "condition", type = CONDITION_ENERGY, interval = 2000, chance = 20, minDamage = -2000, maxDamage = -2000, radius = 7, effect = CONST_ME_BLOCKHIT, target = false }, -- bleed - { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 20, minDamage = -2000, maxDamage = -2000, length = 9, spread = 1, effect = CONST_ME_BLOCKHIT, target = false }, + { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 20, minDamage = -2000, maxDamage = -2000, length = 9, spread = 0, effect = CONST_ME_BLOCKHIT, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_enraged_thorn_knight.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_enraged_thorn_knight.lua index 3ced147e4a0..c664a5e21d2 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_enraged_thorn_knight.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_enraged_thorn_knight.lua @@ -114,9 +114,9 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -600, maxDamage = -1000 }, - { name = "combat", interval = 2000, chance = 12, type = COMBAT_LIFEDRAIN, minDamage = -400, maxDamage = -700, length = 4, spread = 1, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 2000, chance = 12, type = COMBAT_MANADRAIN, minDamage = -1400, maxDamage = -1700, length = 9, spread = 1, effect = CONST_ME_CARNIPHILA, target = false }, - { name = "combat", interval = 2000, chance = 12, type = COMBAT_DEATHDAMAGE, minDamage = -400, maxDamage = -700, length = 9, spread = 1, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 12, type = COMBAT_LIFEDRAIN, minDamage = -400, maxDamage = -700, length = 4, spread = 0, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 2000, chance = 12, type = COMBAT_MANADRAIN, minDamage = -1400, maxDamage = -1700, length = 9, spread = 0, effect = CONST_ME_CARNIPHILA, target = false }, + { name = "combat", interval = 2000, chance = 12, type = COMBAT_DEATHDAMAGE, minDamage = -400, maxDamage = -700, length = 9, spread = 0, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -250, radius = 10, effect = CONST_ME_BLOCKHIT, target = false }, } diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_freezing_time_guardian.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_freezing_time_guardian.lua index 4c9cba80266..8fcbd1ddbab 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_freezing_time_guardian.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_freezing_time_guardian.lua @@ -93,12 +93,12 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 190, attack = 300 }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_DEATHDAMAGE, minDamage = -600, maxDamage = -780, range = 7, radius = 4, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_ENERGYHIT, target = true }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -600, maxDamage = -780, length = 9, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -600, maxDamage = -780, length = 9, spread = 1, effect = CONST_ME_ENERGYAREA, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -600, maxDamage = -780, length = 9, spread = 0, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -600, maxDamage = -780, length = 9, spread = 0, effect = CONST_ME_ENERGYAREA, target = false }, -- energy damage { name = "condition", type = CONDITION_ENERGY, interval = 2000, chance = 20, minDamage = -2000, maxDamage = -2000, radius = 7, effect = CONST_ME_BLOCKHIT, target = false }, -- bleed - { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 20, minDamage = -2000, maxDamage = -2000, length = 9, spread = 1, effect = CONST_ME_BLOCKHIT, target = false }, + { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 20, minDamage = -2000, maxDamage = -2000, length = 9, spread = 0, effect = CONST_ME_BLOCKHIT, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_last_lore_keeper.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_last_lore_keeper.lua index dac92740cf2..f1d96fe25bc 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_last_lore_keeper.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_last_lore_keeper.lua @@ -130,10 +130,10 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 140, attack = 80 }, - { name = "combat", interval = 2000, chance = 7, type = COMBAT_PHYSICALDAMAGE, minDamage = -650, maxDamage = -900, length = 8, spread = 1, effect = CONST_ME_EXPLOSIONAREA, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -850, maxDamage = -2260, length = 10, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 7, type = COMBAT_PHYSICALDAMAGE, minDamage = -650, maxDamage = -900, length = 8, spread = 0, effect = CONST_ME_EXPLOSIONAREA, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -850, maxDamage = -2260, length = 10, spread = 0, effect = CONST_ME_MAGIC_RED, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -640, maxDamage = -800, radius = 5, effect = CONST_ME_SMALLCLOUDS, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -420, maxDamage = -954, length = 8, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -420, maxDamage = -954, length = 8, spread = 0, effect = CONST_ME_PURPLEENERGY, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -640, maxDamage = -800, radius = 5, effect = CONST_ME_STONES, target = true }, { name = "medusa paralyze", interval = 2000, chance = 20, target = false }, } diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_shielded_thorn_knight.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_shielded_thorn_knight.lua index d9e1c1c93ab..161f2150690 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_shielded_thorn_knight.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_shielded_thorn_knight.lua @@ -73,9 +73,9 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -600, maxDamage = -1000 }, - { name = "combat", interval = 2000, chance = 12, type = COMBAT_LIFEDRAIN, minDamage = -400, maxDamage = -700, length = 4, spread = 1, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 2000, chance = 12, type = COMBAT_MANADRAIN, minDamage = -1400, maxDamage = -1700, length = 9, spread = 1, effect = CONST_ME_CARNIPHILA, target = false }, - { name = "combat", interval = 2000, chance = 12, type = COMBAT_DEATHDAMAGE, minDamage = -400, maxDamage = -700, length = 9, spread = 1, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 12, type = COMBAT_LIFEDRAIN, minDamage = -400, maxDamage = -700, length = 4, spread = 0, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 2000, chance = 12, type = COMBAT_MANADRAIN, minDamage = -1400, maxDamage = -1700, length = 9, spread = 0, effect = CONST_ME_CARNIPHILA, target = false }, + { name = "combat", interval = 2000, chance = 12, type = COMBAT_DEATHDAMAGE, minDamage = -400, maxDamage = -700, length = 9, spread = 0, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -250, radius = 10, effect = CONST_ME_BLOCKHIT, target = false }, } diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_time_guardian.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_time_guardian.lua index 11abce175ea..7bf8e0c82ad 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_time_guardian.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/bosses/the_time_guardian.lua @@ -114,12 +114,12 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 190, attack = 300 }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_DEATHDAMAGE, minDamage = -600, maxDamage = -780, range = 7, radius = 4, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_ENERGYHIT, target = true }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -600, maxDamage = -780, length = 9, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -600, maxDamage = -780, length = 9, spread = 1, effect = CONST_ME_ENERGYAREA, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -600, maxDamage = -780, length = 9, spread = 0, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -600, maxDamage = -780, length = 9, spread = 0, effect = CONST_ME_ENERGYAREA, target = false }, -- energy damage { name = "condition", type = CONDITION_ENERGY, interval = 2000, chance = 20, minDamage = -2000, maxDamage = -2000, radius = 7, effect = CONST_ME_BLOCKHIT, target = false }, -- bleed - { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 20, minDamage = -2000, maxDamage = -2000, length = 9, spread = 1, effect = CONST_ME_BLOCKHIT, target = false }, + { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 20, minDamage = -2000, maxDamage = -2000, length = 9, spread = 0, effect = CONST_ME_BLOCKHIT, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/sword_of_vengeance.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/sword_of_vengeance.lua index 80c25dc971b..e46c2d9bb36 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/sword_of_vengeance.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/sword_of_vengeance.lua @@ -62,7 +62,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -0, maxDamage = -242 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_MANADRAIN, minDamage = -40, maxDamage = -160, radius = 6, effect = CONST_ME_MAGIC_BLUE, target = false }, { name = "berserk", interval = 2000, chance = 15, minDamage = -40, maxDamage = -160, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -40, maxDamage = -100, length = 4, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -40, maxDamage = -100, length = 4, spread = 0, effect = CONST_ME_ENERGYHIT, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/the_distorted_astral_source.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/the_distorted_astral_source.lua index b07416e40b9..6c094f6b098 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/the_distorted_astral_source.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/the_distorted_astral_source.lua @@ -66,7 +66,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -330 }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -500, range = 7, radius = 6, shootEffect = CONST_ANI_ENERGYBALL, effect = CONST_ME_PURPLEENERGY, target = true }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -500, range = 7, radius = 6, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_ENERGYHIT, target = true }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -400, length = 5, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -400, length = 5, spread = 0, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_MANADRAIN, minDamage = -200, maxDamage = -400, radius = 5, effect = CONST_ME_MAGIC_BLUE, target = false }, } diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/thorn_minion.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/thorn_minion.lua index 55b09d59220..8d4bebd6665 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/thorn_minion.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/thorn_minion.lua @@ -69,7 +69,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -100, maxDamage = -195, range = 7, shootEffect = CONST_ANI_POISON, effect = CONST_ME_GREEN_RINGS, target = false }, { name = "speed", interval = 2000, chance = 15, speedChange = -800, range = 7, shootEffect = CONST_ANI_POISON, effect = CONST_ME_GREEN_RINGS, target = false, duration = 30000 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -280, radius = 4, effect = CONST_ME_GROUNDSHAKER, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -200, maxDamage = -400, length = 4, spread = 1, effect = CONST_ME_CARNIPHILA, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -200, maxDamage = -400, length = 4, spread = 0, effect = CONST_ME_CARNIPHILA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/unbound_demon.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/unbound_demon.lua index 3a5936460f8..e9c8e24197d 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/unbound_demon.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/unbound_demon.lua @@ -66,7 +66,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = 0, maxDamage = -120, range = 7, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -150, maxDamage = -250, range = 7, radius = 7, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true }, { name = "firefield", interval = 2000, chance = 10, range = 7, radius = 1, shootEffect = CONST_ANI_FIRE, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -490, length = 8, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -490, length = 8, spread = 0, effect = CONST_ME_PURPLEENERGY, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -210, maxDamage = -300, range = 1, shootEffect = CONST_ANI_ENERGY, target = false }, { name = "speed", interval = 2000, chance = 15, speedChange = -700, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 30000 }, } diff --git a/data-otservbr-global/monster/quests/forgotten_knowledge/unbound_demon_outcast.lua b/data-otservbr-global/monster/quests/forgotten_knowledge/unbound_demon_outcast.lua index f6d7940fbb6..5900c593b28 100644 --- a/data-otservbr-global/monster/quests/forgotten_knowledge/unbound_demon_outcast.lua +++ b/data-otservbr-global/monster/quests/forgotten_knowledge/unbound_demon_outcast.lua @@ -70,8 +70,8 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -250, maxDamage = -450, length = 6, spread = 1, effect = CONST_ME_PURPLEENERGY, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -350, maxDamage = -550, length = 8, spread = 1, effect = CONST_ME_YELLOWENERGY, target = true }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -250, maxDamage = -450, length = 6, spread = 0, effect = CONST_ME_PURPLEENERGY, target = true }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -350, maxDamage = -550, length = 8, spread = 0, effect = CONST_ME_YELLOWENERGY, target = true }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -100, maxDamage = -250, radius = 3, effect = CONST_ME_ENERGYHIT, target = true }, { name = "demon outcast skill reducer", interval = 2000, chance = 10, range = 5, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -80, maxDamage = -150, radius = 4, effect = CONST_ME_MAGIC_GREEN, target = false }, diff --git a/data-otservbr-global/monster/quests/grave_danger/bosses/count_vlarkorth.lua b/data-otservbr-global/monster/quests/grave_danger/bosses/count_vlarkorth.lua index c8d0a2b6596..ced550fbc84 100644 --- a/data-otservbr-global/monster/quests/grave_danger/bosses/count_vlarkorth.lua +++ b/data-otservbr-global/monster/quests/grave_danger/bosses/count_vlarkorth.lua @@ -111,8 +111,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -800, effect = CONST_ME_DRAWBLOOD }, { name = "combat", interval = 2300, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -250, maxDamage = -350, range = 1, effect = CONST_ME_MAGIC_RED, target = true }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_MANADRAIN, minDamage = -1, maxDamage = -250, length = 7, spread = 1, effect = CONST_ME_SMALLCLOUDS, target = false }, - { name = "combat", interval = 2500, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -500, maxDamage = -1500, length = 7, spread = 1, effect = CONST_ME_HITBYFIRE, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_MANADRAIN, minDamage = -1, maxDamage = -250, length = 7, spread = 0, effect = CONST_ME_SMALLCLOUDS, target = false }, + { name = "combat", interval = 2500, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -500, maxDamage = -1500, length = 7, spread = 0, effect = CONST_ME_HITBYFIRE, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/grave_danger/bosses/duke_krule.lua b/data-otservbr-global/monster/quests/grave_danger/bosses/duke_krule.lua index 6955a82c433..518eda46ac2 100644 --- a/data-otservbr-global/monster/quests/grave_danger/bosses/duke_krule.lua +++ b/data-otservbr-global/monster/quests/grave_danger/bosses/duke_krule.lua @@ -103,8 +103,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -900 }, - { name = "combat", interval = 3500, chance = 37, type = COMBAT_PHYSICALDAMAGE, minDamage = -700, maxDamage = -1200, length = 7, spread = 1, effect = CONST_ME_BLOCKHIT, target = false }, - { name = "combat", interval = 2500, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -400, maxDamage = -1000, length = 7, spread = 1, effect = CONST_ME_BLOCKHIT, target = false }, + { name = "combat", interval = 3500, chance = 37, type = COMBAT_PHYSICALDAMAGE, minDamage = -700, maxDamage = -1200, length = 7, spread = 0, effect = CONST_ME_BLOCKHIT, target = false }, + { name = "combat", interval = 2500, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -400, maxDamage = -1000, length = 7, spread = 0, effect = CONST_ME_BLOCKHIT, target = false }, { name = "combat", interval = 4200, chance = 40, type = COMBAT_FIREDAMAGE, minDamage = -300, maxDamage = -500, radius = 9, effect = CONST_ME_HITBYFIRE, target = false }, } diff --git a/data-otservbr-global/monster/quests/grave_danger/bosses/earl_osam.lua b/data-otservbr-global/monster/quests/grave_danger/bosses/earl_osam.lua index 250f5d8547a..c996116a336 100644 --- a/data-otservbr-global/monster/quests/grave_danger/bosses/earl_osam.lua +++ b/data-otservbr-global/monster/quests/grave_danger/bosses/earl_osam.lua @@ -106,7 +106,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -1000, effect = CONST_ME_DRAWBLOOD }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_ICEDAMAGE, minDamage = -400, maxDamage = -1000, length = 7, spread = 1, effect = CONST_ME_ICEATTACK, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_ICEDAMAGE, minDamage = -400, maxDamage = -1000, length = 7, spread = 0, effect = CONST_ME_ICEATTACK, target = false }, { name = "ice chain", interval = 2500, chance = 25, minDamage = -260, maxDamage = -360, range = 3, target = true }, { name = "combat", interval = 3500, chance = 37, type = COMBAT_EARTHDAMAGE, minDamage = -400, maxDamage = -1000, length = 7, spread = 2, effect = CONST_ME_POISONAREA, target = false }, } diff --git a/data-otservbr-global/monster/quests/grave_danger/bosses/king_zelos.lua b/data-otservbr-global/monster/quests/grave_danger/bosses/king_zelos.lua index 3d2a50ff36f..cafd09f34a7 100644 --- a/data-otservbr-global/monster/quests/grave_danger/bosses/king_zelos.lua +++ b/data-otservbr-global/monster/quests/grave_danger/bosses/king_zelos.lua @@ -84,8 +84,8 @@ monster.loot = { monster.attacks = { { name = "melee", type = COMBAT_PHYSICALDAMAGE, interval = 2000, minDamage = -900, maxDamage = -2700 }, - { name = "combat", type = COMBAT_FIREDAMAGE, interval = 2000, chance = 15, length = 8, spread = 1, minDamage = -1200, maxDamage = -3200, effect = CONST_ME_HITBYFIRE }, - { name = "combat", type = COMBAT_LIFEDRAIN, interval = 2000, chance = 10, length = 8, spread = 1, minDamage = -600, maxDamage = -1600, effect = CONST_ME_SMALLCLOUDS }, + { name = "combat", type = COMBAT_FIREDAMAGE, interval = 2000, chance = 15, length = 8, spread = 0, minDamage = -1200, maxDamage = -3200, effect = CONST_ME_HITBYFIRE }, + { name = "combat", type = COMBAT_LIFEDRAIN, interval = 2000, chance = 10, length = 8, spread = 0, minDamage = -600, maxDamage = -1600, effect = CONST_ME_SMALLCLOUDS }, { name = "combat", type = COMBAT_DEATHDAMAGE, interval = 2000, chance = 30, radius = 6, minDamage = -1200, maxDamage = -1500, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", type = COMBAT_DEATHDAMAGE, interval = 2000, chance = 20, length = 8, minDamage = -1700, maxDamage = -2000, effect = CONST_ME_MORTAREA, target = false }, } diff --git a/data-otservbr-global/monster/quests/grave_danger/bosses/lord_azaram.lua b/data-otservbr-global/monster/quests/grave_danger/bosses/lord_azaram.lua index 6b40f5348c8..701a0b6f92b 100644 --- a/data-otservbr-global/monster/quests/grave_danger/bosses/lord_azaram.lua +++ b/data-otservbr-global/monster/quests/grave_danger/bosses/lord_azaram.lua @@ -109,7 +109,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -1000, effect = CONST_ME_DRAWBLOOD }, { name = "lord azaram wave", interval = 3500, chance = 50, minDamage = -360, maxDamage = -900 }, - { name = "combat", interval = 2700, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -500, maxDamage = -1200, length = 7, spread = 1, effect = CONST_ME_STONES, target = false }, + { name = "combat", interval = 2700, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -500, maxDamage = -1200, length = 7, spread = 0, effect = CONST_ME_STONES, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/grave_danger/bosses/sir_baeloc.lua b/data-otservbr-global/monster/quests/grave_danger/bosses/sir_baeloc.lua index cedfea01aee..042ce32e981 100644 --- a/data-otservbr-global/monster/quests/grave_danger/bosses/sir_baeloc.lua +++ b/data-otservbr-global/monster/quests/grave_danger/bosses/sir_baeloc.lua @@ -104,7 +104,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -900, effect = CONST_ME_DRAWBLOOD }, - { name = "combat", interval = 3100, chance = 37, type = COMBAT_PHYSICALDAMAGE, minDamage = -400, maxDamage = -1000, length = 7, spread = 1, effect = CONST_ME_DRAWBLOOD, target = false }, + { name = "combat", interval = 3100, chance = 37, type = COMBAT_PHYSICALDAMAGE, minDamage = -400, maxDamage = -1000, length = 7, spread = 0, effect = CONST_ME_DRAWBLOOD, target = false }, { name = "combat", interval = 2500, chance = 35, type = COMBAT_PHYSICALDAMAGE, minDamage = -350, maxDamage = -625, range = 5, shootEffect = CONST_ANI_WHIRLWINDAXE, effect = CONST_ME_DRAWBLOOD, target = true }, { name = "combat", interval = 2700, chance = 30, type = COMBAT_DEATHDAMAGE, minDamage = -180, maxDamage = -250, range = 1, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = true }, } diff --git a/data-otservbr-global/monster/quests/grave_danger/bosses/sir_nictros.lua b/data-otservbr-global/monster/quests/grave_danger/bosses/sir_nictros.lua index fcb5c8599aa..8637363a949 100644 --- a/data-otservbr-global/monster/quests/grave_danger/bosses/sir_nictros.lua +++ b/data-otservbr-global/monster/quests/grave_danger/bosses/sir_nictros.lua @@ -90,7 +90,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -900, effect = CONST_ME_DRAWBLOOD }, - { name = "combat", interval = 3100, chance = 37, type = COMBAT_PHYSICALDAMAGE, minDamage = -400, maxDamage = -1000, length = 7, spread = 1, effect = CONST_ME_DRAWBLOOD, target = false }, + { name = "combat", interval = 3100, chance = 37, type = COMBAT_PHYSICALDAMAGE, minDamage = -400, maxDamage = -1000, length = 7, spread = 0, effect = CONST_ME_DRAWBLOOD, target = false }, { name = "combat", interval = 2500, chance = 35, type = COMBAT_PHYSICALDAMAGE, minDamage = -350, maxDamage = -625, range = 5, shootEffect = CONST_ANI_WHIRLWINDAXE, effect = CONST_ME_DRAWBLOOD, target = true }, { name = "combat", interval = 2700, chance = 30, type = COMBAT_DEATHDAMAGE, minDamage = -180, maxDamage = -250, range = 1, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = true }, } diff --git a/data-otservbr-global/monster/quests/grave_danger/shard_of_magnor.lua b/data-otservbr-global/monster/quests/grave_danger/shard_of_magnor.lua index 84897a75ae3..8f0671ebe21 100644 --- a/data-otservbr-global/monster/quests/grave_danger/shard_of_magnor.lua +++ b/data-otservbr-global/monster/quests/grave_danger/shard_of_magnor.lua @@ -63,8 +63,8 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -200, maxDamage = -600 }, - { name = "combat", interval = 2000, chance = 50, type = COMBAT_MANADRAIN, minDamage = -400, maxDamage = -1000, length = 7, spread = 1, effect = CONST_ME_STONES, target = false }, - { name = "combat", interval = 2000, chance = 70, type = COMBAT_PHYSICALDAMAGE, minDamage = -400, maxDamage = -1000, length = 7, spread = 1, effect = CONST_ME_POISONAREA, target = false }, + { name = "combat", interval = 2000, chance = 50, type = COMBAT_MANADRAIN, minDamage = -400, maxDamage = -1000, length = 7, spread = 0, effect = CONST_ME_STONES, target = false }, + { name = "combat", interval = 2000, chance = 70, type = COMBAT_PHYSICALDAMAGE, minDamage = -400, maxDamage = -1000, length = 7, spread = 0, effect = CONST_ME_POISONAREA, target = false }, { name = "combat", interval = 2000, chance = 0, type = COMBAT_ENERGYDAMAGE, minDamage = -400, maxDamage = -650, radius = 3, effect = CONST_ME_GREEN_ENERGY_SPARK, target = true }, } diff --git a/data-otservbr-global/monster/quests/grave_danger/vampiric_blood.lua b/data-otservbr-global/monster/quests/grave_danger/vampiric_blood.lua index fec9c98c304..bcae0d3c763 100644 --- a/data-otservbr-global/monster/quests/grave_danger/vampiric_blood.lua +++ b/data-otservbr-global/monster/quests/grave_danger/vampiric_blood.lua @@ -63,8 +63,8 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, - { name = "combat", interval = 1000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -250, maxDamage = -300, range = 7, length = 3, spread = 1, effect = CONST_ME_HITBYFIRE, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_FIREDAMAGE, minDamage = 0, maxDamage = -100, range = 7, length = 6, spread = 1, effect = CONST_ME_HITBYFIRE, target = false }, + { name = "combat", interval = 1000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -250, maxDamage = -300, range = 7, length = 3, spread = 0, effect = CONST_ME_HITBYFIRE, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_FIREDAMAGE, minDamage = 0, maxDamage = -100, range = 7, length = 6, spread = 0, effect = CONST_ME_HITBYFIRE, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/aftershock.lua b/data-otservbr-global/monster/quests/heart_of_destruction/aftershock.lua index 936e8dad57b..04c1b3a2589 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/aftershock.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/aftershock.lua @@ -70,7 +70,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -800 }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -350, maxDamage = -900, length = 10, spread = 1, effect = CONST_ME_BIGCLOUDS, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -350, maxDamage = -900, length = 10, spread = 0, effect = CONST_ME_BIGCLOUDS, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -250, maxDamage = -500, radius = 4, effect = CONST_ME_SMALLCLOUDS, target = true }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -250, maxDamage = -750, radius = 8, effect = CONST_ME_BLOCKHIT, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -150, maxDamage = -400, radius = 5, effect = CONST_ME_MAGIC_BLUE, target = true }, diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/anomaly.lua b/data-otservbr-global/monster/quests/heart_of_destruction/anomaly.lua index cfc30506c50..2d6c0e44405 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/anomaly.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/anomaly.lua @@ -113,8 +113,8 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -300, maxDamage = -1400 }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -600, radius = 4, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = true }, { name = "anomaly wave", interval = 2000, chance = 25, minDamage = -500, maxDamage = -900, target = false }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = -600, maxDamage = -1000, length = 9, spread = 1, effect = CONST_ME_EXPLOSIONHIT, target = false }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -600, length = 9, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = -600, maxDamage = -1000, length = 9, spread = 0, effect = CONST_ME_EXPLOSIONHIT, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -600, length = 9, spread = 0, effect = CONST_ME_MAGIC_RED, target = false }, { name = "anomaly break", interval = 2000, chance = 40, target = false }, } diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/charged_anomaly.lua b/data-otservbr-global/monster/quests/heart_of_destruction/charged_anomaly.lua index b7606ff39af..075c308d7df 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/charged_anomaly.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/charged_anomaly.lua @@ -70,8 +70,8 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -900, maxDamage = -2100 }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -500, maxDamage = -900, radius = 3, effect = CONST_ME_BIGCLOUDS, target = false }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -350, maxDamage = -700, length = 7, spread = 1, effect = CONST_ME_ENERGYAREA, target = false }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -500, maxDamage = -800, length = 7, spread = 1, effect = CONST_ME_YELLOWENERGY, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -350, maxDamage = -700, length = 7, spread = 0, effect = CONST_ME_ENERGYAREA, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -500, maxDamage = -800, length = 7, spread = 0, effect = CONST_ME_YELLOWENERGY, target = false }, { name = "anomaly break", interval = 2000, chance = 40, target = false }, { name = "charge vortex", interval = 9000, chance = 100, target = false }, } diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/charging_outburst.lua b/data-otservbr-global/monster/quests/heart_of_destruction/charging_outburst.lua index bb1ae1d2e9e..273ab8f579e 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/charging_outburst.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/charging_outburst.lua @@ -72,7 +72,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -300, maxDamage = -1800 }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -500, radius = 3, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = -450, maxDamage = -900, radius = 8, effect = CONST_ME_BLOCKHIT, target = false }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = -600, maxDamage = -1000, length = 8, spread = 1, effect = CONST_ME_BLOCKHIT, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = -600, maxDamage = -1000, length = 8, spread = 0, effect = CONST_ME_BLOCKHIT, target = false }, { name = "anomaly break", interval = 2000, chance = 40, target = false }, { name = "outburst explode", interval = 10000, chance = 100, minDamage = -1500, maxDamage = -2000, target = false }, } diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/depolarized_crackler.lua b/data-otservbr-global/monster/quests/heart_of_destruction/depolarized_crackler.lua index 478feac779f..e99796bbbdd 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/depolarized_crackler.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/depolarized_crackler.lua @@ -72,7 +72,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -400 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -180, maxDamage = -500, radius = 6, shootEffect = CONST_ANI_ENERGYBALL, effect = CONST_ME_LOSEENERGY, target = true }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -300, maxDamage = -700, length = 10, spread = 1, effect = CONST_ME_TELEPORT, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -300, maxDamage = -700, length = 10, spread = 0, effect = CONST_ME_TELEPORT, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -180, maxDamage = -350, radius = 8, effect = CONST_ME_POFF, target = false }, } diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/eradicator.lua b/data-otservbr-global/monster/quests/heart_of_destruction/eradicator.lua index caaff64e705..d81c9b4faf1 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/eradicator.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/eradicator.lua @@ -103,8 +103,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -300, maxDamage = -1800 }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -600, maxDamage = -1000, length = 8, spread = 1, effect = CONST_ME_BLOCKHIT, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -600, maxDamage = -1000, length = 8, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -600, maxDamage = -1000, length = 8, spread = 0, effect = CONST_ME_BLOCKHIT, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -600, maxDamage = -1000, length = 8, spread = 0, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -450, maxDamage = -900, radius = 8, effect = CONST_ME_BLOCKHIT, target = false }, { name = "big energy wave", interval = 2000, chance = 20, minDamage = -700, maxDamage = -1000, target = false }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -600, radius = 4, effect = CONST_ME_ENERGYHIT, target = true }, diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/eradicator2.lua b/data-otservbr-global/monster/quests/heart_of_destruction/eradicator2.lua index 218b861b665..14b92badfbe 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/eradicator2.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/eradicator2.lua @@ -103,7 +103,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -300, maxDamage = -1800 }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -600, maxDamage = -1000, length = 8, spread = 1, effect = CONST_ME_BLOCKHIT, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -600, maxDamage = -1000, length = 8, spread = 0, effect = CONST_ME_BLOCKHIT, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -450, maxDamage = -900, radius = 8, effect = CONST_ME_BLOCKHIT, target = false }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_HOLYDAMAGE, minDamage = -300, maxDamage = -600, radius = 4, shootEffect = CONST_ANI_SMALLHOLY, effect = CONST_ME_HOLYDAMAGE, target = true }, { name = "big lifedrain wave", interval = 2000, chance = 20, minDamage = -700, maxDamage = -1000, target = false }, diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/foreshock.lua b/data-otservbr-global/monster/quests/heart_of_destruction/foreshock.lua index 6ed245a3a67..99f5be41e19 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/foreshock.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/foreshock.lua @@ -71,11 +71,11 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -400, maxDamage = -1000 }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -350, maxDamage = -800, length = 10, spread = 1, effect = CONST_ME_LOSEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -350, maxDamage = -800, length = 10, spread = 0, effect = CONST_ME_LOSEENERGY, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -400, maxDamage = -1000, radius = 8, effect = CONST_ME_HITAREA, target = false }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = -350, maxDamage = -600, length = 10, spread = 1, effect = CONST_ME_BLOCKHIT, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = -350, maxDamage = -600, length = 10, spread = 0, effect = CONST_ME_BLOCKHIT, target = false }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_HOLYDAMAGE, minDamage = -350, maxDamage = -800, radius = 4, effect = CONST_ME_HOLYDAMAGE, target = true }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = -150, maxDamage = -300, length = 2, spread = 1, effect = CONST_ME_HITAREA, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = -150, maxDamage = -300, length = 2, spread = 0, effect = CONST_ME_HITAREA, target = false }, { name = "anomaly break", interval = 2000, chance = 40, target = false }, } diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/greed.lua b/data-otservbr-global/monster/quests/heart_of_destruction/greed.lua index 4803ecd25fa..31d99df683f 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/greed.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/greed.lua @@ -67,7 +67,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -940 }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -600, radius = 6, shootEffect = CONST_ANI_ENERGYBALL, effect = CONST_ME_LOSEENERGY, target = true }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -300, maxDamage = -700, length = 9, spread = 1, effect = CONST_ME_TELEPORT, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -300, maxDamage = -700, length = 9, spread = 0, effect = CONST_ME_TELEPORT, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, radius = 7, effect = CONST_ME_POFF, target = false }, { name = "anomaly break", interval = 2000, chance = 40, target = false }, } diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/outburst.lua b/data-otservbr-global/monster/quests/heart_of_destruction/outburst.lua index ee0e51bed30..c40159545ed 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/outburst.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/outburst.lua @@ -96,8 +96,8 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -300, maxDamage = -1800 }, { name = "big energy purple wave", interval = 2000, chance = 25, minDamage = -700, maxDamage = -1300, target = false }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -600, radius = 4, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_ENERGYAREA, target = true }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = -800, maxDamage = -1300, length = 8, spread = 1, effect = CONST_ME_HITAREA, target = false }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_LIFEDRAIN, minDamage = -600, maxDamage = -900, length = 8, spread = 1, effect = CONST_ME_MAGIC_BLUE, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = -800, maxDamage = -1300, length = 8, spread = 0, effect = CONST_ME_HITAREA, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_LIFEDRAIN, minDamage = -600, maxDamage = -900, length = 8, spread = 0, effect = CONST_ME_MAGIC_BLUE, target = false }, { name = "big skill reducer", interval = 2000, chance = 25, target = false }, { name = "anomaly break", interval = 2000, chance = 40, target = false }, } diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/overcharge.lua b/data-otservbr-global/monster/quests/heart_of_destruction/overcharge.lua index 63b060a73f4..0a22923ae94 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/overcharge.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/overcharge.lua @@ -72,7 +72,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -500 }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -500, radius = 5, shootEffect = CONST_ANI_ENERGYBALL, effect = CONST_ME_LOSEENERGY, target = true }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -400, radius = 7, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -300, maxDamage = -670, length = 9, spread = 1, effect = CONST_ME_TELEPORT, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -300, maxDamage = -670, length = 9, spread = 0, effect = CONST_ME_TELEPORT, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/realityquake.lua b/data-otservbr-global/monster/quests/heart_of_destruction/realityquake.lua index 8b10d2c21c0..c9d7601584f 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/realityquake.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/realityquake.lua @@ -91,8 +91,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -400, maxDamage = -1000 }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -350, maxDamage = -800, length = 10, spread = 1, effect = CONST_ME_ENERGYAREA, target = false }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = -350, maxDamage = -800, length = 10, spread = 1, effect = CONST_ME_BLOCKHIT, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -350, maxDamage = -800, length = 10, spread = 0, effect = CONST_ME_ENERGYAREA, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = -350, maxDamage = -800, length = 10, spread = 0, effect = CONST_ME_BLOCKHIT, target = false }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = -240, maxDamage = -600, radius = 5, effect = CONST_ME_POFF, target = true }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_HOLYDAMAGE, minDamage = -240, maxDamage = -600, radius = 5, shootEffect = CONST_ANI_HOLY, effect = CONST_ME_HOLYDAMAGE, target = true }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_EARTHDAMAGE, minDamage = -200, maxDamage = -450, length = 4, spread = 2, effect = CONST_ME_MAGIC_RED, target = false }, diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/rupture.lua b/data-otservbr-global/monster/quests/heart_of_destruction/rupture.lua index d3bb594dfa0..5d68108bba4 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/rupture.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/rupture.lua @@ -97,10 +97,10 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -250, maxDamage = -1000 }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -350, maxDamage = -800, length = 10, spread = 1, effect = CONST_ME_LOSEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -350, maxDamage = -800, length = 10, spread = 0, effect = CONST_ME_LOSEENERGY, target = false }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_DEATHDAMAGE, minDamage = -150, maxDamage = -300, radius = 4, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_SMALLCLOUDS, target = true }, { name = "rupture wave", interval = 2000, chance = 20, minDamage = -700, maxDamage = -1100, target = false }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -600, length = 9, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -600, length = 9, spread = 0, effect = CONST_ME_MAGIC_RED, target = false }, { name = "anomaly break", interval = 2000, chance = 40, target = false }, } diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/the_destruction.lua b/data-otservbr-global/monster/quests/heart_of_destruction/the_destruction.lua index 7d4b7aa87d8..b80789846b5 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/the_destruction.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/the_destruction.lua @@ -72,10 +72,10 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -1393 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -600, radius = 4, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_YELLOWENERGY, target = true }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -400, maxDamage = -800, radius = 4, shootEffect = CONST_ANI_ENERGYBALL, effect = CONST_ME_EXPLOSIONAREA, target = true }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -200, maxDamage = -400, length = 10, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -200, maxDamage = -400, length = 10, spread = 0, effect = CONST_ME_MAGIC_RED, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, radius = 8, effect = CONST_ME_MAGIC_RED, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -500, maxDamage = -900, length = 10, spread = 1, effect = CONST_ME_BLOCKHIT, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -500, maxDamage = -900, length = 10, spread = 1, effect = CONST_ME_EXPLOSIONHIT, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -500, maxDamage = -900, length = 10, spread = 0, effect = CONST_ME_BLOCKHIT, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -500, maxDamage = -900, length = 10, spread = 0, effect = CONST_ME_EXPLOSIONHIT, target = false }, { name = "anomaly break", interval = 2000, chance = 40, target = false }, { name = "destruction summon", interval = 2000, chance = 20, target = false }, } diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/the_hunger.lua b/data-otservbr-global/monster/quests/heart_of_destruction/the_hunger.lua index 7155aee3dc4..e796dbcd2a8 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/the_hunger.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/the_hunger.lua @@ -72,8 +72,8 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -962 }, { name = "practise fire wave", interval = 2000, chance = 20, minDamage = -600, maxDamage = -900, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, radius = 8, effect = CONST_ME_MAGIC_RED, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -700, maxDamage = -1100, length = 10, spread = 1, effect = CONST_ME_EXPLOSIONHIT, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -200, maxDamage = -400, length = 10, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -700, maxDamage = -1100, length = 10, spread = 0, effect = CONST_ME_EXPLOSIONHIT, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -200, maxDamage = -400, length = 10, spread = 0, effect = CONST_ME_MAGIC_RED, target = false }, { name = "anomaly break", interval = 2000, chance = 40, target = false }, { name = "hunger summon", interval = 2000, chance = 20, target = false }, } diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/the_rage.lua b/data-otservbr-global/monster/quests/heart_of_destruction/the_rage.lua index 855b599c64c..9a5c3dc1124 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/the_rage.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/the_rage.lua @@ -71,11 +71,11 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -740 }, { name = "big death wave", interval = 2000, chance = 20, minDamage = -600, maxDamage = -900, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -200, maxDamage = -400, length = 10, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -200, maxDamage = -400, length = 10, spread = 0, effect = CONST_ME_MAGIC_RED, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -600, radius = 4, effect = CONST_ME_SMALLCLOUDS, target = true }, { name = "big explosion wave", interval = 2000, chance = 20, minDamage = -600, maxDamage = -900, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, radius = 8, effect = CONST_ME_MAGIC_RED, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -600, length = 10, spread = 1, effect = CONST_ME_YELLOW_RINGS, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -600, length = 10, spread = 0, effect = CONST_ME_YELLOW_RINGS, target = false }, { name = "anomaly break", interval = 2000, chance = 40, target = false }, { name = "rage summon", interval = 2000, chance = 20, target = false }, } diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/unstable_spark.lua b/data-otservbr-global/monster/quests/heart_of_destruction/unstable_spark.lua index 7c42a741242..4896767a0e0 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/unstable_spark.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/unstable_spark.lua @@ -71,7 +71,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -500 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -180, maxDamage = -500, radius = 6, shootEffect = CONST_ANI_ENERGYBALL, effect = CONST_ME_LOSEENERGY, target = true }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -300, maxDamage = -700, length = 10, spread = 1, effect = CONST_ME_TELEPORT, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -300, maxDamage = -700, length = 10, spread = 0, effect = CONST_ME_TELEPORT, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -180, maxDamage = -350, radius = 8, effect = CONST_ME_POFF, target = false }, } diff --git a/data-otservbr-global/monster/quests/heart_of_destruction/world_devourer.lua b/data-otservbr-global/monster/quests/heart_of_destruction/world_devourer.lua index d40bddcc6e2..c8e7198a2e1 100644 --- a/data-otservbr-global/monster/quests/heart_of_destruction/world_devourer.lua +++ b/data-otservbr-global/monster/quests/heart_of_destruction/world_devourer.lua @@ -100,10 +100,10 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -1600 }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -400, maxDamage = -800, length = 10, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -400, maxDamage = -800, length = 10, spread = 0, effect = CONST_ME_MAGIC_RED, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -400, maxDamage = -800, radius = 4, effect = CONST_ME_SMALLCLOUDS, target = true }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -400, maxDamage = -800, radius = 4, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_YELLOWENERGY, target = true }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -600, maxDamage = -1200, length = 10, spread = 1, effect = CONST_ME_LOSEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -600, maxDamage = -1200, length = 10, spread = 0, effect = CONST_ME_LOSEENERGY, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_LIFEDRAIN, radius = 8, effect = CONST_ME_MAGIC_RED, target = false }, { name = "anomaly break", interval = 2000, chance = 40, target = false }, { name = "devourer summon", interval = 2000, chance = 25, target = false }, diff --git a/data-otservbr-global/monster/quests/hero_of_rathleton/deep_terror.lua b/data-otservbr-global/monster/quests/hero_of_rathleton/deep_terror.lua index 401864b9341..debd09c9bb9 100644 --- a/data-otservbr-global/monster/quests/hero_of_rathleton/deep_terror.lua +++ b/data-otservbr-global/monster/quests/hero_of_rathleton/deep_terror.lua @@ -79,7 +79,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 130, attack = 100 }, { name = "combat", interval = 2000, chance = 32, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -400, radius = 8, effect = CONST_ME_CARNIPHILA, target = false }, { name = "combat", interval = 2000, chance = 19, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -700, range = 7, radius = 3, shootEffect = CONST_ANI_POISON, effect = CONST_ME_CARNIPHILA, target = true }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = -500, maxDamage = -1000, length = 7, spread = 1, effect = CONST_ME_GROUNDSHAKER, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_PHYSICALDAMAGE, minDamage = -500, maxDamage = -1000, length = 7, spread = 0, effect = CONST_ME_GROUNDSHAKER, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/hero_of_rathleton/glooth_horror.lua b/data-otservbr-global/monster/quests/hero_of_rathleton/glooth_horror.lua index 65ea9463d10..caee3d06233 100644 --- a/data-otservbr-global/monster/quests/hero_of_rathleton/glooth_horror.lua +++ b/data-otservbr-global/monster/quests/hero_of_rathleton/glooth_horror.lua @@ -70,7 +70,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 110, attack = 100 }, - { name = "combat", interval = 2000, chance = 9, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -700, length = 8, spread = 1, target = false }, + { name = "combat", interval = 2000, chance = 9, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -700, length = 8, spread = 0, effect = CONST_ME_MORTAREA, target = false }, { name = "drunk", interval = 2000, chance = 8, radius = 8, effect = CONST_ME_HITBYPOISON, target = false, duration = 15000 }, } diff --git a/data-otservbr-global/monster/quests/hero_of_rathleton/professor_maxxen.lua b/data-otservbr-global/monster/quests/hero_of_rathleton/professor_maxxen.lua index 8418c33451b..947a56a0187 100644 --- a/data-otservbr-global/monster/quests/hero_of_rathleton/professor_maxxen.lua +++ b/data-otservbr-global/monster/quests/hero_of_rathleton/professor_maxxen.lua @@ -89,8 +89,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 180, attack = 200 }, { name = "combat", interval = 2000, chance = 11, type = COMBAT_ENERGYDAMAGE, minDamage = -250, maxDamage = -500, radius = 8, effect = CONST_ME_ENERGYHIT, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_MANADRAIN, minDamage = -450, maxDamage = -1500, length = 8, spread = 1, effect = CONST_ME_TELEPORT, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -450, maxDamage = -500, length = 8, spread = 1, effect = CONST_ME_FIREATTACK, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_MANADRAIN, minDamage = -450, maxDamage = -1500, length = 8, spread = 0, effect = CONST_ME_TELEPORT, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -450, maxDamage = -500, length = 8, spread = 0, effect = CONST_ME_FIREATTACK, target = false }, { name = "war golem skill reducer", interval = 2000, chance = 22, target = false }, { name = "war golem electrify", interval = 2000, chance = 16, range = 2, target = false }, { name = "glooth fairy skill reducer", interval = 2000, chance = 20, target = false }, diff --git a/data-otservbr-global/monster/quests/hero_of_rathleton/weakened_glooth_horror.lua b/data-otservbr-global/monster/quests/hero_of_rathleton/weakened_glooth_horror.lua index 20d5c0824ae..511ea483b3d 100644 --- a/data-otservbr-global/monster/quests/hero_of_rathleton/weakened_glooth_horror.lua +++ b/data-otservbr-global/monster/quests/hero_of_rathleton/weakened_glooth_horror.lua @@ -70,7 +70,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 90, attack = 100 }, - { name = "combat", interval = 2000, chance = 17, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -600, length = 8, spread = 1, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 17, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -600, length = 8, spread = 0, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 2000, chance = 11, type = COMBAT_DEATHDAMAGE, minDamage = -200, maxDamage = -400, range = 1, shootEffect = CONST_ANI_POISON, target = true }, } diff --git a/data-otservbr-global/monster/quests/in_service_of_yalahar/azerus.lua b/data-otservbr-global/monster/quests/in_service_of_yalahar/azerus.lua index e54b6f8e6a8..19dc3668ab3 100644 --- a/data-otservbr-global/monster/quests/in_service_of_yalahar/azerus.lua +++ b/data-otservbr-global/monster/quests/in_service_of_yalahar/azerus.lua @@ -97,7 +97,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -900 }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_MANADRAIN, minDamage = 0, maxDamage = -3800, range = 7, radius = 4, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_BIGCLOUDS, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = 0, maxDamage = -524, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -300, maxDamage = -1050, length = 8, spread = 1, effect = CONST_ME_FIREATTACK, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -300, maxDamage = -1050, length = 8, spread = 0, effect = CONST_ME_FIREATTACK, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/in_service_of_yalahar/azerus2.lua b/data-otservbr-global/monster/quests/in_service_of_yalahar/azerus2.lua index c41f6312909..e5c88468ca0 100644 --- a/data-otservbr-global/monster/quests/in_service_of_yalahar/azerus2.lua +++ b/data-otservbr-global/monster/quests/in_service_of_yalahar/azerus2.lua @@ -93,7 +93,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -900 }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_MANADRAIN, minDamage = 0, maxDamage = -3800, range = 7, radius = 4, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_BIGCLOUDS, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = 0, maxDamage = -524, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -300, maxDamage = -1050, length = 8, spread = 1, effect = CONST_ME_FIREATTACK, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -300, maxDamage = -1050, length = 8, spread = 0, effect = CONST_ME_FIREATTACK, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/in_service_of_yalahar/inky.lua b/data-otservbr-global/monster/quests/in_service_of_yalahar/inky.lua index bcb266254fe..49025f4c6c4 100644 --- a/data-otservbr-global/monster/quests/in_service_of_yalahar/inky.lua +++ b/data-otservbr-global/monster/quests/in_service_of_yalahar/inky.lua @@ -77,7 +77,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -156, condition = { type = CONDITION_POISON, totalDamage = 2, interval = 4000 } }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -87, radius = 3, effect = CONST_ME_HITAREA, target = false }, - { name = "combat", interval = 2000, chance = 19, type = COMBAT_ICEDAMAGE, minDamage = 0, maxDamage = -80, radius = 3, shootEffect = CONST_ANI_POISON, target = false }, + { name = "combat", interval = 2000, chance = 19, type = COMBAT_ICEDAMAGE, minDamage = 0, maxDamage = -80, radius = 3, shootEffect = CONST_ANI_POISON, effect = CONST_ME_ICEAREA, target = false }, { name = "combat", interval = 2000, chance = 7, type = COMBAT_ICEDAMAGE, minDamage = -56, maxDamage = -87, radius = 4, effect = CONST_ME_ICEAREA, target = false }, { name = "quara constrictor electrify", interval = 2000, chance = 10, range = 1, target = false }, } diff --git a/data-otservbr-global/monster/quests/in_service_of_yalahar/rift_scythe.lua b/data-otservbr-global/monster/quests/in_service_of_yalahar/rift_scythe.lua index 7e9d4806dd6..ede090ca26d 100644 --- a/data-otservbr-global/monster/quests/in_service_of_yalahar/rift_scythe.lua +++ b/data-otservbr-global/monster/quests/in_service_of_yalahar/rift_scythe.lua @@ -67,9 +67,9 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -979 }, { name = "combat", interval = 2000, chance = 60, type = COMBAT_DEATHDAMAGE, minDamage = 0, maxDamage = -200, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = true }, - { name = "combat", interval = 2000, chance = 50, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -600, length = 7, spread = 1, target = false }, - { name = "combat", interval = 2000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -395, radius = 4, target = false }, - { name = "combat", interval = 3000, chance = 60, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -300, length = 7, spread = 1, effect = CONST_ME_EXPLOSIONAREA, target = false }, + { name = "combat", interval = 2000, chance = 50, type = COMBAT_LIFEDRAIN, minDamage = 0, maxDamage = -600, length = 7, spread = 0, effect = CONST_ME_DRAWBLOOD, target = false }, + { name = "combat", interval = 2000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -395, radius = 4, effect = CONST_ME_DRAWBLOOD, target = false }, + { name = "combat", interval = 3000, chance = 60, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -300, length = 7, spread = 0, effect = CONST_ME_EXPLOSIONAREA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/isle_of_evil/boogey.lua b/data-otservbr-global/monster/quests/isle_of_evil/boogey.lua index 56fa3d79415..fcb5a02388b 100644 --- a/data-otservbr-global/monster/quests/isle_of_evil/boogey.lua +++ b/data-otservbr-global/monster/quests/isle_of_evil/boogey.lua @@ -89,7 +89,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 1200, chance = 100, minDamage = 0, maxDamage = -120 }, { name = "combat", interval = 1500, chance = 30, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -30, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 1500, chance = 30, type = COMBAT_DEATHDAMAGE, minDamage = -12, maxDamage = -20, range = 7, radius = 4, shootEffect = CONST_ANI_FIRE, target = true }, + { name = "combat", interval = 1500, chance = 30, type = COMBAT_DEATHDAMAGE, minDamage = -12, maxDamage = -20, range = 7, radius = 4, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true }, { name = "combat", interval = 1500, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -20, maxDamage = -30, effect = CONST_ME_MORTAREA, target = false }, } diff --git a/data-otservbr-global/monster/quests/killing_in_the_name_of/bruise_payne.lua b/data-otservbr-global/monster/quests/killing_in_the_name_of/bruise_payne.lua index e81ca7aaa65..4c1a300527c 100644 --- a/data-otservbr-global/monster/quests/killing_in_the_name_of/bruise_payne.lua +++ b/data-otservbr-global/monster/quests/killing_in_the_name_of/bruise_payne.lua @@ -81,7 +81,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 15, type = COMBAT_DROWNDAMAGE, minDamage = -130, maxDamage = -237, radius = 6, effect = CONST_ME_SOUND_WHITE, target = false }, { name = "mutated bat curse", interval = 2000, chance = 10, target = false }, -- poison - { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 15, minDamage = -12, maxDamage = -12, length = 4, spread = 1, effect = CONST_ME_POISONAREA, target = false }, + { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 15, minDamage = -12, maxDamage = -12, length = 4, spread = 0, effect = CONST_ME_POISONAREA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/killing_in_the_name_of/zanakeph.lua b/data-otservbr-global/monster/quests/killing_in_the_name_of/zanakeph.lua index 35354843ab4..3c05a33fc1d 100644 --- a/data-otservbr-global/monster/quests/killing_in_the_name_of/zanakeph.lua +++ b/data-otservbr-global/monster/quests/killing_in_the_name_of/zanakeph.lua @@ -92,7 +92,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -0, maxDamage = -480 }, - { name = "combat", interval = 2000, chance = 5, type = COMBAT_PHYSICALDAMAGE, minDamage = -300, maxDamage = -400, range = 7, radius = 4, target = true }, + { name = "combat", interval = 2000, chance = 5, type = COMBAT_PHYSICALDAMAGE, minDamage = -300, maxDamage = -400, range = 7, radius = 4, effect = CONST_ME_HITAREA, target = true }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -125, maxDamage = -600, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_SMALLCLOUDS, target = false }, { name = "combat", interval = 2000, chance = 5, type = COMBAT_EARTHDAMAGE, minDamage = -100, maxDamage = -390, range = 7, radius = 4, shootEffect = CONST_ANI_POISON, effect = CONST_ME_POISONAREA, target = true }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_POISON, effect = CONST_ME_POISONAREA, target = true }, diff --git a/data-otservbr-global/monster/quests/kilmaresh/amenef_the_burning.lua b/data-otservbr-global/monster/quests/kilmaresh/amenef_the_burning.lua index 7326b1373cc..c73dd05ae33 100644 --- a/data-otservbr-global/monster/quests/kilmaresh/amenef_the_burning.lua +++ b/data-otservbr-global/monster/quests/kilmaresh/amenef_the_burning.lua @@ -101,7 +101,7 @@ monster.attacks = { { name = "firering", interval = 2000, chance = 10, minDamage = -300, maxDamage = -600, target = false }, { name = "firex", interval = 2000, chance = 15, minDamage = -450, maxDamage = -750, target = false }, { name = "combat", interval = 2000, chance = 17, type = COMBAT_FIREDAMAGE, minDamage = -300, maxDamage = -600, radius = 2, effect = CONST_ME_FIREATTACK, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -500, maxDamage = -750, length = 3, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -500, maxDamage = -750, length = 3, spread = 0, effect = CONST_ME_ENERGYHIT, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/mysterious_ornate_chest/reflection_of_mawhawk.lua b/data-otservbr-global/monster/quests/mysterious_ornate_chest/reflection_of_mawhawk.lua index 4a0f39e2506..707cb6cb5c4 100644 --- a/data-otservbr-global/monster/quests/mysterious_ornate_chest/reflection_of_mawhawk.lua +++ b/data-otservbr-global/monster/quests/mysterious_ornate_chest/reflection_of_mawhawk.lua @@ -86,9 +86,9 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -1000 }, { name = "melee", interval = 2000, chance = 100, skill = 90, attack = 80 }, - { name = "combat", interval = 2000, chance = 8, type = COMBAT_LIFEDRAIN, minDamage = -135, maxDamage = -280, range = 7, radius = 5, shootEffect = CONST_ANI_WHIRLWINDAXE, target = true }, + { name = "combat", interval = 2000, chance = 8, type = COMBAT_LIFEDRAIN, minDamage = -135, maxDamage = -280, range = 7, radius = 5, shootEffect = CONST_ANI_WHIRLWINDAXE, effect = CONST_ME_DRAWBLOOD, target = true }, { name = "combat", interval = 2000, chance = 8, type = COMBAT_PHYSICALDAMAGE, minDamage = -90, maxDamage = -500, range = 7, shootEffect = CONST_ANI_WHIRLWINDAXE, effect = CONST_ME_EXPLOSIONAREA, target = true }, - { name = "combat", interval = 1800, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -685, length = 7, spread = 1, effect = CONST_ME_STONES, target = false }, + { name = "combat", interval = 1800, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -685, length = 7, spread = 0, effect = CONST_ME_STONES, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/pits_of_inferno/dracola.lua b/data-otservbr-global/monster/quests/pits_of_inferno/dracola.lua index 44a5b38720d..c33ea29f3b9 100644 --- a/data-otservbr-global/monster/quests/pits_of_inferno/dracola.lua +++ b/data-otservbr-global/monster/quests/pits_of_inferno/dracola.lua @@ -94,7 +94,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -120, maxDamage = -750, range = 7, radius = 4, shootEffect = CONST_ANI_POISON, effect = CONST_ME_POISONAREA, target = true }, -- drown { name = "condition", type = CONDITION_DROWN, interval = 1000, chance = 20, length = 8, spread = 3, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -300, maxDamage = -870, range = 7, radius = 4, shootEffect = CONST_ANI_FIRE, target = true }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -300, maxDamage = -870, range = 7, radius = 4, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_HITAREA, target = true }, { name = "combat", interval = 3000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -750, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 1000, chance = 23, type = COMBAT_EARTHDAMAGE, minDamage = -50, maxDamage = -175, range = 7, radius = 4, shootEffect = CONST_ANI_POISON, effect = CONST_ME_POISONAREA, target = true }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -100, maxDamage = -200, range = 7, target = false }, diff --git a/data-otservbr-global/monster/quests/primal_ordeal_quest/the_end_of_days.lua b/data-otservbr-global/monster/quests/primal_ordeal_quest/the_end_of_days.lua index e30d4ddcb8e..8674c4e2bac 100644 --- a/data-otservbr-global/monster/quests/primal_ordeal_quest/the_end_of_days.lua +++ b/data-otservbr-global/monster/quests/primal_ordeal_quest/the_end_of_days.lua @@ -67,7 +67,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -750, maxDamage = -1750 }, { name = "combat", interval = 2700, chance = 37, type = COMBAT_FIREDAMAGE, minDamage = -950, maxDamage = -2000, length = 8, spread = 3, effect = CONST_ME_HITBYFIRE, target = false }, - { name = "combat", interval = 3300, chance = 37, type = COMBAT_PHYSICALDAMAGE, minDamage = -1100, maxDamage = -1600, length = 8, spread = 1, effect = CONST_ME_EXPLOSIONHIT, target = false }, + { name = "combat", interval = 3300, chance = 37, type = COMBAT_PHYSICALDAMAGE, minDamage = -1100, maxDamage = -1600, length = 8, spread = 0, effect = CONST_ME_EXPLOSIONHIT, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/roshamuul/horadron.lua b/data-otservbr-global/monster/quests/roshamuul/horadron.lua index 6e9a8931a77..b25a8891c13 100644 --- a/data-otservbr-global/monster/quests/roshamuul/horadron.lua +++ b/data-otservbr-global/monster/quests/roshamuul/horadron.lua @@ -108,8 +108,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 110, attack = 100 }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_EARTHDAMAGE, minDamage = -600, maxDamage = -1000, length = 8, spread = 1, effect = CONST_ME_HITBYPOISON, target = false }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_EARTHDAMAGE, minDamage = -600, maxDamage = -1000, length = 8, spread = 1, effect = CONST_ME_HITBYPOISON, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_EARTHDAMAGE, minDamage = -600, maxDamage = -1000, length = 8, spread = 0, effect = CONST_ME_HITBYPOISON, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_EARTHDAMAGE, minDamage = -600, maxDamage = -1000, length = 8, spread = 0, effect = CONST_ME_HITBYPOISON, target = false }, { name = "combat", interval = 2000, chance = 30, type = COMBAT_EARTHDAMAGE, minDamage = -100, maxDamage = -235, range = 7, shootEffect = CONST_ANI_POISON, effect = CONST_ME_HITBYPOISON, target = true }, { name = "combat", interval = 2000, chance = 25, type = COMBAT_EARTHDAMAGE, minDamage = -100, maxDamage = -250, radius = 3, effect = CONST_ME_POISONAREA, target = false }, -- poison diff --git a/data-otservbr-global/monster/quests/roshamuul/terofar.lua b/data-otservbr-global/monster/quests/roshamuul/terofar.lua index a06c7dadba5..efd6a2486a8 100644 --- a/data-otservbr-global/monster/quests/roshamuul/terofar.lua +++ b/data-otservbr-global/monster/quests/roshamuul/terofar.lua @@ -104,7 +104,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 180, attack = 100 }, - { name = "combat", interval = 2000, chance = 30, type = COMBAT_DEATHDAMAGE, minDamage = -700, maxDamage = -1500, length = 8, spread = 1, effect = CONST_ME_SMALLCLOUDS, target = false }, + { name = "combat", interval = 2000, chance = 30, type = COMBAT_DEATHDAMAGE, minDamage = -700, maxDamage = -1500, length = 8, spread = 0, effect = CONST_ME_SMALLCLOUDS, target = false }, { name = "combat", interval = 2000, chance = 18, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -750, range = 7, radius = 1, shootEffect = CONST_ANI_WHIRLWINDAXE, target = true }, } @@ -112,7 +112,7 @@ monster.defenses = { defense = 65, armor = 55, -- mitigation = ???, - { name = "combat", interval = 2000, chance = 30, type = COMBAT_HEALING, minDamage = 300, maxDamage = 500, radius = 8, target = false }, + { name = "combat", interval = 2000, chance = 30, type = COMBAT_HEALING, minDamage = 300, maxDamage = 500, radius = 8, effect = CONST_ME_MAGIC_BLUE, target = false }, { name = "speed", interval = 2000, chance = 18, speedChange = 784, effect = CONST_ME_MAGIC_GREEN, target = false, duration = 7000 }, } diff --git a/data-otservbr-global/monster/quests/soul_war/aspect_of_power.lua b/data-otservbr-global/monster/quests/soul_war/aspect_of_power.lua index d3b40f599e8..8ff012c96ef 100644 --- a/data-otservbr-global/monster/quests/soul_war/aspect_of_power.lua +++ b/data-otservbr-global/monster/quests/soul_war/aspect_of_power.lua @@ -61,8 +61,8 @@ monster.voices = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -800 }, - { name = "combat", interval = 1700, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -400, maxDamage = -950, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, target = true }, - { name = "combat", interval = 1700, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -850, length = 4, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 1700, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -400, maxDamage = -950, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, effect = CONST_ME_HITBYPOISON, target = true }, + { name = "combat", interval = 1700, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -850, length = 4, spread = 0, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 1700, chance = 35, type = COMBAT_DEATHDAMAGE, minDamage = -700, maxDamage = -1550, radius = 3, effect = CONST_ME_MORTAREA, target = false }, { name = "outfit", interval = 1000, chance = 5, radius = 8, effect = CONST_ME_LOSEENERGY, target = false, duration = 5000, outfitMonster = "goshnar's hatred" }, { name = "outfit", interval = 1000, chance = 5, radius = 8, effect = CONST_ME_LOSEENERGY, target = false, duration = 5000, outfitMonster = "goshnar's greed" }, diff --git a/data-otservbr-global/monster/quests/soul_war/dreadful_harvester.lua b/data-otservbr-global/monster/quests/soul_war/dreadful_harvester.lua index 3e21b97a41e..64bd8a98008 100644 --- a/data-otservbr-global/monster/quests/soul_war/dreadful_harvester.lua +++ b/data-otservbr-global/monster/quests/soul_war/dreadful_harvester.lua @@ -67,9 +67,9 @@ monster.voices = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -320 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -165, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -350, maxDamage = -720, length = 8, spread = 1, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -300, length = 7, spread = 1, effect = CONST_ME_EXPLOSIONAREA, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -225, maxDamage = -275, radius = 4, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -350, maxDamage = -720, length = 8, spread = 0, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -300, length = 7, spread = 0, effect = CONST_ME_EXPLOSIONAREA, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -225, maxDamage = -275, radius = 4, effect = CONST_ME_MORTAREA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/soul_war/goshnars_cruelty.lua b/data-otservbr-global/monster/quests/soul_war/goshnars_cruelty.lua index 0a837abd59b..40957e0bde4 100644 --- a/data-otservbr-global/monster/quests/soul_war/goshnars_cruelty.lua +++ b/data-otservbr-global/monster/quests/soul_war/goshnars_cruelty.lua @@ -108,7 +108,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -5000 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -1400, maxDamage = -1800, length = 8, spread = 1, effect = CONST_ME_EXPLOSIONAREA, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -1400, maxDamage = -1800, length = 8, spread = 0, effect = CONST_ME_EXPLOSIONAREA, target = false }, { name = "singlecloudchain", interval = 6000, chance = 40, minDamage = -1700, maxDamage = -2500, range = 6, effect = CONST_ME_ENERGYHIT, target = true }, { name = "combat", interval = 2000, chance = 30, type = COMBAT_PHYSICALDAMAGE, minDamage = -1000, maxDamage = -2500, range = 7, radius = 4, shootEffect = CONST_ANI_EXPLOSION, effect = CONST_ME_DRAWBLOOD, target = true }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_DEATHDAMAGE, minDamage = -1500, maxDamage = -3000, radius = 3, effect = CONST_ME_GROUNDSHAKER, target = false }, diff --git a/data-otservbr-global/monster/quests/soul_war/goshnars_greed.lua b/data-otservbr-global/monster/quests/soul_war/goshnars_greed.lua index 0c8ddbbac42..171f963f5ff 100644 --- a/data-otservbr-global/monster/quests/soul_war/goshnars_greed.lua +++ b/data-otservbr-global/monster/quests/soul_war/goshnars_greed.lua @@ -107,7 +107,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -5000 }, { name = "combat", interval = 2000, chance = 30, type = COMBAT_DEATHDAMAGE, minDamage = -1500, maxDamage = -2000, range = 7, radius = 5, shootEffect = CONST_ANI_DEATH, effect = CONST_ME_GROUNDSHAKER, target = true }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -1200, maxDamage = -2200, length = 8, spread = 1, effect = CONST_ME_FIREAREA, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -1200, maxDamage = -2200, length = 8, spread = 0, effect = CONST_ME_FIREAREA, target = false }, { name = "singlecloudchain", interval = 6000, chance = 40, minDamage = -1300, maxDamage = -1700, range = 6, effect = CONST_ME_ENERGYHIT, target = true }, } diff --git a/data-otservbr-global/monster/quests/soul_war/goshnars_hatred.lua b/data-otservbr-global/monster/quests/soul_war/goshnars_hatred.lua index d7bc44dda3c..fa5ccf36984 100644 --- a/data-otservbr-global/monster/quests/soul_war/goshnars_hatred.lua +++ b/data-otservbr-global/monster/quests/soul_war/goshnars_hatred.lua @@ -109,7 +109,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -5000 }, { name = "combat", interval = 2000, chance = 30, type = COMBAT_DEATHDAMAGE, minDamage = -1350, maxDamage = -1700, range = 7, radius = 5, shootEffect = CONST_ANI_DEATH, effect = CONST_ME_GROUNDSHAKER, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -1400, maxDamage = -2200, length = 8, spread = 1, effect = CONST_ME_GROUNDSHAKER, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -1400, maxDamage = -2200, length = 8, spread = 0, effect = CONST_ME_GROUNDSHAKER, target = false }, { name = "singlecloudchain", interval = 6000, chance = 40, minDamage = -1700, maxDamage = -2500, range = 6, effect = CONST_ME_ENERGYHIT, target = true }, } diff --git a/data-otservbr-global/monster/quests/soul_war/goshnars_megalomania.lua b/data-otservbr-global/monster/quests/soul_war/goshnars_megalomania.lua index 2949d1b42c3..7346e628cfc 100644 --- a/data-otservbr-global/monster/quests/soul_war/goshnars_megalomania.lua +++ b/data-otservbr-global/monster/quests/soul_war/goshnars_megalomania.lua @@ -112,9 +112,9 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -8000 }, { name = "combat", interval = 2000, chance = 30, type = COMBAT_PHYSICALDAMAGE, minDamage = -2950, maxDamage = -4400, range = 7, radius = 3, shootEffect = CONST_ANI_DEATH, effect = CONST_ME_MORTAREA, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -3000, maxDamage = -5500, length = 8, spread = 1, effect = CONST_ME_INSECTS, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -3000, maxDamage = -5500, length = 8, spread = 0, effect = CONST_ME_INSECTS, target = false }, { name = "singlecloudchain", interval = 6000, chance = 40, minDamage = -3300, maxDamage = -5500, range = 6, effect = CONST_ME_ENERGYHIT, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -3300, maxDamage = -5200, length = 10, spread = 1, effect = CONST_ME_BLUE_GHOST, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -3300, maxDamage = -5200, length = 10, spread = 0, effect = CONST_ME_BLUE_GHOST, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/soul_war/goshnars_spite.lua b/data-otservbr-global/monster/quests/soul_war/goshnars_spite.lua index 77f44a12b8b..19d35cd1af7 100644 --- a/data-otservbr-global/monster/quests/soul_war/goshnars_spite.lua +++ b/data-otservbr-global/monster/quests/soul_war/goshnars_spite.lua @@ -107,10 +107,10 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -5000 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -1400, maxDamage = -2200, length = 8, spread = 1, effect = CONST_ME_GREEN_RINGS, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -1400, maxDamage = -2200, length = 8, spread = 0, effect = CONST_ME_GREEN_RINGS, target = false }, { name = "singlecloudchain", interval = 6000, chance = 40, minDamage = -1700, maxDamage = -1900, range = 6, effect = CONST_ME_ENERGYHIT, target = true }, { name = "combat", interval = 2000, chance = 30, type = COMBAT_EARTHDAMAGE, minDamage = -1200, maxDamage = -3500, range = 7, radius = 4, shootEffect = CONST_ANI_POISON, effect = CONST_ME_GREEN_RINGS, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -1400, maxDamage = -2200, length = 8, spread = 1, effect = CONST_ME_GREEN_RINGS, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -1400, maxDamage = -2200, length = 8, spread = 0, effect = CONST_ME_GREEN_RINGS, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/soul_war/hateful_soul.lua b/data-otservbr-global/monster/quests/soul_war/hateful_soul.lua index b3d4c74ef61..4aad05f3f33 100644 --- a/data-otservbr-global/monster/quests/soul_war/hateful_soul.lua +++ b/data-otservbr-global/monster/quests/soul_war/hateful_soul.lua @@ -61,8 +61,8 @@ monster.voices = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -800 }, - { name = "combat", interval = 1700, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -400, maxDamage = -950, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, target = true }, - { name = "combat", interval = 1700, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -850, length = 4, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 1700, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -400, maxDamage = -950, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, effect = CONST_ME_HITBYPOISON, target = true }, + { name = "combat", interval = 1700, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -850, length = 4, spread = 0, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 1700, chance = 35, type = COMBAT_DEATHDAMAGE, minDamage = -700, maxDamage = -1550, radius = 3, effect = CONST_ME_MORTAREA, target = false }, } diff --git a/data-otservbr-global/monster/quests/soul_war/malicious_soul.lua b/data-otservbr-global/monster/quests/soul_war/malicious_soul.lua index 1eeccc77000..c07b8106ce7 100644 --- a/data-otservbr-global/monster/quests/soul_war/malicious_soul.lua +++ b/data-otservbr-global/monster/quests/soul_war/malicious_soul.lua @@ -61,8 +61,8 @@ monster.voices = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -500 }, - { name = "combat", interval = 1700, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -150, maxDamage = -550, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, target = true }, - { name = "combat", interval = 1700, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -150, maxDamage = -550, length = 4, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 1700, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -150, maxDamage = -550, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, effect = CONST_ME_HITBYPOISON, target = true }, + { name = "combat", interval = 1700, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -150, maxDamage = -550, length = 4, spread = 0, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 1700, chance = 35, type = COMBAT_DEATHDAMAGE, minDamage = -150, maxDamage = -550, radius = 3, effect = CONST_ME_MORTAREA, target = false }, } diff --git a/data-otservbr-global/monster/quests/svargrond_arena/warlord/deathbringer.lua b/data-otservbr-global/monster/quests/svargrond_arena/warlord/deathbringer.lua index b6fa6be8396..c99f27f48aa 100644 --- a/data-otservbr-global/monster/quests/svargrond_arena/warlord/deathbringer.lua +++ b/data-otservbr-global/monster/quests/svargrond_arena/warlord/deathbringer.lua @@ -70,7 +70,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -465 }, - { name = "combat", interval = 1000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -80, maxDamage = -120, range = 7, radius = 4, shootEffect = CONST_ANI_FIRE, target = true }, + { name = "combat", interval = 1000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -80, maxDamage = -120, range = 7, radius = 4, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true }, { name = "combat", interval = 3000, chance = 17, type = COMBAT_FIREDAMAGE, minDamage = -300, maxDamage = -450, length = 8, spread = 3, effect = CONST_ME_FIREAREA, target = false }, { name = "combat", interval = 2000, chance = 12, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -450, length = 8, spread = 3, effect = CONST_ME_POISONAREA, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -80, maxDamage = -100, radius = 6, effect = CONST_ME_POFF, target = false }, diff --git a/data-otservbr-global/monster/quests/svargrond_arena/warlord/fallen_mooh'tah_master_ghar.lua b/data-otservbr-global/monster/quests/svargrond_arena/warlord/fallen_mooh'tah_master_ghar.lua index cc2272f4346..3544b13dab0 100644 --- a/data-otservbr-global/monster/quests/svargrond_arena/warlord/fallen_mooh'tah_master_ghar.lua +++ b/data-otservbr-global/monster/quests/svargrond_arena/warlord/fallen_mooh'tah_master_ghar.lua @@ -69,12 +69,12 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -525, condition = { type = CONDITION_POISON, totalDamage = 18, interval = 4000 } }, - { name = "combat", interval = 6000, chance = 30, type = COMBAT_FIREDAMAGE, minDamage = -80, maxDamage = -300, length = 8, spread = 1, effect = CONST_ME_FIREAREA, target = false }, - { name = "combat", interval = 3000, chance = 45, type = COMBAT_FIREDAMAGE, minDamage = -80, maxDamage = -400, radius = 5, shootEffect = CONST_ANI_FIRE, target = true }, + { name = "combat", interval = 6000, chance = 30, type = COMBAT_FIREDAMAGE, minDamage = -80, maxDamage = -300, length = 8, spread = 0, effect = CONST_ME_FIREAREA, target = false }, + { name = "combat", interval = 3000, chance = 45, type = COMBAT_FIREDAMAGE, minDamage = -80, maxDamage = -400, radius = 5, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true }, { name = "combat", interval = 4000, chance = 30, type = COMBAT_DEATHDAMAGE, minDamage = -80, maxDamage = -270, shootEffect = CONST_ANI_DEATH, effect = CONST_ME_MORTAREA, target = false }, -- poison { name = "condition", type = CONDITION_POISON, interval = 4500, chance = 40, minDamage = -10, maxDamage = -200, range = 10, shootEffect = CONST_ANI_POISON, target = false }, - { name = "combat", interval = 5000, chance = 30, type = COMBAT_EARTHDAMAGE, minDamage = -60, maxDamage = -300, length = 8, spread = 1, effect = CONST_ME_POISONAREA, target = false }, + { name = "combat", interval = 5000, chance = 30, type = COMBAT_EARTHDAMAGE, minDamage = -60, maxDamage = -300, length = 8, spread = 0, effect = CONST_ME_POISONAREA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/svargrond_arena/warlord/the_obliverator.lua b/data-otservbr-global/monster/quests/svargrond_arena/warlord/the_obliverator.lua index d0c51748c4c..d154022d367 100644 --- a/data-otservbr-global/monster/quests/svargrond_arena/warlord/the_obliverator.lua +++ b/data-otservbr-global/monster/quests/svargrond_arena/warlord/the_obliverator.lua @@ -76,7 +76,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -700 }, { name = "combat", interval = 1000, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -250, range = 5, radius = 7, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true }, - { name = "combat", interval = 3000, chance = 30, type = COMBAT_ENERGYDAMAGE, minDamage = -200, maxDamage = -500, length = 8, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 3000, chance = 30, type = COMBAT_ENERGYDAMAGE, minDamage = -200, maxDamage = -500, length = 8, spread = 0, effect = CONST_ME_ENERGYHIT, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_curse_spreads/black_vixen.lua b/data-otservbr-global/monster/quests/the_curse_spreads/black_vixen.lua index aba13dc1391..214b8c6f2ce 100644 --- a/data-otservbr-global/monster/quests/the_curse_spreads/black_vixen.lua +++ b/data-otservbr-global/monster/quests/the_curse_spreads/black_vixen.lua @@ -107,7 +107,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -290 }, { name = "combat", interval = 1000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = 100, maxDamage = 720, range = 7, shootEffect = CONST_ANI_THROWINGSTAR, target = false }, { name = "speed", interval = 2000, chance = 15, speedChange = -600, range = 7, effect = CONST_ME_MAGIC_RED, target = false, duration = 20000 }, - { name = "combat", interval = 1000, chance = 14, type = COMBAT_DEATHDAMAGE, minDamage = -100, maxDamage = -700, length = 5, spread = 1, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 1000, chance = 14, type = COMBAT_DEATHDAMAGE, minDamage = -100, maxDamage = -700, length = 5, spread = 0, effect = CONST_ME_MORTAREA, target = false }, { name = "outfit", interval = 1000, chance = 1, radius = 1, target = true, duration = 2000, outfitMonster = "werewolf" }, } diff --git a/data-otservbr-global/monster/quests/the_curse_spreads/bloodback.lua b/data-otservbr-global/monster/quests/the_curse_spreads/bloodback.lua index 09cb8f45706..3b9dd8e0eea 100644 --- a/data-otservbr-global/monster/quests/the_curse_spreads/bloodback.lua +++ b/data-otservbr-global/monster/quests/the_curse_spreads/bloodback.lua @@ -101,7 +101,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -290 }, { name = "combat", interval = 1000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -420, range = 7, target = false }, { name = "speed", interval = 2000, chance = 15, speedChange = -600, range = 7, effect = CONST_ME_MAGIC_RED, target = false, duration = 20000 }, - { name = "combat", interval = 1000, chance = 14, type = COMBAT_DEATHDAMAGE, minDamage = -100, maxDamage = -200, length = 5, spread = 1, target = false }, + { name = "combat", interval = 1000, chance = 14, type = COMBAT_DEATHDAMAGE, minDamage = -100, maxDamage = -200, length = 5, spread = 0, effect = CONST_ME_MORTAREA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_curse_spreads/feroxa2.lua b/data-otservbr-global/monster/quests/the_curse_spreads/feroxa2.lua index a40b803565d..4c66688dbd4 100644 --- a/data-otservbr-global/monster/quests/the_curse_spreads/feroxa2.lua +++ b/data-otservbr-global/monster/quests/the_curse_spreads/feroxa2.lua @@ -72,7 +72,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -1400, maxDamage = -1800 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -700, maxDamage = -1050, radius = 6, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_MANADRAIN, minDamage = -700, maxDamage = -1250, length = 9, spread = 1, effect = CONST_ME_MAGIC_BLUE, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_MANADRAIN, minDamage = -700, maxDamage = -1250, length = 9, spread = 0, effect = CONST_ME_MAGIC_BLUE, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -450, maxDamage = -700, radius = 7, effect = CONST_ME_BLOCKHIT, target = false }, } diff --git a/data-otservbr-global/monster/quests/the_curse_spreads/feroxa3.lua b/data-otservbr-global/monster/quests/the_curse_spreads/feroxa3.lua index f702b93764a..8020a2664cc 100644 --- a/data-otservbr-global/monster/quests/the_curse_spreads/feroxa3.lua +++ b/data-otservbr-global/monster/quests/the_curse_spreads/feroxa3.lua @@ -72,7 +72,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -1400, maxDamage = -1800 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -700, maxDamage = -1250, radius = 6, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_MANADRAIN, minDamage = -700, maxDamage = -1250, length = 9, spread = 1, effect = CONST_ME_MAGIC_BLUE, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_MANADRAIN, minDamage = -700, maxDamage = -1250, length = 9, spread = 0, effect = CONST_ME_MAGIC_BLUE, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -700, maxDamage = -1250, range = 6, shootEffect = CONST_ANI_ARROW, effect = CONST_ME_EXPLOSIONAREA, target = true }, } diff --git a/data-otservbr-global/monster/quests/the_curse_spreads/feroxa4.lua b/data-otservbr-global/monster/quests/the_curse_spreads/feroxa4.lua index 3f2ac989154..478aa779ddd 100644 --- a/data-otservbr-global/monster/quests/the_curse_spreads/feroxa4.lua +++ b/data-otservbr-global/monster/quests/the_curse_spreads/feroxa4.lua @@ -72,7 +72,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -1400, maxDamage = -1800 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -700, maxDamage = -1250, radius = 6, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_MANADRAIN, minDamage = -700, maxDamage = -1250, length = 9, spread = 1, effect = CONST_ME_MAGIC_BLUE, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_MANADRAIN, minDamage = -700, maxDamage = -1250, length = 9, spread = 0, effect = CONST_ME_MAGIC_BLUE, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -700, maxDamage = -1250, range = 6, shootEffect = CONST_ANI_ARROW, effect = CONST_ME_EXPLOSIONAREA, target = true }, } diff --git a/data-otservbr-global/monster/quests/the_curse_spreads/feroxa5.lua b/data-otservbr-global/monster/quests/the_curse_spreads/feroxa5.lua index a469ad757b7..39fed1dc78c 100644 --- a/data-otservbr-global/monster/quests/the_curse_spreads/feroxa5.lua +++ b/data-otservbr-global/monster/quests/the_curse_spreads/feroxa5.lua @@ -87,7 +87,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -1400, maxDamage = -1800 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -700, maxDamage = -1050, radius = 6, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_MANADRAIN, minDamage = -700, maxDamage = -1250, length = 9, spread = 1, effect = CONST_ME_MAGIC_BLUE, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_MANADRAIN, minDamage = -700, maxDamage = -1250, length = 9, spread = 0, effect = CONST_ME_MAGIC_BLUE, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -450, maxDamage = -700, radius = 7, effect = CONST_ME_BLOCKHIT, target = false }, } diff --git a/data-otservbr-global/monster/quests/the_curse_spreads/sharpclaw.lua b/data-otservbr-global/monster/quests/the_curse_spreads/sharpclaw.lua index e55f8abc39a..50ad689b7c7 100644 --- a/data-otservbr-global/monster/quests/the_curse_spreads/sharpclaw.lua +++ b/data-otservbr-global/monster/quests/the_curse_spreads/sharpclaw.lua @@ -100,7 +100,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -290 }, { name = "combat", interval = 1000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = 100, maxDamage = 720, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, target = false }, { name = "speed", interval = 2000, chance = 15, speedChange = -600, range = 7, effect = CONST_ME_MAGIC_RED, target = false, duration = 20000 }, - { name = "combat", interval = 1000, chance = 14, type = COMBAT_DEATHDAMAGE, minDamage = -100, maxDamage = -700, length = 5, spread = 1, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 1000, chance = 14, type = COMBAT_DEATHDAMAGE, minDamage = -100, maxDamage = -700, length = 5, spread = 0, effect = CONST_ME_MORTAREA, target = false }, { name = "outfit", interval = 1000, chance = 1, radius = 1, target = true, duration = 2000, outfitMonster = "Werebadger" }, { name = "ghastly dragon curse", interval = 2000, chance = 5, range = 1, target = false }, } diff --git a/data-otservbr-global/monster/quests/the_dream_courts/bosses/alptramun.lua b/data-otservbr-global/monster/quests/the_dream_courts/bosses/alptramun.lua index a691c396fb1..46b5cf6c91d 100644 --- a/data-otservbr-global/monster/quests/the_dream_courts/bosses/alptramun.lua +++ b/data-otservbr-global/monster/quests/the_dream_courts/bosses/alptramun.lua @@ -118,9 +118,9 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -200, maxDamage = -1000 }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_DEATHDAMAGE, minDamage = -700, maxDamage = -2000, range = 7, length = 6, spread = 1, shootEffect = CONST_ANI_POISON, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_DEATHDAMAGE, minDamage = -400, maxDamage = -700, range = 3, length = 6, spread = 1, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -200, maxDamage = -500, range = 3, length = 6, spread = 1, effect = CONST_ME_HITBYFIRE, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_DEATHDAMAGE, minDamage = -700, maxDamage = -2000, range = 7, length = 6, spread = 0, shootEffect = CONST_ANI_POISON, effect = CONST_ME_HITBYPOISON, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_DEATHDAMAGE, minDamage = -400, maxDamage = -700, range = 3, length = 6, spread = 0, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -200, maxDamage = -500, range = 3, length = 6, spread = 0, effect = CONST_ME_HITBYFIRE, target = false }, { name = "stone shower rune", interval = 2000, chance = 10, minDamage = -230, maxDamage = -450, range = 7, target = false }, } diff --git a/data-otservbr-global/monster/quests/the_dream_courts/bosses/izcandar_the_banished.lua b/data-otservbr-global/monster/quests/the_dream_courts/bosses/izcandar_the_banished.lua index bef4c76b5e7..9c693024899 100644 --- a/data-otservbr-global/monster/quests/the_dream_courts/bosses/izcandar_the_banished.lua +++ b/data-otservbr-global/monster/quests/the_dream_courts/bosses/izcandar_the_banished.lua @@ -120,9 +120,9 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -1000 }, { name = "combat", interval = 3600, chance = 17, type = COMBAT_FIREDAMAGE, minDamage = -500, maxDamage = -1500, length = 5, spread = 2, effect = CONST_ME_FIREAREA, target = false }, - { name = "combat", interval = 4100, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -500, maxDamage = -2000, length = 8, spread = 1, effect = CONST_ME_FIREAREA, target = false }, + { name = "combat", interval = 4100, chance = 20, type = COMBAT_FIREDAMAGE, minDamage = -500, maxDamage = -2000, length = 8, spread = 0, effect = CONST_ME_FIREAREA, target = false }, { name = "combat", interval = 4700, chance = 17, type = COMBAT_ICEDAMAGE, minDamage = -500, maxDamage = -1500, length = 5, spread = 2, effect = CONST_ME_ICEATTACK, target = false }, - { name = "combat", interval = 3100, chance = 20, type = COMBAT_ICEDAMAGE, minDamage = -500, maxDamage = -2000, length = 8, spread = 1, effect = CONST_ME_ICETORNADO, target = false }, + { name = "combat", interval = 3100, chance = 20, type = COMBAT_ICEDAMAGE, minDamage = -500, maxDamage = -2000, length = 8, spread = 0, effect = CONST_ME_ICETORNADO, target = false }, { name = "speed", interval = 2000, chance = 15, speedChange = -700, radius = 1, effect = CONST_ME_MAGIC_RED, target = true, duration = 30000 }, } diff --git a/data-otservbr-global/monster/quests/the_dream_courts/bosses/plagueroot.lua b/data-otservbr-global/monster/quests/the_dream_courts/bosses/plagueroot.lua index 2ee7c11ca54..5888f8e18a2 100644 --- a/data-otservbr-global/monster/quests/the_dream_courts/bosses/plagueroot.lua +++ b/data-otservbr-global/monster/quests/the_dream_courts/bosses/plagueroot.lua @@ -141,8 +141,8 @@ monster.attacks = { { name = "combat", interval = 1000, chance = 50, type = COMBAT_FIREDAMAGE, minDamage = -20, maxDamage = -100, radius = 5, effect = CONST_ME_BLOCKHIT, target = false }, { name = "firefield", interval = 1000, chance = 4, radius = 8, effect = CONST_ME_EXPLOSIONHIT, target = false }, { name = "combat", interval = 1000, chance = 34, type = COMBAT_FIREDAMAGE, minDamage = -350, maxDamage = -650, range = 7, radius = 7, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true }, - { name = "combat", interval = 1000, chance = 13, type = COMBAT_FIREDAMAGE, minDamage = -250, maxDamage = -600, length = 8, spread = 1, effect = CONST_ME_EXPLOSIONHIT, target = false }, - { name = "combat", interval = 1000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -350, maxDamage = -600, length = 8, spread = 1, effect = CONST_ME_FIREAREA, target = false }, + { name = "combat", interval = 1000, chance = 13, type = COMBAT_FIREDAMAGE, minDamage = -250, maxDamage = -600, length = 8, spread = 0, effect = CONST_ME_EXPLOSIONHIT, target = false }, + { name = "combat", interval = 1000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -350, maxDamage = -600, length = 8, spread = 0, effect = CONST_ME_FIREAREA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_dream_courts/mind-wrecking_dream.lua b/data-otservbr-global/monster/quests/the_dream_courts/mind-wrecking_dream.lua index d5a71ea1058..64c2f952995 100644 --- a/data-otservbr-global/monster/quests/the_dream_courts/mind-wrecking_dream.lua +++ b/data-otservbr-global/monster/quests/the_dream_courts/mind-wrecking_dream.lua @@ -67,9 +67,9 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -320 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -165, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -350, maxDamage = -720, length = 8, spread = 1, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -300, length = 7, spread = 1, effect = CONST_ME_EXPLOSIONAREA, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -225, maxDamage = -275, radius = 4, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -350, maxDamage = -720, length = 8, spread = 0, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -300, length = 7, spread = 0, effect = CONST_ME_EXPLOSIONAREA, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -225, maxDamage = -275, radius = 4, effect = CONST_ME_MORTAREA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_dream_courts/plant_abomination.lua b/data-otservbr-global/monster/quests/the_dream_courts/plant_abomination.lua index d8d14878c4d..fefb9dc4ce3 100644 --- a/data-otservbr-global/monster/quests/the_dream_courts/plant_abomination.lua +++ b/data-otservbr-global/monster/quests/the_dream_courts/plant_abomination.lua @@ -67,7 +67,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -150 }, { name = "combat", interval = 2000, chance = 5, type = COMBAT_MANADRAIN, minDamage = -30, maxDamage = -100, radius = 4, effect = CONST_ME_GREEN_RINGS, target = false }, - { name = "speed", interval = 2000, chance = 15, speedChange = -700, length = 5, spread = 1, effect = CONST_ME_SMALLPLANTS, target = false, duration = 15000 }, + { name = "speed", interval = 2000, chance = 15, speedChange = -700, length = 5, spread = 0, effect = CONST_ME_SMALLPLANTS, target = false, duration = 15000 }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -100, range = 7, radius = 1, shootEffect = CONST_ANI_SMALLEARTH, effect = CONST_ME_CARNIPHILA, target = true }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -55, maxDamage = -100, radius = 4, effect = CONST_ME_HITBYPOISON, target = true }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, radius = 1, effect = CONST_ME_POISONAREA, target = false }, diff --git a/data-otservbr-global/monster/quests/the_elemental_spheres/blistering_fire_elemental.lua b/data-otservbr-global/monster/quests/the_elemental_spheres/blistering_fire_elemental.lua index b6109507f38..fc58dbba787 100644 --- a/data-otservbr-global/monster/quests/the_elemental_spheres/blistering_fire_elemental.lua +++ b/data-otservbr-global/monster/quests/the_elemental_spheres/blistering_fire_elemental.lua @@ -71,7 +71,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -350 }, - { name = "combat", interval = 1000, chance = 11, type = COMBAT_FIREDAMAGE, minDamage = -65, maxDamage = -510, length = 7, spread = 1, target = false }, + { name = "combat", interval = 1000, chance = 11, type = COMBAT_FIREDAMAGE, minDamage = -65, maxDamage = -510, length = 7, spread = 0, effect = CONST_ME_FIREAREA, target = false }, -- fire { name = "condition", type = CONDITION_FIRE, interval = 1000, chance = 12, minDamage = -50, maxDamage = -200, radius = 6, effect = CONST_ME_FIREAREA, target = false }, { name = "firefield", interval = 1000, chance = 15, range = 7, radius = 3, shootEffect = CONST_ANI_FIRE, target = true }, diff --git a/data-otservbr-global/monster/quests/the_elemental_spheres/earth_overlord.lua b/data-otservbr-global/monster/quests/the_elemental_spheres/earth_overlord.lua index 214113740eb..e35e69c701e 100644 --- a/data-otservbr-global/monster/quests/the_elemental_spheres/earth_overlord.lua +++ b/data-otservbr-global/monster/quests/the_elemental_spheres/earth_overlord.lua @@ -79,7 +79,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400 }, - { name = "combat", interval = 1000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = 0, maxDamage = -800, length = 7, spread = 1, effect = CONST_ME_STONES, target = false }, + { name = "combat", interval = 1000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = 0, maxDamage = -800, length = 7, spread = 0, effect = CONST_ME_STONES, target = false }, { name = "combat", interval = 1000, chance = 9, type = COMBAT_EARTHDAMAGE, minDamage = 0, maxDamage = -490, radius = 6, effect = CONST_ME_BIGPLANTS, target = false }, { name = "speed", interval = 2000, chance = 20, speedChange = -750, range = 7, effect = CONST_ME_MAGIC_RED, target = false, duration = 4000 }, } diff --git a/data-otservbr-global/monster/quests/the_elemental_spheres/energy_overlord.lua b/data-otservbr-global/monster/quests/the_elemental_spheres/energy_overlord.lua index e813f247f6d..f7c0a4002a0 100644 --- a/data-otservbr-global/monster/quests/the_elemental_spheres/energy_overlord.lua +++ b/data-otservbr-global/monster/quests/the_elemental_spheres/energy_overlord.lua @@ -74,7 +74,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -800, length = 7, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -800, length = 7, spread = 0, effect = CONST_ME_PURPLEENERGY, target = false }, { name = "combat", interval = 1000, chance = 11, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -200, range = 3, effect = CONST_ME_PURPLEENERGY, target = true }, { name = "combat", interval = 1000, chance = 9, type = COMBAT_EARTHDAMAGE, minDamage = -50, maxDamage = -200, radius = 5, effect = CONST_ME_BIGPLANTS, target = false }, } diff --git a/data-otservbr-global/monster/quests/the_elemental_spheres/fire_overlord.lua b/data-otservbr-global/monster/quests/the_elemental_spheres/fire_overlord.lua index 37bbfdea968..7364324263d 100644 --- a/data-otservbr-global/monster/quests/the_elemental_spheres/fire_overlord.lua +++ b/data-otservbr-global/monster/quests/the_elemental_spheres/fire_overlord.lua @@ -77,7 +77,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -450, condition = { type = CONDITION_FIRE, totalDamage = 650, interval = 9000 } }, { name = "firefield", interval = 2000, chance = 15, range = 7, radius = 4, shootEffect = CONST_ANI_FIRE, target = true }, - { name = "combat", interval = 1000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -300, maxDamage = -900, length = 1, spread = 1, effect = CONST_ME_FIREATTACK, target = false }, + { name = "combat", interval = 1000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -300, maxDamage = -900, length = 1, spread = 0, effect = CONST_ME_FIREATTACK, target = false }, { name = "combat", interval = 1000, chance = 13, type = COMBAT_FIREDAMAGE, minDamage = -200, maxDamage = -350, radius = 4, effect = CONST_ME_FIREAREA, target = true }, } diff --git a/data-otservbr-global/monster/quests/the_elemental_spheres/jagged_earth_elemental.lua b/data-otservbr-global/monster/quests/the_elemental_spheres/jagged_earth_elemental.lua index 6fb06f71e46..df44ccaac8f 100644 --- a/data-otservbr-global/monster/quests/the_elemental_spheres/jagged_earth_elemental.lua +++ b/data-otservbr-global/monster/quests/the_elemental_spheres/jagged_earth_elemental.lua @@ -76,7 +76,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -300 }, - { name = "combat", interval = 1000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -100, maxDamage = -250, length = 6, spread = 1, effect = CONST_ME_STONES, target = false }, + { name = "combat", interval = 1000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -100, maxDamage = -250, length = 6, spread = 0, effect = CONST_ME_STONES, target = false }, { name = "combat", interval = 1000, chance = 11, type = COMBAT_EARTHDAMAGE, minDamage = 0, maxDamage = -200, range = 7, radius = 6, shootEffect = CONST_ANI_SMALLEARTH, effect = CONST_ME_POISONAREA, target = true }, } diff --git a/data-otservbr-global/monster/quests/the_elemental_spheres/muddy_earth_elemental.lua b/data-otservbr-global/monster/quests/the_elemental_spheres/muddy_earth_elemental.lua index 0713cdf0705..5a74924dd2f 100644 --- a/data-otservbr-global/monster/quests/the_elemental_spheres/muddy_earth_elemental.lua +++ b/data-otservbr-global/monster/quests/the_elemental_spheres/muddy_earth_elemental.lua @@ -74,7 +74,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -160 }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -25, maxDamage = -155, range = 7, radius = 2, effect = CONST_ME_STONES, target = true }, -- poison - { name = "condition", type = CONDITION_POISON, interval = 1000, chance = 10, minDamage = 0, maxDamage = -26, length = 6, spread = 1, effect = CONST_ME_GROUNDSHAKER, target = false }, + { name = "condition", type = CONDITION_POISON, interval = 1000, chance = 10, minDamage = 0, maxDamage = -26, length = 6, spread = 0, effect = CONST_ME_GROUNDSHAKER, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_first_dragon/haunted_dragon.lua b/data-otservbr-global/monster/quests/the_first_dragon/haunted_dragon.lua index 9f1f11a2cdf..9e261a34ddb 100644 --- a/data-otservbr-global/monster/quests/the_first_dragon/haunted_dragon.lua +++ b/data-otservbr-global/monster/quests/the_first_dragon/haunted_dragon.lua @@ -98,7 +98,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -480 }, - { name = "combat", interval = 2000, chance = 5, type = COMBAT_PHYSICALDAMAGE, minDamage = -300, maxDamage = -400, range = 7, radius = 4, target = true }, + { name = "combat", interval = 2000, chance = 5, type = COMBAT_PHYSICALDAMAGE, minDamage = -300, maxDamage = -400, range = 7, radius = 4, effect = CONST_ME_HITAREA, target = true }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -125, maxDamage = -600, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_SMALLCLOUDS, target = false }, { name = "combat", interval = 2000, chance = 5, type = COMBAT_EARTHDAMAGE, minDamage = -100, maxDamage = -390, range = 7, radius = 4, shootEffect = CONST_ANI_POISON, effect = CONST_ME_POISONAREA, target = true }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_POISON, effect = CONST_ME_POISONAREA, target = true }, diff --git a/data-otservbr-global/monster/quests/the_inquisition/ungreez.lua b/data-otservbr-global/monster/quests/the_inquisition/ungreez.lua index 2c6f5688324..f2308c8c9a3 100644 --- a/data-otservbr-global/monster/quests/the_inquisition/ungreez.lua +++ b/data-otservbr-global/monster/quests/the_inquisition/ungreez.lua @@ -80,7 +80,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 13, type = COMBAT_MANADRAIN, minDamage = 0, maxDamage = -110, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, target = false }, { name = "combat", interval = 1000, chance = 14, type = COMBAT_FIREDAMAGE, minDamage = -150, maxDamage = -250, range = 7, radius = 7, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true }, { name = "combat", interval = 2000, chance = 18, type = COMBAT_ENERGYDAMAGE, minDamage = -200, maxDamage = -400, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_PURPLEENERGY, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -380, length = 8, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -380, length = 8, spread = 0, effect = CONST_ME_PURPLEENERGY, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_new_frontier/doomhowl.lua b/data-otservbr-global/monster/quests/the_new_frontier/doomhowl.lua index ee20fda8469..5aa858960ba 100644 --- a/data-otservbr-global/monster/quests/the_new_frontier/doomhowl.lua +++ b/data-otservbr-global/monster/quests/the_new_frontier/doomhowl.lua @@ -66,7 +66,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -150 }, - { name = "combat", interval = 2000, chance = 50, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -645, radius = 3, target = false }, + { name = "combat", interval = 2000, chance = 50, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -645, radius = 3, effect = CONST_ME_BLOCKHIT, target = false }, { name = "combat", interval = 4000, chance = 20, type = COMBAT_PHYSICALDAMAGE, effect = CONST_ME_SOUND_GREEN, target = false }, } diff --git a/data-otservbr-global/monster/quests/the_new_frontier/tirecz.lua b/data-otservbr-global/monster/quests/the_new_frontier/tirecz.lua index 42cbd1f2b9f..2370a208b1b 100644 --- a/data-otservbr-global/monster/quests/the_new_frontier/tirecz.lua +++ b/data-otservbr-global/monster/quests/the_new_frontier/tirecz.lua @@ -75,7 +75,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 25, type = COMBAT_FIREDAMAGE, minDamage = -120, maxDamage = -460, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -290, radius = 3, effect = CONST_ME_BLOCKHIT, target = false }, { name = "combat", interval = 3000, chance = 30, type = COMBAT_ENERGYDAMAGE, minDamage = -80, maxDamage = -345, length = 8, spread = 3, effect = CONST_ME_ENERGYHIT, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -370, radius = 7, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -370, radius = 7, effect = CONST_ME_BLOCKHIT, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_order_of_lion/bosses/ancient_lion_knight.lua b/data-otservbr-global/monster/quests/the_order_of_lion/bosses/ancient_lion_knight.lua index 715dc63169b..820931f81c0 100644 --- a/data-otservbr-global/monster/quests/the_order_of_lion/bosses/ancient_lion_knight.lua +++ b/data-otservbr-global/monster/quests/the_order_of_lion/bosses/ancient_lion_knight.lua @@ -97,10 +97,10 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -750, effect = CONST_ME_DRAWBLOOD }, - { name = "combat", interval = 6000, chance = 30, type = COMBAT_HOLYDAMAGE, minDamage = -450, maxDamage = -750, length = 8, spread = 1, effect = CONST_ME_HOLYAREA, target = false }, + { name = "combat", interval = 6000, chance = 30, type = COMBAT_HOLYDAMAGE, minDamage = -450, maxDamage = -750, length = 8, spread = 0, effect = CONST_ME_HOLYAREA, target = false }, { name = "combat", interval = 2750, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -400, maxDamage = -800, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 2500, chance = 22, type = COMBAT_DEATHDAMAGE, minDamage = -400, maxDamage = -500, radius = 3, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 3300, chance = 24, type = COMBAT_ICEDAMAGE, minDamage = -250, maxDamage = -350, length = 4, spread = 1, effect = CONST_ME_ICEATTACK, target = false }, + { name = "combat", interval = 3300, chance = 24, type = COMBAT_ICEDAMAGE, minDamage = -250, maxDamage = -350, length = 4, spread = 0, effect = CONST_ME_ICEATTACK, target = false }, { name = "combat", interval = 3000, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -200, maxDamage = -500, radius = 4, effect = CONST_ME_BIGCLOUDS, target = false }, } diff --git a/data-otservbr-global/monster/quests/the_order_of_lion/bosses/drume.lua b/data-otservbr-global/monster/quests/the_order_of_lion/bosses/drume.lua index 76076de957d..9d86b77cd48 100644 --- a/data-otservbr-global/monster/quests/the_order_of_lion/bosses/drume.lua +++ b/data-otservbr-global/monster/quests/the_order_of_lion/bosses/drume.lua @@ -127,10 +127,10 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -1100, effect = CONST_ME_DRAWBLOOD }, - { name = "combat", interval = 2700, chance = 25, type = COMBAT_HOLYDAMAGE, minDamage = -850, maxDamage = -1150, length = 8, spread = 1, effect = CONST_ME_HOLYAREA, target = false }, + { name = "combat", interval = 2700, chance = 25, type = COMBAT_HOLYDAMAGE, minDamage = -850, maxDamage = -1150, length = 8, spread = 0, effect = CONST_ME_HOLYAREA, target = false }, { name = "combat", interval = 3100, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -800, maxDamage = -1200, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 3300, chance = 22, type = COMBAT_DEATHDAMAGE, minDamage = -800, maxDamage = -1000, radius = 3, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 3700, chance = 24, type = COMBAT_ICEDAMAGE, minDamage = -700, maxDamage = -900, length = 4, spread = 1, effect = CONST_ME_ICEATTACK, target = false }, + { name = "combat", interval = 3700, chance = 24, type = COMBAT_ICEDAMAGE, minDamage = -700, maxDamage = -900, length = 4, spread = 0, effect = CONST_ME_ICEATTACK, target = false }, { name = "singlecloudchain", interval = 2100, chance = 34, minDamage = -600, maxDamage = -1100, range = 4, effect = CONST_ME_ENERGYHIT, target = true }, } diff --git a/data-otservbr-global/monster/quests/the_order_of_lion/bosses/kesar.lua b/data-otservbr-global/monster/quests/the_order_of_lion/bosses/kesar.lua index fcd5ca8dbff..b60503900c1 100644 --- a/data-otservbr-global/monster/quests/the_order_of_lion/bosses/kesar.lua +++ b/data-otservbr-global/monster/quests/the_order_of_lion/bosses/kesar.lua @@ -70,11 +70,11 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -750, effect = CONST_ME_DRAWBLOOD }, - { name = "combat", interval = 4000, chance = 15, type = COMBAT_HOLYDAMAGE, minDamage = -450, maxDamage = -750, length = 8, spread = 1, effect = CONST_ME_HOLYAREA, target = false }, + { name = "combat", interval = 4000, chance = 15, type = COMBAT_HOLYDAMAGE, minDamage = -450, maxDamage = -750, length = 8, spread = 0, effect = CONST_ME_HOLYAREA, target = false }, { name = "combat", interval = 2750, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -400, maxDamage = -800, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = false }, { name = "singledeathchain", interval = 4000, chance = 15, minDamage = -250, maxDamage = -530, range = 5, effect = CONST_ME_MORTAREA, target = true }, { name = "singleicechain", interval = 4000, chance = 18, minDamage = -150, maxDamage = -450, range = 5, effect = CONST_ME_ICEATTACK, target = true }, - { name = "combat", interval = 3300, chance = 12, type = COMBAT_ICEDAMAGE, minDamage = -250, maxDamage = -350, length = 4, spread = 1, effect = CONST_ME_ICEATTACK, target = false }, + { name = "combat", interval = 3300, chance = 12, type = COMBAT_ICEDAMAGE, minDamage = -250, maxDamage = -350, length = 4, spread = 0, effect = CONST_ME_ICEATTACK, target = false }, { name = "singlecloudchain", interval = 6000, chance = 17, minDamage = -200, maxDamage = -450, range = 4, effect = CONST_ME_ENERGYHIT, target = true }, } diff --git a/data-otservbr-global/monster/quests/the_order_of_lion/usurper_commander.lua b/data-otservbr-global/monster/quests/the_order_of_lion/usurper_commander.lua index 3f5e67a915f..fd31fa62806 100644 --- a/data-otservbr-global/monster/quests/the_order_of_lion/usurper_commander.lua +++ b/data-otservbr-global/monster/quests/the_order_of_lion/usurper_commander.lua @@ -81,7 +81,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -500, effect = CONST_ME_DRAWBLOOD }, { name = "combat", interval = 4000, chance = 14, type = COMBAT_DEATHDAMAGE, minDamage = -150, maxDamage = -300, radius = 3, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 4000, chance = 20, type = COMBAT_ICEDAMAGE, minDamage = -150, maxDamage = -400, length = 4, spread = 1, effect = CONST_ME_ICEATTACK, target = false }, + { name = "combat", interval = 4000, chance = 20, type = COMBAT_ICEDAMAGE, minDamage = -150, maxDamage = -400, length = 4, spread = 0, effect = CONST_ME_ICEATTACK, target = false }, { name = "singlecloudchain", interval = 6000, chance = 17, minDamage = -200, maxDamage = -450, range = 4, effect = CONST_ME_ENERGYHIT, target = true }, { name = "singledeathchain", interval = 6000, chance = 15, minDamage = -250, maxDamage = -530, range = 5, effect = CONST_ME_MORTAREA, target = true }, } diff --git a/data-otservbr-global/monster/quests/the_percht_queens_island/baleful_bunny.lua b/data-otservbr-global/monster/quests/the_percht_queens_island/baleful_bunny.lua index d35db5b1c6c..851ab767f4e 100644 --- a/data-otservbr-global/monster/quests/the_percht_queens_island/baleful_bunny.lua +++ b/data-otservbr-global/monster/quests/the_percht_queens_island/baleful_bunny.lua @@ -88,7 +88,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -200 }, { name = "combat", interval = 2000, chance = 1, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -150, radius = 4, effect = CONST_ME_POFF, target = true }, { name = "combat", interval = 2000, chance = 1, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -150, radius = 1, effect = CONST_ME_ENERGYAREA, target = false }, - { name = "combat", interval = 2000, chance = 111, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -150, radius = 4, target = true }, + { name = "combat", interval = 2000, chance = 111, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -150, radius = 4, effect = CONST_ME_DRAWBLOOD, target = true }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_percht_queens_island/bonny_bunny.lua b/data-otservbr-global/monster/quests/the_percht_queens_island/bonny_bunny.lua index b8d9081ec38..a9e044fc00d 100644 --- a/data-otservbr-global/monster/quests/the_percht_queens_island/bonny_bunny.lua +++ b/data-otservbr-global/monster/quests/the_percht_queens_island/bonny_bunny.lua @@ -63,7 +63,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -200 }, - { name = "combat", interval = 2000, chance = 50, type = COMBAT_FIREDAMAGE, minDamage = -90, maxDamage = -150, length = 4, spread = 1, effect = CONST_ME_HEARTS, target = false }, + { name = "combat", interval = 2000, chance = 50, type = COMBAT_FIREDAMAGE, minDamage = -90, maxDamage = -150, length = 4, spread = 0, effect = CONST_ME_HEARTS, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_percht_queens_island/percht.lua b/data-otservbr-global/monster/quests/the_percht_queens_island/percht.lua index 6689c086cb8..0a13a064493 100644 --- a/data-otservbr-global/monster/quests/the_percht_queens_island/percht.lua +++ b/data-otservbr-global/monster/quests/the_percht_queens_island/percht.lua @@ -89,10 +89,10 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -200 }, { name = "combat", interval = 2000, chance = 70, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -125, range = 7, shootEffect = CONST_ANI_SNOWBALL, target = false }, - { name = "combat", interval = 2000, chance = 50, type = COMBAT_ICEDAMAGE, minDamage = -90, maxDamage = -250, length = 3, spread = 1, effect = CONST_ME_GIANTICE, target = false }, + { name = "combat", interval = 2000, chance = 50, type = COMBAT_ICEDAMAGE, minDamage = -90, maxDamage = -250, length = 3, spread = 0, effect = CONST_ME_GIANTICE, target = false }, { name = "combat", interval = 2000, chance = 50, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -250, radius = 3, effect = CONST_ME_FIREAREA, target = true }, { name = "combat", interval = 2000, chance = 50, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -250, radius = 4, effect = CONST_ME_EXPLOSIONHIT, target = false }, - { name = "combat", interval = 2000, chance = 50, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -250, length = 3, spread = 1, effect = CONST_ME_FIREATTACK, target = false }, + { name = "combat", interval = 2000, chance = 50, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -250, length = 3, spread = 0, effect = CONST_ME_FIREATTACK, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_percht_queens_island/schiach.lua b/data-otservbr-global/monster/quests/the_percht_queens_island/schiach.lua index fe714dc1e88..747e9604bb3 100644 --- a/data-otservbr-global/monster/quests/the_percht_queens_island/schiach.lua +++ b/data-otservbr-global/monster/quests/the_percht_queens_island/schiach.lua @@ -86,10 +86,10 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -200 }, { name = "combat", interval = 2000, chance = 70, type = COMBAT_ICEDAMAGE, minDamage = -100, maxDamage = -125, range = 7, shootEffect = CONST_ANI_SNOWBALL, target = false }, - { name = "combat", interval = 2000, chance = 50, type = COMBAT_ICEDAMAGE, minDamage = -90, maxDamage = -250, length = 3, spread = 1, effect = CONST_ME_GIANTICE, target = false }, + { name = "combat", interval = 2000, chance = 50, type = COMBAT_ICEDAMAGE, minDamage = -90, maxDamage = -250, length = 3, spread = 0, effect = CONST_ME_GIANTICE, target = false }, { name = "combat", interval = 2000, chance = 50, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -250, radius = 3, effect = CONST_ME_FIREAREA, target = true }, { name = "combat", interval = 2000, chance = 50, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -250, radius = 4, effect = CONST_ME_EXPLOSIONHIT, target = false }, - { name = "combat", interval = 2000, chance = 50, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -250, length = 3, spread = 1, effect = CONST_ME_FIREATTACK, target = false }, + { name = "combat", interval = 2000, chance = 50, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -250, length = 3, spread = 0, effect = CONST_ME_FIREATTACK, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/biting_cold.lua b/data-otservbr-global/monster/quests/the_secret_library/biting_cold.lua index 7d5b3a34ce7..163e005b41a 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/biting_cold.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/biting_cold.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -450 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/bone_jaw.lua b/data-otservbr-global/monster/quests/the_secret_library/bone_jaw.lua index d1e2f4cf56f..5c8a41c3e66 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/bone_jaw.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/bone_jaw.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/bosses/ghulosh.lua b/data-otservbr-global/monster/quests/the_secret_library/bosses/ghulosh.lua index c11a622fa3b..bd3a786b365 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/bosses/ghulosh.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/bosses/ghulosh.lua @@ -105,11 +105,10 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 1000, chance = 100, skill = 150, attack = 280 }, - { name = "combat", interval = 2000, chance = 12, type = COMBAT_DEATHDAMAGE, minDamage = -900, maxDamage = -1500, length = 8, spread = 1, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 2000, chance = 12, type = COMBAT_DEATHDAMAGE, minDamage = -210, maxDamage = -600, length = 8, spread = 1, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 12, type = COMBAT_DEATHDAMAGE, minDamage = -900, maxDamage = -1500, length = 8, spread = 0, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 12, type = COMBAT_DEATHDAMAGE, minDamage = -210, maxDamage = -600, length = 8, spread = 0, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 2000, chance = 12, type = COMBAT_DEATHDAMAGE, minDamage = -210, maxDamage = -600, range = 7, radius = 3, effect = CONST_ME_MORTAREA, target = false }, - { name = "melee", interval = 2000, chance = 100, skill = 90, attack = 250 }, - { name = "combat", interval = 2000, chance = 12, type = COMBAT_LIFEDRAIN, minDamage = -1500, maxDamage = -2000, range = 7, radius = 3, target = false }, + { name = "combat", interval = 2000, chance = 12, type = COMBAT_LIFEDRAIN, minDamage = -1500, maxDamage = -2000, range = 7, radius = 3, effect = CONST_ME_DRAWBLOOD, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_canon_dominus.lua b/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_canon_dominus.lua index d0ed39a7e6e..f6976c6d732 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_canon_dominus.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_canon_dominus.lua @@ -86,7 +86,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -150, maxDamage = -700 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -720, range = 7, shootEffect = CONST_ANI_ETHEREALSPEAR, target = false }, - { name = "combat", interval = 2000, chance = 14, type = COMBAT_HOLYDAMAGE, minDamage = -100, maxDamage = -1000, length = 8, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 2000, chance = 14, type = COMBAT_HOLYDAMAGE, minDamage = -100, maxDamage = -1000, length = 8, spread = 0, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -200, maxDamage = -700, range = 5, radius = 3, effect = CONST_ME_HOLYAREA, target = false }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -200, maxDamage = -700, range = 5, radius = 3, effect = CONST_ME_SMALLCLOUDS, target = false }, } diff --git a/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_chaplain_gaunder.lua b/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_chaplain_gaunder.lua index 9240bdab188..a4d42046c58 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_chaplain_gaunder.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_chaplain_gaunder.lua @@ -94,7 +94,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -150, maxDamage = -850 }, { name = "combat", interval = 1500, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -380, maxDamage = -890, range = 4, radius = 4, effect = CONST_ME_HITBYPOISON, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -290, maxDamage = -720, range = 7, shootEffect = CONST_ANI_ETHEREALSPEAR, target = false }, - { name = "combat", interval = 1500, chance = 14, type = COMBAT_HOLYDAMAGE, minDamage = -300, maxDamage = -1000, length = 8, spread = 1, effect = CONST_ME_BLOCKHIT, target = false }, + { name = "combat", interval = 1500, chance = 14, type = COMBAT_HOLYDAMAGE, minDamage = -300, maxDamage = -1000, length = 8, spread = 0, effect = CONST_ME_BLOCKHIT, target = false }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -200, maxDamage = -700, range = 5, radius = 3, effect = CONST_ME_SMALLCLOUDS, target = false }, } diff --git a/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_commander_soeren.lua b/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_commander_soeren.lua index 3396fe9a092..e79984a5317 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_commander_soeren.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/bosses/grand_commander_soeren.lua @@ -88,7 +88,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -150, maxDamage = -700 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -720, range = 7, shootEffect = CONST_ANI_ROYALSPEAR, target = false }, - { name = "combat", interval = 1000, chance = 14, type = COMBAT_HOLYDAMAGE, minDamage = -500, maxDamage = -1000, length = 8, spread = 1, effect = CONST_ME_BLOCKHIT, target = false }, + { name = "combat", interval = 1000, chance = 14, type = COMBAT_HOLYDAMAGE, minDamage = -500, maxDamage = -1000, length = 8, spread = 0, effect = CONST_ME_BLOCKHIT, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/bosses/thawing_dragon_lord.lua b/data-otservbr-global/monster/quests/the_secret_library/bosses/thawing_dragon_lord.lua index 8344d3debb6..fa175a85a2b 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/bosses/thawing_dragon_lord.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/bosses/thawing_dragon_lord.lua @@ -74,7 +74,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -300 }, { name = "ice crystal bomb", interval = 2000, chance = 30, minDamage = -600, maxDamage = -700, target = true }, - { name = "fire wave", interval = 2000, chance = 30, minDamage = -800, maxDamage = -1200, length = 1, spread = 1, target = true }, + { name = "fire wave", interval = 2000, chance = 30, minDamage = -800, maxDamage = -1200, length = 1, spread = 1, effect = CONST_ME_FIREAREA, target = true }, { name = "speed", interval = 1000, chance = 12, speedChange = -250, radius = 6, effect = CONST_ME_HITBYFIRE, target = false, duration = 60000 }, { name = "firefield", interval = 1000, chance = 10, range = 7, radius = 4, shootEffect = CONST_ANI_FIRE, target = true }, } diff --git a/data-otservbr-global/monster/quests/the_secret_library/bosses/the_scourge_of_oblivion.lua b/data-otservbr-global/monster/quests/the_secret_library/bosses/the_scourge_of_oblivion.lua index 507026f3be1..491b946adba 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/bosses/the_scourge_of_oblivion.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/bosses/the_scourge_of_oblivion.lua @@ -130,14 +130,14 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 8, type = COMBAT_FIREDAMAGE, minDamage = -1550, maxDamage = -2550, range = 7, radius = 7, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -1075, maxDamage = -2405, range = 7, shootEffect = CONST_ANI_ENERGYBALL, effect = CONST_ME_ENERGYHIT, target = true }, { name = "combat", interval = 1000, chance = 20, type = COMBAT_LIFEDRAIN, minDamage = -600, maxDamage = -1500, radius = 8, effect = CONST_ME_LOSEENERGY, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -750, maxDamage = -1200, length = 8, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -750, maxDamage = -1200, length = 8, spread = 0, effect = CONST_ME_PURPLEENERGY, target = false }, { name = "choking fear drown", interval = 2000, chance = 20, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -450, maxDamage = -1400, radius = 4, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = true }, { name = "combat", interval = 1000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -800, maxDamage = -2300, radius = 8, effect = CONST_ME_MAGIC_GREEN, target = false }, { name = "speed", interval = 1000, chance = 12, speedChange = -800, radius = 6, effect = CONST_ME_POISONAREA, target = false, duration = 60000 }, { name = "strength", interval = 1000, chance = 8, radius = 5, effect = CONST_ME_HITAREA, target = false }, { name = "combat", interval = 1000, chance = 34, type = COMBAT_FIREDAMAGE, minDamage = -100, maxDamage = -700, range = 7, radius = 7, shootEffect = CONST_ANI_FIRE, effect = CONST_ME_FIREAREA, target = true }, - { name = "combat", interval = 1000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -950, length = 8, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 1000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -950, length = 8, spread = 0, effect = CONST_ME_MAGIC_RED, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/brother_chill.lua b/data-otservbr-global/monster/quests/the_secret_library/brother_chill.lua index 9d3c3b21ce0..7843064c156 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/brother_chill.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/brother_chill.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/brother_freeze.lua b/data-otservbr-global/monster/quests/the_secret_library/brother_freeze.lua index b910cf65969..9268ae77e79 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/brother_freeze.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/brother_freeze.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/concentrated_death.lua b/data-otservbr-global/monster/quests/the_secret_library/concentrated_death.lua index 6c78194b72b..d83987622d8 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/concentrated_death.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/concentrated_death.lua @@ -67,7 +67,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/dazed_leaf_golem.lua b/data-otservbr-global/monster/quests/the_secret_library/dazed_leaf_golem.lua index 0151194b9a4..06961bae6cd 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/dazed_leaf_golem.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/dazed_leaf_golem.lua @@ -78,7 +78,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/demon_blood.lua b/data-otservbr-global/monster/quests/the_secret_library/demon_blood.lua index 4dc9c881ede..166395f6ab7 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/demon_blood.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/demon_blood.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/demon_slave.lua b/data-otservbr-global/monster/quests/the_secret_library/demon_slave.lua index 168d813ff1e..898838c9a53 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/demon_slave.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/demon_slave.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/furious_scorpion.lua b/data-otservbr-global/monster/quests/the_secret_library/furious_scorpion.lua index 8f58c549c32..8d87526b7cd 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/furious_scorpion.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/furious_scorpion.lua @@ -66,7 +66,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/ghulosh'_deathgaze.lua b/data-otservbr-global/monster/quests/the_secret_library/ghulosh'_deathgaze.lua index 43cae1f6f6b..f5b80d9a2e9 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/ghulosh'_deathgaze.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/ghulosh'_deathgaze.lua @@ -63,7 +63,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_DEATHDAMAGE, lenght = 7, spread = 1, minDamage = -1200, maxDamage = -1800, target = false }, -- -_death_beam(1200-1800) + { name = "combat", interval = 2000, chance = 25, type = COMBAT_DEATHDAMAGE, lenght = 7, spread = 0, minDamage = -1200, maxDamage = -1800, effect = CONST_ME_MORTAREA, target = false }, -- -_death_beam(1200-1800) } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/imp_intruder.lua b/data-otservbr-global/monster/quests/the_secret_library/imp_intruder.lua index cb44fb2dd8e..09a216cda1a 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/imp_intruder.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/imp_intruder.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/invading_demon.lua b/data-otservbr-global/monster/quests/the_secret_library/invading_demon.lua index 068559329bd..ad10e9b6f27 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/invading_demon.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/invading_demon.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/jailer.lua b/data-otservbr-global/monster/quests/the_secret_library/jailer.lua index f95c2f1cbd6..bf066fd0135 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/jailer.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/jailer.lua @@ -72,7 +72,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/librarian.lua b/data-otservbr-global/monster/quests/the_secret_library/librarian.lua index 5fbc1c8b1a5..83850e0be0b 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/librarian.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/librarian.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/lokathmor.lua b/data-otservbr-global/monster/quests/the_secret_library/lokathmor.lua index 537b2584d82..be0e44216a9 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/lokathmor.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/lokathmor.lua @@ -106,7 +106,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 150, attack = 250 }, - { name = "combat", interval = 2000, chance = 8, type = COMBAT_LIFEDRAIN, minDamage = -1100, maxDamage = -2800, range = 7, radius = 5, shootEffect = CONST_ANI_WHIRLWINDAXE, target = true }, + { name = "combat", interval = 2000, chance = 8, type = COMBAT_LIFEDRAIN, minDamage = -1100, maxDamage = -2800, range = 7, radius = 5, shootEffect = CONST_ANI_WHIRLWINDAXE, effect = CONST_ME_DRAWBLOOD, target = true }, { name = "combat", interval = 1000, chance = 8, type = COMBAT_DEATHDAMAGE, minDamage = -800, maxDamage = -1900, radius = 9, effect = CONST_ME_MORTAREA, target = false }, -- poison { name = "condition", type = CONDITION_POISON, interval = 5000, chance = 18, minDamage = -1100, maxDamage = -2500, effect = CONST_ME_HITBYPOISON, target = false }, diff --git a/data-otservbr-global/monster/quests/the_secret_library/lokathmor_stuck.lua b/data-otservbr-global/monster/quests/the_secret_library/lokathmor_stuck.lua index 0c75efd919b..9f2c99b931a 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/lokathmor_stuck.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/lokathmor_stuck.lua @@ -59,7 +59,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 150, attack = 250 }, - { name = "combat", interval = 2000, chance = 8, type = COMBAT_LIFEDRAIN, minDamage = -2500, maxDamage = -2800, range = 7, radius = 5, shootEffect = CONST_ANI_WHIRLWINDAXE, target = true }, + { name = "combat", interval = 2000, chance = 8, type = COMBAT_LIFEDRAIN, minDamage = -2500, maxDamage = -2800, range = 7, radius = 5, shootEffect = CONST_ANI_WHIRLWINDAXE, effect = CONST_ME_DRAWBLOOD, target = true }, { name = "combat", interval = 1000, chance = 8, type = COMBAT_DEATHDAMAGE, minDamage = -1500, maxDamage = -1900, radius = 9, effect = CONST_ME_MORTAREA, target = false }, -- poison { name = "condition", type = CONDITION_POISON, interval = 5000, chance = 18, minDamage = -2000, maxDamage = -2500, effect = CONST_ME_HITBYPOISON, target = false }, diff --git a/data-otservbr-global/monster/quests/the_secret_library/malicious_minion.lua b/data-otservbr-global/monster/quests/the_secret_library/malicious_minion.lua index 852d72ed4fa..63c7867a856 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/malicious_minion.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/malicious_minion.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/mazzinor.lua b/data-otservbr-global/monster/quests/the_secret_library/mazzinor.lua index 1d028d9cc05..b5521c45429 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/mazzinor.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/mazzinor.lua @@ -98,8 +98,8 @@ monster.attacks = { { name = "divine missile", interval = 2000, chance = 10, minDamage = -135, maxDamage = -700, target = true }, { name = "berserk", interval = 2000, chance = 20, minDamage = -90, maxDamage = -500, range = 7, target = true }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -135, maxDamage = -280, range = 7, radius = 5, effect = CONST_ME_MAGIC_BLUE, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -210, maxDamage = -600, length = 8, spread = 1, effect = CONST_ME_ENERGYAREA, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_HOLYDAMAGE, minDamage = -210, maxDamage = -700, length = 8, spread = 1, effect = CONST_ME_HOLYAREA, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -210, maxDamage = -600, length = 8, spread = 0, effect = CONST_ME_ENERGYAREA, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_HOLYDAMAGE, minDamage = -210, maxDamage = -700, length = 8, spread = 0, effect = CONST_ME_HOLYAREA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/mean_minion.lua b/data-otservbr-global/monster/quests/the_secret_library/mean_minion.lua index 1483e7f53d5..32146811c5a 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/mean_minion.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/mean_minion.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/ravenous_beyondling.lua b/data-otservbr-global/monster/quests/the_secret_library/ravenous_beyondling.lua index e59af78ba82..28f5f67d2b0 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/ravenous_beyondling.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/ravenous_beyondling.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/rift_breacher.lua b/data-otservbr-global/monster/quests/the_secret_library/rift_breacher.lua index cdf59257afe..c7e5c081dec 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/rift_breacher.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/rift_breacher.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/rift_minion.lua b/data-otservbr-global/monster/quests/the_secret_library/rift_minion.lua index fd124af8a30..521aec4833d 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/rift_minion.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/rift_minion.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/rift_spawn.lua b/data-otservbr-global/monster/quests/the_secret_library/rift_spawn.lua index 19a68dfffcf..361699ca0e4 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/rift_spawn.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/rift_spawn.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/spawn_of_havoc.lua b/data-otservbr-global/monster/quests/the_secret_library/spawn_of_havoc.lua index efdcc226a13..4a563a6a1b4 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/spawn_of_havoc.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/spawn_of_havoc.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_armor.lua b/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_armor.lua index 8fbdbb061de..1905e8a29a9 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_armor.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_armor.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_healing.lua b/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_healing.lua index 398f973baed..ffe609dc45a 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_healing.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_healing.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_lifesteal.lua b/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_lifesteal.lua index f5f62182ed5..ec3ccaefa97 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_lifesteal.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_lifesteal.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_spells.lua b/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_spells.lua index 7d4fef27f52..58fff59a202 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_spells.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_spells.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_summoning.lua b/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_summoning.lua index d0e4994e20c..87c05596b01 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_summoning.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/stolen_knowledge_of_summoning.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/the_blazing_rose.lua b/data-otservbr-global/monster/quests/the_secret_library/the_blazing_rose.lua index 3853e83f8e8..3eb95e76a26 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/the_blazing_rose.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/the_blazing_rose.lua @@ -69,7 +69,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/the_book_of_secrets.lua b/data-otservbr-global/monster/quests/the_secret_library/the_book_of_secrets.lua index a0810a6cb90..4058cb78662 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/the_book_of_secrets.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/the_book_of_secrets.lua @@ -58,7 +58,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/the_devourer_of_secrets.lua b/data-otservbr-global/monster/quests/the_secret_library/the_devourer_of_secrets.lua index 54827e65cca..e08e3629eec 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/the_devourer_of_secrets.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/the_devourer_of_secrets.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/the_diamond_blossom.lua b/data-otservbr-global/monster/quests/the_secret_library/the_diamond_blossom.lua index ccdba1ba153..03fc38bffc8 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/the_diamond_blossom.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/the_diamond_blossom.lua @@ -69,7 +69,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/the_lily_of_night.lua b/data-otservbr-global/monster/quests/the_secret_library/the_lily_of_night.lua index 42ece8c4842..9bf43393315 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/the_lily_of_night.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/the_lily_of_night.lua @@ -69,7 +69,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/the_scion_of_havoc.lua b/data-otservbr-global/monster/quests/the_secret_library/the_scion_of_havoc.lua index 717bacb2fd3..b76af5f82f9 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/the_scion_of_havoc.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/the_scion_of_havoc.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/the_spellstealer.lua b/data-otservbr-global/monster/quests/the_secret_library/the_spellstealer.lua index 446b69e2333..8e304a3a2d3 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/the_spellstealer.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/the_spellstealer.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/war_servant.lua b/data-otservbr-global/monster/quests/the_secret_library/war_servant.lua index 124723fdcb3..cfbb9c5af65 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/war_servant.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/war_servant.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/quests/the_secret_library/yalahari_despoiler.lua b/data-otservbr-global/monster/quests/the_secret_library/yalahari_despoiler.lua index 608430cabd6..a3e52e37ea4 100644 --- a/data-otservbr-global/monster/quests/the_secret_library/yalahari_despoiler.lua +++ b/data-otservbr-global/monster/quests/the_secret_library/yalahari_despoiler.lua @@ -64,7 +64,7 @@ monster.loot = {} monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200 }, { name = "combat", interval = 1000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_POFF, target = false }, - { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 1, effect = CONST_ME_POFF, target = false }, + { name = "combat", interval = 1000, chance = 12, type = COMBAT_ENERGYDAMAGE, minDamage = 0, maxDamage = -175, length = 3, spread = 0, effect = CONST_ME_POFF, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/raids/ferumbras.lua b/data-otservbr-global/monster/raids/ferumbras.lua index f9d3c5c2021..c3dfea647ea 100644 --- a/data-otservbr-global/monster/raids/ferumbras.lua +++ b/data-otservbr-global/monster/raids/ferumbras.lua @@ -129,11 +129,11 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -350 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_MANADRAIN, minDamage = -500, maxDamage = -700, range = 7, effect = CONST_ME_MAGIC_RED, target = false }, - { name = "combat", interval = 2000, chance = 25, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -450, length = 8, spread = 1, effect = CONST_ME_HITBYPOISON, target = false }, + { name = "combat", interval = 2000, chance = 25, type = COMBAT_LIFEDRAIN, minDamage = -300, maxDamage = -450, length = 8, spread = 0, effect = CONST_ME_HITBYPOISON, target = false }, { name = "combat", interval = 2000, chance = 21, type = COMBAT_LIFEDRAIN, minDamage = -450, maxDamage = -500, radius = 6, effect = CONST_ME_POFF, target = false }, -- poison { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 15, minDamage = -20, maxDamage = -40, range = 7, shootEffect = CONST_ANI_POISON, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -900, maxDamage = -1000, range = 4, radius = 3, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_LIFEDRAIN, minDamage = -900, maxDamage = -1000, range = 4, radius = 3, effect = CONST_ME_DRAWBLOOD, target = false }, -- energy damage { name = "condition", type = CONDITION_ENERGY, interval = 2000, chance = 18, minDamage = -300, maxDamage = -400, radius = 6, effect = CONST_ME_ENERGYHIT, target = false }, -- fire diff --git a/data-otservbr-global/monster/raids/furyosa.lua b/data-otservbr-global/monster/raids/furyosa.lua index f230e96e5e7..acbf9711298 100644 --- a/data-otservbr-global/monster/raids/furyosa.lua +++ b/data-otservbr-global/monster/raids/furyosa.lua @@ -99,9 +99,9 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -625 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_DEATHDAMAGE, minDamage = -260, maxDamage = -310, radius = 6, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -50, maxDamage = -210, length = 8, spread = 1, effect = CONST_ME_BLOCKHIT, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -200, maxDamage = -300, length = 8, spread = 1, effect = CONST_ME_EXPLOSIONAREA, target = false }, - { name = "combat", interval = 2000, chance = 5, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -800, length = 8, spread = 1, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_MANADRAIN, minDamage = -50, maxDamage = -210, length = 8, spread = 0, effect = CONST_ME_BLOCKHIT, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_FIREDAMAGE, minDamage = -200, maxDamage = -300, length = 8, spread = 0, effect = CONST_ME_EXPLOSIONAREA, target = false }, + { name = "combat", interval = 2000, chance = 5, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -800, length = 8, spread = 0, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 3000, chance = 18, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -150, radius = 5, effect = CONST_ME_GROUNDSHAKER, target = true }, { name = "fury skill reducer", interval = 2000, chance = 5, target = false }, } diff --git a/data-otservbr-global/monster/raids/ghazbaran.lua b/data-otservbr-global/monster/raids/ghazbaran.lua index 074395a82f5..5f57655679f 100644 --- a/data-otservbr-global/monster/raids/ghazbaran.lua +++ b/data-otservbr-global/monster/raids/ghazbaran.lua @@ -129,7 +129,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -2191 }, { name = "combat", interval = 2000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -250, maxDamage = -500, range = 7, radius = 6, effect = CONST_ME_HITAREA, target = false }, { name = "combat", interval = 3000, chance = 34, type = COMBAT_PHYSICALDAMAGE, minDamage = -120, maxDamage = -500, range = 7, radius = 1, shootEffect = CONST_ANI_WHIRLWINDSWORD, target = true }, - { name = "combat", interval = 4000, chance = 30, type = COMBAT_ENERGYDAMAGE, minDamage = -100, maxDamage = -800, length = 8, spread = 1, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 4000, chance = 30, type = COMBAT_ENERGYDAMAGE, minDamage = -100, maxDamage = -800, length = 8, spread = 0, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 3000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -480, range = 14, radius = 5, effect = CONST_ME_POFF, target = false }, { name = "combat", interval = 4000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -650, range = 7, radius = 13, effect = CONST_ME_BLOCKHIT, target = false }, { name = "combat", interval = 4000, chance = 18, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -600, radius = 14, effect = CONST_ME_LOSEENERGY, target = false }, diff --git a/data-otservbr-global/monster/raids/glooth_bomb.lua b/data-otservbr-global/monster/raids/glooth_bomb.lua index 071f1aeafea..b1973e7b8ec 100644 --- a/data-otservbr-global/monster/raids/glooth_bomb.lua +++ b/data-otservbr-global/monster/raids/glooth_bomb.lua @@ -81,7 +81,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 110, attack = 50 }, - { name = "combat", interval = 2000, chance = 13, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -230, length = 3, spread = 1, effect = CONST_ME_GROUNDSHAKER, target = false }, + { name = "combat", interval = 2000, chance = 13, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -230, length = 3, spread = 0, effect = CONST_ME_GROUNDSHAKER, target = false }, { name = "combat", interval = 2000, chance = 12, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -200, radius = 3, effect = CONST_ME_GROUNDSHAKER, target = false }, { name = "combat", interval = 2000, chance = 19, type = COMBAT_LIFEDRAIN, minDamage = -50, maxDamage = -225, radius = 5, effect = CONST_ME_MAGIC_RED, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -150, maxDamage = -235, range = 7, radius = 4, shootEffect = CONST_ANI_LARGEROCK, effect = CONST_ME_EXPLOSIONAREA, target = true }, diff --git a/data-otservbr-global/monster/raids/mawhawk.lua b/data-otservbr-global/monster/raids/mawhawk.lua index b2b8901e5ed..f00407ca304 100644 --- a/data-otservbr-global/monster/raids/mawhawk.lua +++ b/data-otservbr-global/monster/raids/mawhawk.lua @@ -91,7 +91,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 90, attack = 90 }, - { name = "combat", interval = 1800, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -685, length = 7, spread = 1, effect = CONST_ME_STONES, target = false }, + { name = "combat", interval = 1800, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -685, length = 7, spread = 0, effect = CONST_ME_STONES, target = false }, { name = "combat", interval = 2000, chance = 9, type = COMBAT_EARTHDAMAGE, minDamage = -250, maxDamage = -590, radius = 6, effect = CONST_ME_BIGPLANTS, target = false }, } diff --git a/data-otservbr-global/monster/raids/ocyakao.lua b/data-otservbr-global/monster/raids/ocyakao.lua index b2dfb1a4b3c..2e036c0837b 100644 --- a/data-otservbr-global/monster/raids/ocyakao.lua +++ b/data-otservbr-global/monster/raids/ocyakao.lua @@ -87,7 +87,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 25, attack = 50 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = 70, maxDamage = -185, range = 7, radius = 3, shootEffect = CONST_ANI_SMALLSTONE, target = true }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_PHYSICALDAMAGE, minDamage = 70, maxDamage = -185, range = 7, radius = 3, shootEffect = CONST_ANI_SMALLSTONE, effect = CONST_ME_HITAREA, target = true }, } monster.defenses = { diff --git a/data-otservbr-global/monster/raids/the_pale_count.lua b/data-otservbr-global/monster/raids/the_pale_count.lua index c3cc0e3dfe0..31a40bcfff2 100644 --- a/data-otservbr-global/monster/raids/the_pale_count.lua +++ b/data-otservbr-global/monster/raids/the_pale_count.lua @@ -113,7 +113,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 80, attack = 120 }, - { name = "speed", interval = 1000, chance = 17, speedChange = -600, range = 7, radius = 4, target = true, duration = 1500 }, + { name = "speed", interval = 1000, chance = 17, speedChange = -600, range = 7, radius = 4, effect = CONST_ME_MAGIC_RED, target = true, duration = 1500 }, { name = "combat", interval = 2000, chance = 21, type = COMBAT_ICEDAMAGE, minDamage = -130, maxDamage = -350, range = 6, radius = 2, shootEffect = CONST_ANI_SMALLICE, effect = CONST_ME_GIANTICE, target = true }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_MANADRAIN, minDamage = -60, maxDamage = -120, range = 7, shootEffect = CONST_ANI_EARTH, effect = CONST_ME_CARNIPHILA, target = false }, } diff --git a/data-otservbr-global/monster/raids/yakchal.lua b/data-otservbr-global/monster/raids/yakchal.lua index 840d370a8f8..b2314a2ec53 100644 --- a/data-otservbr-global/monster/raids/yakchal.lua +++ b/data-otservbr-global/monster/raids/yakchal.lua @@ -104,7 +104,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -389 }, { name = "combat", interval = 2000, chance = 18, type = COMBAT_ICEDAMAGE, minDamage = 0, maxDamage = -430, radius = 4, shootEffect = CONST_ANI_SMALLICE, effect = CONST_ME_ICEAREA, target = true }, - { name = "combat", interval = 3000, chance = 34, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -300, range = 7, radius = 3, shootEffect = CONST_ANI_SNOWBALL, target = true }, + { name = "combat", interval = 3000, chance = 34, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = -300, range = 7, radius = 3, shootEffect = CONST_ANI_SNOWBALL, effect = CONST_ME_HITAREA, target = true }, { name = "speed", interval = 2000, chance = 10, speedChange = -300, range = 7, effect = CONST_ME_MAGIC_RED, target = false, duration = 20000 }, } diff --git a/data-otservbr-global/monster/reptiles/carnivostrich.lua b/data-otservbr-global/monster/reptiles/carnivostrich.lua index 64429106100..e0e0e362573 100644 --- a/data-otservbr-global/monster/reptiles/carnivostrich.lua +++ b/data-otservbr-global/monster/reptiles/carnivostrich.lua @@ -93,8 +93,8 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -500, condition = { type = CONDITION_POISON, totalDamage = 480, interval = 4000 } }, { name = "combat", interval = 2500, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -386, maxDamage = -480, range = 7, shootEffect = CONST_ANI_LARGEROCK, target = true }, { name = "combat", interval = 3000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -135, range = 7, shootEffect = CONST_ANI_SMALLSTONE, target = true }, - { name = "combat", interval = 3500, chance = 30, type = COMBAT_DEATHDAMAGE, minDamage = -350, maxDamage = -495, length = 7, spread = 1, effect = CONST_ME_BLACKSMOKE, target = false }, - { name = "combat", interval = 4000, chance = 30, type = COMBAT_ENERGYDAMAGE, minDamage = -280, maxDamage = -320, length = 7, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 3500, chance = 30, type = COMBAT_DEATHDAMAGE, minDamage = -350, maxDamage = -495, length = 7, spread = 0, effect = CONST_ME_BLACKSMOKE, target = false }, + { name = "combat", interval = 4000, chance = 30, type = COMBAT_ENERGYDAMAGE, minDamage = -280, maxDamage = -320, length = 7, spread = 0, effect = CONST_ME_ENERGYHIT, target = false }, { name = "energy chain", interval = 4500, chance = 20, minDamage = -302, maxDamage = -309, range = 3, target = true }, { name = "thunderstorm ring", interval = 5000, chance = 20, minDamage = -325, maxDamage = -415 }, } diff --git a/data-otservbr-global/monster/reptiles/young_goanna.lua b/data-otservbr-global/monster/reptiles/young_goanna.lua index d0da931f485..5f68752fb46 100644 --- a/data-otservbr-global/monster/reptiles/young_goanna.lua +++ b/data-otservbr-global/monster/reptiles/young_goanna.lua @@ -97,7 +97,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -500, condition = { type = CONDITION_POISON, totalDamage = 200, interval = 4000 } }, { name = "combat", interval = 2500, chance = 30, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -490, range = 3, shootEffect = CONST_ANI_EARTH, effect = CONST_ME_HITBYPOISON, target = true }, { name = "combat", interval = 3000, chance = 30, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -500, radius = 1, effect = CONST_ME_GROUNDSHAKER, target = false }, - { name = "combat", interval = 3500, chance = 30, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -490, lenght = 8, spread = 1, effect = CONST_ME_GREEN_RINGS, target = false }, + { name = "combat", interval = 3500, chance = 30, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -490, lenght = 8, spread = 0, effect = CONST_ME_GREEN_RINGS, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/slimes/devourer.lua b/data-otservbr-global/monster/slimes/devourer.lua index f14ad28a233..dace9504b1c 100644 --- a/data-otservbr-global/monster/slimes/devourer.lua +++ b/data-otservbr-global/monster/slimes/devourer.lua @@ -108,7 +108,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 8, type = COMBAT_EARTHDAMAGE, minDamage = -50, maxDamage = -160, range = 7, shootEffect = CONST_ANI_POISON, effect = CONST_ME_GREEN_RINGS, target = true }, { name = "devourer wave", interval = 2000, chance = 5, minDamage = -50, maxDamage = -150, target = false }, { name = "devourer paralyze", interval = 2000, chance = 9, target = false }, - { name = "combat", interval = 2000, chance = 11, type = COMBAT_EARTHDAMAGE, minDamage = -50, maxDamage = -150, length = 1, spread = 1, effect = CONST_ME_SMOKE, target = false }, + { name = "combat", interval = 2000, chance = 11, type = COMBAT_EARTHDAMAGE, minDamage = -50, maxDamage = -150, length = 1, spread = 0, effect = CONST_ME_SMOKE, target = false }, { name = "combat", interval = 2000, chance = 7, type = COMBAT_EARTHDAMAGE, minDamage = -120, maxDamage = -135, radius = 4, effect = CONST_ME_GREEN_RINGS, target = false }, } diff --git a/data-otservbr-global/monster/undeads/ahau.lua b/data-otservbr-global/monster/undeads/ahau.lua index 6d5b70e2ea5..0e86a1d2c98 100644 --- a/data-otservbr-global/monster/undeads/ahau.lua +++ b/data-otservbr-global/monster/undeads/ahau.lua @@ -100,7 +100,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 1700, chance = 100, minDamage = 0, maxDamage = -456, effect = 244 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -350, maxDamage = -422, range = 1, radius = 0, effect = CONST_ME_GREENSMOKE, target = true }, - { name = "combat", interval = 2000, chance = 40, type = COMBAT_FIREDAMAGE, minDamage = -400, maxDamage = -500, length = 5, spread = 1, effect = 216, target = false }, + { name = "combat", interval = 2000, chance = 40, type = COMBAT_FIREDAMAGE, minDamage = -400, maxDamage = -500, length = 5, spread = 0, effect = 216, target = false }, { name = "combat", interval = 2000, chance = 30, type = COMBAT_EARTHDAMAGE, minDamage = -415, maxDamage = -570, radius = 2, effect = CONST_ME_STONE_STORM, target = false }, { name = "boulder ring", interval = 2000, chance = 20, minDamage = -460, maxDamage = -500 }, } diff --git a/data-otservbr-global/monster/undeads/bonebeast.lua b/data-otservbr-global/monster/undeads/bonebeast.lua index eb8ab13ae9c..f97d29cdb03 100644 --- a/data-otservbr-global/monster/undeads/bonebeast.lua +++ b/data-otservbr-global/monster/undeads/bonebeast.lua @@ -96,7 +96,7 @@ monster.attacks = { -- poison { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -50, maxDamage = -60, radius = 3, effect = CONST_ME_POISONAREA, target = false }, -- poison - { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -70, maxDamage = -80, length = 6, spread = 1, effect = CONST_ME_POISONAREA, target = false }, + { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -70, maxDamage = -80, length = 6, spread = 0, effect = CONST_ME_POISONAREA, target = false }, { name = "speed", interval = 2000, chance = 15, speedChange = -600, target = true, duration = 13000 }, } diff --git a/data-otservbr-global/monster/undeads/cursed_prospector.lua b/data-otservbr-global/monster/undeads/cursed_prospector.lua index 5bbe7650949..d9cca0090f5 100644 --- a/data-otservbr-global/monster/undeads/cursed_prospector.lua +++ b/data-otservbr-global/monster/undeads/cursed_prospector.lua @@ -89,8 +89,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -200 }, - { name = "combat", interval = 1700, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -550, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, target = true }, - { name = "combat", interval = 1700, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -150, maxDamage = -550, length = 4, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 1700, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -550, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, effect = CONST_ME_HITBYPOISON, target = true }, + { name = "combat", interval = 1700, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -150, maxDamage = -550, length = 4, spread = 0, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 1700, chance = 35, type = COMBAT_DEATHDAMAGE, minDamage = -150, maxDamage = -550, radius = 3, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 1700, chance = 35, type = COMBAT_HOLYDAMAGE, minDamage = -250, maxDamage = -550, radius = 3, effect = CONST_ME_HOLYAREA, target = false }, { name = "combat", interval = 2000, chance = 13, type = COMBAT_ENERGYDAMAGE, minDamage = -400, maxDamage = -550, range = 4, radius = 4, effect = CONST_ME_ENERGYAREA, target = true }, diff --git a/data-otservbr-global/monster/undeads/evil_prospector.lua b/data-otservbr-global/monster/undeads/evil_prospector.lua index 1b5845f316a..5b12a767672 100644 --- a/data-otservbr-global/monster/undeads/evil_prospector.lua +++ b/data-otservbr-global/monster/undeads/evil_prospector.lua @@ -85,8 +85,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -500 }, - { name = "combat", interval = 1700, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -250, maxDamage = -550, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, target = true }, - { name = "combat", interval = 1700, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -250, maxDamage = -550, length = 4, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 1700, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -250, maxDamage = -550, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, effect = CONST_ME_HITBYPOISON, target = true }, + { name = "combat", interval = 1700, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -250, maxDamage = -550, length = 4, spread = 0, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 1700, chance = 35, type = COMBAT_DEATHDAMAGE, minDamage = -250, maxDamage = -550, radius = 3, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 1700, chance = 35, type = COMBAT_HOLYDAMAGE, minDamage = -250, maxDamage = -400, radius = 3, effect = CONST_ME_HOLYAREA, target = false }, { name = "combat", interval = 1700, chance = 13, type = COMBAT_ENERGYDAMAGE, minDamage = -400, maxDamage = -450, range = 4, radius = 4, effect = CONST_ME_ENERGYAREA, target = true }, diff --git a/data-otservbr-global/monster/undeads/falcon_knight.lua b/data-otservbr-global/monster/undeads/falcon_knight.lua index 99cc168f114..54a23130758 100644 --- a/data-otservbr-global/monster/undeads/falcon_knight.lua +++ b/data-otservbr-global/monster/undeads/falcon_knight.lua @@ -105,7 +105,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400 }, { name = "combat", interval = 2000, chance = 18, type = COMBAT_EARTHDAMAGE, minDamage = -400, maxDamage = -500, radius = 2, effect = CONST_ME_GROUNDSHAKER, target = false }, - { name = "combat", interval = 2000, chance = 14, type = COMBAT_HOLYDAMAGE, minDamage = -290, maxDamage = -360, length = 5, spread = 1, effect = CONST_ME_BLOCKHIT, target = false }, + { name = "combat", interval = 2000, chance = 14, type = COMBAT_HOLYDAMAGE, minDamage = -290, maxDamage = -360, length = 5, spread = 0, effect = CONST_ME_BLOCKHIT, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/undeads/falcon_paladin.lua b/data-otservbr-global/monster/undeads/falcon_paladin.lua index dc9eac4d7b6..799143fe943 100644 --- a/data-otservbr-global/monster/undeads/falcon_paladin.lua +++ b/data-otservbr-global/monster/undeads/falcon_paladin.lua @@ -98,7 +98,7 @@ monster.attacks = { { name = "combat", interval = 2000, chance = 50, type = COMBAT_PHYSICALDAMAGE, minDamage = -400, maxDamage = -550, range = 5, shootEffect = CONST_ANI_ROYALSPEAR, target = true }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = -200, maxDamage = 500, range = 5, shootEffect = CONST_ANI_BOLT, target = true }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_ENERGYDAMAGE, minDamage = -350, maxDamage = -450, range = 7, radius = 2, shootEffect = CONST_ANI_POWERBOLT, effect = CONST_ME_ENERGYHIT, target = true }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -250, maxDamage = -350, length = 5, spread = 1, effect = CONST_ME_PURPLEENERGY, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_ENERGYDAMAGE, minDamage = -250, maxDamage = -350, length = 5, spread = 0, effect = CONST_ME_PURPLEENERGY, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/undeads/flimsy_lost_soul.lua b/data-otservbr-global/monster/undeads/flimsy_lost_soul.lua index 9391f776ed3..7ff4d5bc65f 100644 --- a/data-otservbr-global/monster/undeads/flimsy_lost_soul.lua +++ b/data-otservbr-global/monster/undeads/flimsy_lost_soul.lua @@ -90,8 +90,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -500 }, - { name = "combat", interval = 1700, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -150, maxDamage = -550, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, target = true }, - { name = "combat", interval = 1700, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -150, maxDamage = -550, length = 4, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 1700, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -150, maxDamage = -550, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, effect = CONST_ME_HITBYPOISON, target = true }, + { name = "combat", interval = 1700, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -150, maxDamage = -550, length = 4, spread = 0, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 1700, chance = 35, type = COMBAT_DEATHDAMAGE, minDamage = -150, maxDamage = -550, radius = 3, effect = CONST_ME_MORTAREA, target = false }, } diff --git a/data-otservbr-global/monster/undeads/freakish_lost_soul.lua b/data-otservbr-global/monster/undeads/freakish_lost_soul.lua index a7776bec5c6..ec039b48d86 100644 --- a/data-otservbr-global/monster/undeads/freakish_lost_soul.lua +++ b/data-otservbr-global/monster/undeads/freakish_lost_soul.lua @@ -87,8 +87,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -500 }, - { name = "combat", interval = 1700, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -550, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, target = true }, - { name = "combat", interval = 1700, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -150, maxDamage = -550, length = 4, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 1700, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -550, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, effect = CONST_ME_HITBYPOISON, target = true }, + { name = "combat", interval = 1700, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -150, maxDamage = -550, length = 4, spread = 0, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 1700, chance = 35, type = COMBAT_DEATHDAMAGE, minDamage = -150, maxDamage = -550, radius = 4, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 1700, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -150, maxDamage = -550, radius = 4, effect = CONST_ME_ENERGYAREA, target = false }, } diff --git a/data-otservbr-global/monster/undeads/grim_reaper.lua b/data-otservbr-global/monster/undeads/grim_reaper.lua index f27fbd561a8..b43c7cc64fb 100644 --- a/data-otservbr-global/monster/undeads/grim_reaper.lua +++ b/data-otservbr-global/monster/undeads/grim_reaper.lua @@ -102,9 +102,9 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -320 }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -165, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -350, maxDamage = -720, length = 8, spread = 1, effect = CONST_ME_MORTAREA, target = false }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -300, length = 7, spread = 1, effect = CONST_ME_EXPLOSIONAREA, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -225, maxDamage = -275, radius = 4, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -350, maxDamage = -720, length = 8, spread = 0, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = 0, maxDamage = -300, length = 7, spread = 0, effect = CONST_ME_EXPLOSIONAREA, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -225, maxDamage = -275, radius = 4, effect = CONST_ME_MORTAREA, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/undeads/iks_aucar.lua b/data-otservbr-global/monster/undeads/iks_aucar.lua index 36f76461f52..26bfc867d9b 100644 --- a/data-otservbr-global/monster/undeads/iks_aucar.lua +++ b/data-otservbr-global/monster/undeads/iks_aucar.lua @@ -96,7 +96,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -250, effect = CONST_ME_PURPLEENERGY }, - { name = "combat", interval = 2000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -75, maxDamage = -100, length = 7, spread = 1, effect = 216, target = false }, + { name = "combat", interval = 2000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -75, maxDamage = -100, length = 7, spread = 0, effect = 216, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -160, range = 1, radius = 0, effect = CONST_ME_EXPLOSIONHIT, target = true }, } diff --git a/data-otservbr-global/monster/undeads/iks_churrascan.lua b/data-otservbr-global/monster/undeads/iks_churrascan.lua index 53b01ede306..704e40a53fa 100644 --- a/data-otservbr-global/monster/undeads/iks_churrascan.lua +++ b/data-otservbr-global/monster/undeads/iks_churrascan.lua @@ -86,7 +86,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -250, effect = CONST_ME_PURPLEENERGY }, - { name = "combat", interval = 2000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -75, maxDamage = -100, length = 7, spread = 1, effect = 216, target = false }, + { name = "combat", interval = 2000, chance = 40, type = COMBAT_PHYSICALDAMAGE, minDamage = -75, maxDamage = -100, length = 7, spread = 0, effect = 216, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -160, range = 1, radius = 0, effect = CONST_ME_EXPLOSIONHIT, target = true }, } diff --git a/data-otservbr-global/monster/undeads/iks_pututu.lua b/data-otservbr-global/monster/undeads/iks_pututu.lua index 83dc533cb55..460aa7eb511 100644 --- a/data-otservbr-global/monster/undeads/iks_pututu.lua +++ b/data-otservbr-global/monster/undeads/iks_pututu.lua @@ -89,7 +89,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -150 }, { name = "combat", interval = 2000, chance = 30, type = COMBAT_FIREDAMAGE, minDamage = -80, maxDamage = -90, radius = 2, effect = CONST_ME_FIREAREA, target = false }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -75, maxDamage = -95, length = 8, spread = 1, effect = CONST_ME_STONE_STORM, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -75, maxDamage = -95, length = 8, spread = 0, effect = CONST_ME_STONE_STORM, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -98, maxDamage = -114, range = 7, radius = 1, shootEffect = CONST_ANI_POISON, effect = CONST_ME_POISONAREA, target = true }, } diff --git a/data-otservbr-global/monster/undeads/lich.lua b/data-otservbr-global/monster/undeads/lich.lua index 3e04e6d3b9c..f6caeb4ae96 100644 --- a/data-otservbr-global/monster/undeads/lich.lua +++ b/data-otservbr-global/monster/undeads/lich.lua @@ -114,8 +114,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -75 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -140, maxDamage = -190, length = 7, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, -- poison - { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -300, maxDamage = -400, length = 7, spread = 1, effect = CONST_ME_HITBYPOISON, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -140, maxDamage = -190, length = 7, spread = 0, effect = CONST_ME_MAGIC_RED, target = false }, -- poison + { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -300, maxDamage = -400, length = 7, spread = 0, effect = CONST_ME_HITBYPOISON, target = false }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -200, maxDamage = -245, range = 1, effect = CONST_ME_MAGIC_RED, target = true }, { name = "speed", interval = 2000, chance = 15, speedChange = -300, range = 7, effect = CONST_ME_MAGIC_RED, target = false, duration = 30000 }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_LIFEDRAIN, minDamage = -130, maxDamage = -195, radius = 3, effect = CONST_ME_MAGIC_RED, target = false }, diff --git a/data-otservbr-global/monster/undeads/lost_soul.lua b/data-otservbr-global/monster/undeads/lost_soul.lua index 3da38eb4149..d00e9eb9d18 100644 --- a/data-otservbr-global/monster/undeads/lost_soul.lua +++ b/data-otservbr-global/monster/undeads/lost_soul.lua @@ -102,7 +102,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -420 }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -40, maxDamage = -210, length = 3, spread = 1, effect = CONST_ME_MAGIC_RED, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -40, maxDamage = -210, length = 3, spread = 0, effect = CONST_ME_MAGIC_RED, target = false }, { name = "speed", interval = 2000, chance = 20, speedChange = -800, radius = 6, effect = CONST_ME_SMALLCLOUDS, target = false, duration = 4000 }, } diff --git a/data-otservbr-global/monster/undeads/mean_lost_soul.lua b/data-otservbr-global/monster/undeads/mean_lost_soul.lua index e49a3aa6668..8c25b2c4f4f 100644 --- a/data-otservbr-global/monster/undeads/mean_lost_soul.lua +++ b/data-otservbr-global/monster/undeads/mean_lost_soul.lua @@ -89,8 +89,8 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -500 }, - { name = "combat", interval = 1700, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -550, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, target = true }, - { name = "combat", interval = 1700, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -550, length = 4, spread = 1, effect = CONST_ME_ENERGYHIT, target = false }, + { name = "combat", interval = 1700, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -300, maxDamage = -550, radius = 3, shootEffect = CONST_ANI_ENVENOMEDARROW, effect = CONST_ME_HITBYPOISON, target = true }, + { name = "combat", interval = 1700, chance = 25, type = COMBAT_ENERGYDAMAGE, minDamage = -300, maxDamage = -550, length = 4, spread = 0, effect = CONST_ME_ENERGYHIT, target = false }, { name = "combat", interval = 1700, chance = 35, type = COMBAT_DEATHDAMAGE, minDamage = -300, maxDamage = -550, radius = 3, effect = CONST_ME_MORTAREA, target = false }, } diff --git a/data-otservbr-global/monster/undeads/paladin's_apparition.lua b/data-otservbr-global/monster/undeads/paladin's_apparition.lua index 440eea9a089..066266e70e3 100644 --- a/data-otservbr-global/monster/undeads/paladin's_apparition.lua +++ b/data-otservbr-global/monster/undeads/paladin's_apparition.lua @@ -100,7 +100,7 @@ monster.attacks = { { name = "ice chain", interval = 5000, chance = 20, minDamage = -1050, maxDamage = -1300, range = 7 }, { name = "combat", interval = 9500, chance = 52, type = COMBAT_HOLYDAMAGE, minDamage = -1050, maxDamage = -1300, range = 7, shootEffect = CONST_ANI_HOLY, effect = CONST_ME_HOLYDAMAGE, target = true }, { name = "combat", interval = 3000, chance = 22, type = COMBAT_HOLYDAMAGE, minDamage = -1200, maxDamage = -1400, radius = 4, effect = CONST_ME_HOLYAREA, target = false }, - { name = "combat", interval = 4000, chance = 23, type = COMBAT_PHYSICALDAMAGE, minDamage = -900, maxDamage = -1350, radius = 4, shootEffect = CONST_ANI_EXPLOSION, range = 7, target = true }, + { name = "combat", interval = 4000, chance = 23, type = COMBAT_PHYSICALDAMAGE, minDamage = -900, maxDamage = -1350, radius = 4, shootEffect = CONST_ANI_EXPLOSION, range = 7, effect = CONST_ME_EXPLOSIONHIT, target = true }, } monster.defenses = { diff --git a/data-otservbr-global/monster/undeads/rot_elemental.lua b/data-otservbr-global/monster/undeads/rot_elemental.lua index db6da4d727a..2c414687093 100644 --- a/data-otservbr-global/monster/undeads/rot_elemental.lua +++ b/data-otservbr-global/monster/undeads/rot_elemental.lua @@ -96,7 +96,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, skill = 58, attack = 50, condition = { type = CONDITION_POISON, totalDamage = 280, interval = 4000 } }, { name = "combat", interval = 2000, chance = 13, type = COMBAT_EARTHDAMAGE, minDamage = -150, maxDamage = -250, range = 7, radius = 3, shootEffect = CONST_ANI_GLOOTHSPEAR, effect = CONST_ME_POISONAREA, target = true }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -150, maxDamage = -230, length = 6, spread = 1, effect = CONST_ME_POISONAREA, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = -150, maxDamage = -230, length = 6, spread = 0, effect = CONST_ME_POISONAREA, target = false }, -- poison { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -200, maxDamage = -300, range = 7, shootEffect = CONST_ANI_POISON, effect = CONST_ME_POISONAREA, target = true }, { name = "rot elemental paralyze", interval = 2000, chance = 11, target = false }, diff --git a/data-otservbr-global/monster/undeads/undead_dragon.lua b/data-otservbr-global/monster/undeads/undead_dragon.lua index 5e604be6c5a..0dc1652d85f 100644 --- a/data-otservbr-global/monster/undeads/undead_dragon.lua +++ b/data-otservbr-global/monster/undeads/undead_dragon.lua @@ -109,7 +109,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -480 }, - { name = "combat", interval = 2000, chance = 5, type = COMBAT_PHYSICALDAMAGE, minDamage = -300, maxDamage = -400, range = 7, radius = 4, target = true }, + { name = "combat", interval = 2000, chance = 5, type = COMBAT_PHYSICALDAMAGE, minDamage = -300, maxDamage = -400, range = 7, radius = 4, effect = CONST_ME_HITAREA, target = true }, { name = "combat", interval = 2000, chance = 10, type = COMBAT_DEATHDAMAGE, minDamage = -125, maxDamage = -600, range = 7, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_SMALLCLOUDS, target = false }, { name = "combat", interval = 2000, chance = 5, type = COMBAT_EARTHDAMAGE, minDamage = -100, maxDamage = -390, range = 7, radius = 4, shootEffect = CONST_ANI_POISON, effect = CONST_ME_POISONAREA, target = true }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_EARTHDAMAGE, minDamage = 0, maxDamage = -180, range = 7, shootEffect = CONST_ANI_POISON, effect = CONST_ME_POISONAREA, target = true }, diff --git a/data-otservbr-global/monster/undeads/vicious_manbat.lua b/data-otservbr-global/monster/undeads/vicious_manbat.lua index 0c50b15fe44..8de69a1bc26 100644 --- a/data-otservbr-global/monster/undeads/vicious_manbat.lua +++ b/data-otservbr-global/monster/undeads/vicious_manbat.lua @@ -80,10 +80,10 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -215 }, - { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -250, radius = 3, target = false }, + { name = "combat", interval = 2000, chance = 15, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -250, radius = 3, effect = CONST_ME_HITAREA, target = false }, { name = "speed", interval = 2000, chance = 15, radius = 1, effect = CONST_ME_BATS, target = true }, -- bleed - { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 20, minDamage = -400, maxDamage = -600, radius = 2, target = false }, + { name = "condition", type = CONDITION_BLEEDING, interval = 2000, chance = 20, minDamage = -400, maxDamage = -600, radius = 2, effect = CONST_ME_DRAWBLOOD, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/vermins/cave_devourer.lua b/data-otservbr-global/monster/vermins/cave_devourer.lua index 15d639d4d9d..1283ac20b81 100644 --- a/data-otservbr-global/monster/vermins/cave_devourer.lua +++ b/data-otservbr-global/monster/vermins/cave_devourer.lua @@ -93,10 +93,10 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400 }, - { name = "stalagmite rune", interval = 2000, chance = 15, minDamage = -190, maxDamage = -300, range = 7, length = 6, spread = 3, shootEffect = CONST_ANI_POISON, target = false }, + { name = "stalagmite rune", interval = 2000, chance = 15, minDamage = -190, maxDamage = -300, range = 7, shootEffect = CONST_ANI_POISON, target = true }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_DEATHDAMAGE, minDamage = -70, maxDamage = -160, range = 3, length = 6, spread = 3, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -90, maxDamage = -160, range = 3, length = 6, spread = 3, effect = CONST_ME_HITBYFIRE, target = false }, - { name = "stone shower rune", interval = 2000, chance = 10, minDamage = -230, maxDamage = -450, range = 7, target = false }, + { name = "stone shower rune", interval = 2000, chance = 10, minDamage = -230, maxDamage = -450, range = 7, radius = 3, effect = CONST_ME_STONES, target = true }, } monster.defenses = { diff --git a/data-otservbr-global/monster/vermins/eyeless_devourer.lua b/data-otservbr-global/monster/vermins/eyeless_devourer.lua index 2c7b266144b..1c45264bd8a 100644 --- a/data-otservbr-global/monster/vermins/eyeless_devourer.lua +++ b/data-otservbr-global/monster/vermins/eyeless_devourer.lua @@ -102,7 +102,7 @@ monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400, effect = CONST_ME_DRAWBLOOD }, { name = "combat", interval = 2750, chance = 20, type = COMBAT_ENERGYDAMAGE, minDamage = -700, maxDamage = -800, range = 5, shootEffect = CONST_ANI_ENERGY, effect = CONST_ME_ENERGYAREA, target = true }, { name = "combat", interval = 2000, chance = 60, type = COMBAT_ENERGYDAMAGE, minDamage = -500, maxDamage = -700, radius = 3, effect = CONST_ME_ENERGYAREA, target = false }, - { name = "combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -500, maxDamage = -560, length = 5, spread = 1, effect = CONST_ME_GREEN_RINGS, target = false }, + { name = "combat", interval = 2000, chance = 20, type = COMBAT_EARTHDAMAGE, minDamage = -500, maxDamage = -560, length = 5, spread = 0, effect = CONST_ME_GREEN_RINGS, target = false }, } monster.defenses = { diff --git a/data-otservbr-global/monster/vermins/lavafungus.lua b/data-otservbr-global/monster/vermins/lavafungus.lua index 6f5ecad3de9..c25d314a85d 100644 --- a/data-otservbr-global/monster/vermins/lavafungus.lua +++ b/data-otservbr-global/monster/vermins/lavafungus.lua @@ -101,7 +101,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -810 }, - { name = "combat", interval = 2000, chance = 50, type = COMBAT_DEATHDAMAGE, minDamage = -560, maxDamage = -650, length = 6, spread = 1, effect = CONST_ME_MORTAREA, target = false }, + { name = "combat", interval = 2000, chance = 50, type = COMBAT_DEATHDAMAGE, minDamage = -560, maxDamage = -650, length = 6, spread = 0, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 2750, chance = 40, type = COMBAT_FIREDAMAGE, minDamage = -490, maxDamage = -720, range = 5, shootEffect = CONST_ANI_FIRE, target = true }, { name = "combat", interval = 2750, chance = 30, type = COMBAT_DEATHDAMAGE, minDamage = -720, maxDamage = -810, range = 5, shootEffect = CONST_ANI_SUDDENDEATH, effect = CONST_ME_MORTAREA, target = true }, { name = "lavafungus ring", interval = 2000, chance = 20, minDamage = -450, maxDamage = -610 }, diff --git a/data-otservbr-global/monster/vermins/tremendous_tyrant.lua b/data-otservbr-global/monster/vermins/tremendous_tyrant.lua index 82cb7ce1ef6..3cc624556e9 100644 --- a/data-otservbr-global/monster/vermins/tremendous_tyrant.lua +++ b/data-otservbr-global/monster/vermins/tremendous_tyrant.lua @@ -100,7 +100,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400 }, - { name = "combat", interval = 2000, chance = 40, type = COMBAT_ICEDAMAGE, minDamage = -600, maxDamage = -650, length = 5, spread = 1, effect = CONST_ME_ICEATTACK, target = false }, + { name = "combat", interval = 2000, chance = 40, type = COMBAT_ICEDAMAGE, minDamage = -600, maxDamage = -650, length = 5, spread = 0, effect = CONST_ME_ICEATTACK, target = false }, { name = "combat", interval = 2000, chance = 20, type = COMBAT_ICEDAMAGE, minDamage = -600, maxDamage = -700, radius = 4, shootEffect = CONST_ANI_ICE, effect = CONST_ME_ICEAREA, target = false }, -- avalanche { name = "combat", interval = 2000, chance = 30, type = COMBAT_HOLYDAMAGE, minDamage = -750, maxDamage = -950, range = 5, shootEffect = CONST_ANI_HOLY, effect = CONST_ME_HOLYAREA, target = true }, } diff --git a/data-otservbr-global/monster/vermins/tunnel_tyrant.lua b/data-otservbr-global/monster/vermins/tunnel_tyrant.lua index 2299354f240..f8e3b7bfb03 100644 --- a/data-otservbr-global/monster/vermins/tunnel_tyrant.lua +++ b/data-otservbr-global/monster/vermins/tunnel_tyrant.lua @@ -92,10 +92,10 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400 }, - { name = "stalagmite rune", interval = 2000, chance = 15, minDamage = -190, maxDamage = -300, range = 7, length = 6, spread = 3, shootEffect = CONST_ANI_POISON, target = false }, + { name = "stalagmite rune", interval = 2000, chance = 15, minDamage = -190, maxDamage = -300, range = 7, shootEffect = CONST_ANI_POISON, target = true }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_DEATHDAMAGE, minDamage = -70, maxDamage = -160, range = 3, length = 6, spread = 3, effect = CONST_ME_MORTAREA, target = false }, { name = "combat", interval = 2000, chance = 15, type = COMBAT_FIREDAMAGE, minDamage = -90, maxDamage = -160, range = 3, length = 6, spread = 3, effect = CONST_ME_HITBYFIRE, target = false }, - { name = "stone shower rune", interval = 2000, chance = 10, minDamage = -230, maxDamage = -450, range = 7, target = false }, + { name = "stone shower rune", interval = 2000, chance = 10, minDamage = -230, maxDamage = -450, range = 7, radius = 3, effect = CONST_ME_STONES, target = true }, } monster.defenses = { diff --git a/data-otservbr-global/monster/vermins/wiggler.lua b/data-otservbr-global/monster/vermins/wiggler.lua index 76c994cdff5..bfce930b104 100644 --- a/data-otservbr-global/monster/vermins/wiggler.lua +++ b/data-otservbr-global/monster/vermins/wiggler.lua @@ -98,7 +98,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -200, condition = { type = CONDITION_POISON, totalDamage = 500, interval = 4000 } }, - { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -180, maxDamage = -270, length = 4, spread = 3, target = false }, + { name = "combat", interval = 2000, chance = 10, type = COMBAT_EARTHDAMAGE, minDamage = -180, maxDamage = -270, length = 4, spread = 3, effect = CONST_ME_HITBYPOISON, target = false }, -- poison { name = "condition", type = CONDITION_POISON, interval = 2000, chance = 10, minDamage = -160, maxDamage = -200, range = 7, shootEffect = CONST_ANI_POISONARROW, effect = CONST_ME_SMALLPLANTS, target = false }, { name = "speed", interval = 2000, chance = 15, speedChange = -700, length = 3, spread = 2, effect = CONST_ME_HITAREA, target = false, duration = 30000 }, diff --git a/data-otservbr-global/scripts/lib/register_monster_type.lua b/data-otservbr-global/scripts/lib/register_monster_type.lua index 6fbf56f8269..49537ac9c4c 100644 --- a/data-otservbr-global/scripts/lib/register_monster_type.lua +++ b/data-otservbr-global/scripts/lib/register_monster_type.lua @@ -931,6 +931,11 @@ function readSpell(incomingLua, mtype) spell:setConditionDamage(incomingLua.condition.totalDamage, incomingLua.condition.totalDamage, 0) end + local isArea = (incomingLua.radius and incomingLua.radius > 1) or incomingLua.length or incomingLua.spread + if isArea and incomingLua.effect == nil and not string.find(incomingLua.name, "field") then + logger.warn("[readSpell] - Monster {}: Spell {} is area but has no effect. Set to `false` explicitly to supress this alert and hide the effect", mtype:name(), incomingLua.name) + spell:setCombatEffect(CONST_ME_POFF) + end elseif incomingLua.script then spell:setScriptName("monster/" .. incomingLua.script .. ".lua") if incomingLua.interval then From ddb5b40e5aea809fd3dc512842715357d774469b Mon Sep 17 00:00:00 2001 From: Luan Santos Date: Mon, 11 Dec 2023 13:13:22 -0800 Subject: [PATCH 23/28] fix: do not award bosstiary/bestiary points for summons (#2017) Fixes #1832 --- src/creatures/players/player.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/creatures/players/player.cpp b/src/creatures/players/player.cpp index 87070d95594..99af9d2fc84 100644 --- a/src/creatures/players/player.cpp +++ b/src/creatures/players/player.cpp @@ -4692,7 +4692,7 @@ bool Player::onKilledMonster(const std::shared_ptr &monster) { if (hasFlag(PlayerFlags_t::NotGenerateLoot)) { monster->setDropLoot(false); } - if (monster->isSummon()) { + if (monster->hasBeenSummoned()) { return false; } auto mType = monster->getMonsterType(); From c5ff05c3e4115f178649cf5496b1689c5417d58d Mon Sep 17 00:00:00 2001 From: Luan Santos Date: Mon, 11 Dec 2023 14:01:30 -0800 Subject: [PATCH 24/28] fix: missing spell effect and file (#2020) --- .../monster/reptiles/two-headed_turtle.lua | 2 +- .../scripts/spells/monster/sparks_chain.lua | 22 +++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 data-otservbr-global/scripts/spells/monster/sparks_chain.lua diff --git a/data-otservbr-global/monster/reptiles/two-headed_turtle.lua b/data-otservbr-global/monster/reptiles/two-headed_turtle.lua index 6ae829f08da..89d8b24c975 100644 --- a/data-otservbr-global/monster/reptiles/two-headed_turtle.lua +++ b/data-otservbr-global/monster/reptiles/two-headed_turtle.lua @@ -91,7 +91,7 @@ monster.loot = { monster.attacks = { { name = "melee", interval = 2000, chance = 100, minDamage = -100, maxDamage = -300 }, { name = "combat", interval = 2500, chance = 35, type = COMBAT_ENERGYDAMAGE, minDamage = -100, maxDamage = -300, radius = 4, target = false, effect = CONST_ME_ENERGYHIT }, - { name = "combat", interval = 2000, chance = 35, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -300, radius = 3, target = true, effect = CONST_ME_GHOSTLYBITE }, + { name = "combat", interval = 2000, chance = 35, type = COMBAT_LIFEDRAIN, minDamage = -100, maxDamage = -300, radius = 3, target = true, effect = CONST_ME_GHOSTLY_BITE }, { name = "combat", interval = 3000, chance = 45, type = COMBAT_PHYSICALDAMAGE, minDamage = -100, maxDamage = -300, range = 1, radius = 1, target = true, effect = CONST_ME_EXPLOSIONAREA }, } diff --git a/data-otservbr-global/scripts/spells/monster/sparks_chain.lua b/data-otservbr-global/scripts/spells/monster/sparks_chain.lua new file mode 100644 index 00000000000..2134252d9f2 --- /dev/null +++ b/data-otservbr-global/scripts/spells/monster/sparks_chain.lua @@ -0,0 +1,22 @@ +local combat = Combat() +combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_LIFEDRAIN) +combat:setParameter(COMBAT_PARAM_CHAIN_EFFECT, CONST_ME_MAGIC_RED) + +function getChainValue(creature) + return 2, 3, false +end + +combat:setCallback(CALLBACK_PARAM_CHAINVALUE, "getChainValue") + +local spell = Spell("instant") + +function spell.onCastSpell(creature, var) + return combat:execute(creature, var) +end + +spell:name("sparks chain") +spell:words("###6054") +spell:needLearn(true) +spell:cooldown("2000") +spell:isSelfTarget(true) +spell:register() From 1c01b7ac43cdfef3027615d548e20e6872ea75b9 Mon Sep 17 00:00:00 2001 From: Luan Luciano Date: Mon, 11 Dec 2023 19:04:54 -0300 Subject: [PATCH 25/28] fix: potions conditions for group ids above senior tutors (#2019) Resolves #1989 --- data-otservbr-global/scripts/actions/other/potions.lua | 2 +- data/libs/functions/player.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/data-otservbr-global/scripts/actions/other/potions.lua b/data-otservbr-global/scripts/actions/other/potions.lua index 1cc63639189..febc3ed9d3e 100644 --- a/data-otservbr-global/scripts/actions/other/potions.lua +++ b/data-otservbr-global/scripts/actions/other/potions.lua @@ -239,7 +239,7 @@ function flaskPotion.onUse(player, item, fromPosition, target, toPosition, isHot end local potion = potions[item:getId()] - if potion.level and player:getLevel() < potion.level or potion.vocations and not table.contains(potion.vocations, player:getVocation():getBaseId()) and not (player:getGroup():getId() >= 2) then + if potion.level and player:getLevel() < potion.level or potion.vocations and not table.contains(potion.vocations, player:getVocation():getBaseId()) and not (player:getGroup():getId() >= GROUP_TYPE_GAMEMASTER) then player:say(potion.description, MESSAGE_POTION) return true end diff --git a/data/libs/functions/player.lua b/data/libs/functions/player.lua index b462a4777f6..90e739792cc 100644 --- a/data/libs/functions/player.lua +++ b/data/libs/functions/player.lua @@ -27,7 +27,7 @@ function Player.feed(self, food) end function Player.getClosestFreePosition(self, position, extended) - if self:getGroup():getAccess() and self:getAccountType() >= ACCOUNT_TYPE_GOD then + if self:getGroup():getAccess() and self:getAccountType() == ACCOUNT_TYPE_GOD then return position end return Creature.getClosestFreePosition(self, position, extended) From e570944aee0fa517a9167aa8771d69b8075b70ba Mon Sep 17 00:00:00 2001 From: Luan Santos Date: Tue, 12 Dec 2023 16:03:32 -0800 Subject: [PATCH 26/28] feat: configurable number of players per account (#2000) New keys on config.lua: maxPlayersOnlinePerAccount = 1 maxPlayersOutsidePZPerAccount = 1 This replaces the old `onePlayerOnlinePerAccount`. Setting those numbers to 1 will effectively be equivalent to 'onePlayerOnlinePerAccount = true' from before. But you can tweak these more flexibly now. By setting 'maxPlayersOnlinePerAccount' to greater than 1 and keeping 'maxPlayersOutsidePZPerAccount' you still effectively prevent players from playing multiple chars at once, but you allow them to use a training dummy, for example. Players will be blocked from leaving PZ or using spells even from within PZ if more than 'maxPlayersOutsidePZPerAccount' are already outside of a protection zone. --- config.lua.dist | 3 +- data-otservbr-global/lib/compat/compat.lua | 10 ------ data/libs/functions/game.lua | 12 ------- src/config/config_definitions.hpp | 2 ++ src/config/configmanager.cpp | 3 +- src/creatures/combat/spells.cpp | 19 +++++++++++ src/creatures/players/player.cpp | 32 ++++++++----------- src/game/game.cpp | 16 +++++++--- src/game/game.hpp | 2 +- src/items/tile.cpp | 21 ++++++++++++ .../functions/creatures/npc/npc_functions.cpp | 10 +++--- src/server/network/protocol/protocolgame.cpp | 24 ++++++++++++-- 12 files changed, 99 insertions(+), 55 deletions(-) diff --git a/config.lua.dist b/config.lua.dist index e7dabfcccaa..fec7fb25e72 100644 --- a/config.lua.dist +++ b/config.lua.dist @@ -62,12 +62,13 @@ statusProtocolPort = 7171 maxPlayers = 0 serverName = "OTServBR-Global" serverMotd = "Welcome to the OTServBR-Global!" -onePlayerOnlinePerAccount = true statusTimeout = 5 * 1000 replaceKickOnLogin = true maxPacketsPerSecond = 25 maxItem = 2000 maxContainer = 100 +maxPlayersOnlinePerAccount = 1 +maxPlayersOutsidePZPerAccount = 1 -- Packet Compression -- Minimize network bandwith and reduce ping diff --git a/data-otservbr-global/lib/compat/compat.lua b/data-otservbr-global/lib/compat/compat.lua index 5691dacdb75..f62945e6b26 100644 --- a/data-otservbr-global/lib/compat/compat.lua +++ b/data-otservbr-global/lib/compat/compat.lua @@ -573,16 +573,6 @@ function getOnlinePlayers() return result end -function getPlayersByAccountNumber(accountNumber) - local result = {} - for _, player in ipairs(Game.getPlayers()) do - if player:getAccountId() == accountNumber then - result[#result + 1] = player:getId() - end - end - return result -end - function getPlayerGUIDByName(name) local player = Player(name) if player then diff --git a/data/libs/functions/game.lua b/data/libs/functions/game.lua index 5682f5c5869..e4d40bef318 100644 --- a/data/libs/functions/game.lua +++ b/data/libs/functions/game.lua @@ -58,18 +58,6 @@ function Game.getHouseByPlayerGUID(playerGUID) return nil end -function Game.getPlayersByAccountNumber(accountNumber) - local result = {} - local players, player = Game.getPlayers() - for i = 1, #players do - player = players[i] - if player:getAccountId() == accountNumber then - result[#result + 1] = player - end - end - return result -end - function Game.getPlayersByIPAddress(ip, mask) if not mask then mask = 0xFFFFFFFF diff --git a/src/config/config_definitions.hpp b/src/config/config_definitions.hpp index 582531a3afd..541da679351 100644 --- a/src/config/config_definitions.hpp +++ b/src/config/config_definitions.hpp @@ -131,6 +131,8 @@ enum ConfigKey_t : uint16_t { MAX_MESSAGEBUFFER, MAX_PACKETS_PER_SECOND, MAX_PLAYERS, + MAX_PLAYERS_OUTSIDE_PZ_PER_ACCOUNT, + MAX_PLAYERS_PER_ACCOUNT, MAX_SPEED_ATTACKONFIST, METRICS_ENABLE_OSTREAM, METRICS_ENABLE_PROMETHEUS, diff --git a/src/config/configmanager.cpp b/src/config/configmanager.cpp index fb2f11d3dea..97d1052ad03 100644 --- a/src/config/configmanager.cpp +++ b/src/config/configmanager.cpp @@ -83,7 +83,8 @@ bool ConfigManager::load() { } loadBoolConfig(L, ALLOW_CHANGEOUTFIT, "allowChangeOutfit", true); - loadBoolConfig(L, ONE_PLAYER_ON_ACCOUNT, "onePlayerOnlinePerAccount", 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); diff --git a/src/creatures/combat/spells.cpp b/src/creatures/combat/spells.cpp index 8460feb722b..d684b5433ff 100644 --- a/src/creatures/combat/spells.cpp +++ b/src/creatures/combat/spells.cpp @@ -20,6 +20,25 @@ Spells::Spells() = default; Spells::~Spells() = default; TalkActionResult_t Spells::playerSaySpell(std::shared_ptr player, std::string &words) { + auto maxOnline = g_configManager().getNumber(MAX_PLAYERS_PER_ACCOUNT, __FUNCTION__); + auto tile = player->getTile(); + if (maxOnline > 1 && player->getAccountType() < account::ACCOUNT_TYPE_GAMEMASTER && tile && !tile->hasFlag(TILESTATE_PROTECTIONZONE)) { + auto maxOutsizePZ = g_configManager().getNumber(MAX_PLAYERS_OUTSIDE_PZ_PER_ACCOUNT, __FUNCTION__); + auto accountPlayers = g_game().getPlayersByAccount(player->getAccount()); + int countOutsizePZ = 0; + for (const auto &accountPlayer : accountPlayers) { + if (accountPlayer == player || accountPlayer->isOffline()) { + continue; + } + if (accountPlayer->getTile() && !accountPlayer->getTile()->hasFlag(TILESTATE_PROTECTIONZONE)) { + ++countOutsizePZ; + } + } + if (countOutsizePZ >= maxOutsizePZ) { + player->sendTextMessage(MESSAGE_FAILURE, fmt::format("You cannot cast spells while you have {} character(s) outside of a protection zone.", maxOutsizePZ)); + return TALKACTION_FAILED; + } + } std::string str_words = words; if (player->hasCondition(CONDITION_FEARED)) { diff --git a/src/creatures/players/player.cpp b/src/creatures/players/player.cpp index 99af9d2fc84..47789f5ba18 100644 --- a/src/creatures/players/player.cpp +++ b/src/creatures/players/player.cpp @@ -5987,32 +5987,28 @@ void Player::clearModalWindows() { } uint16_t Player::getHelpers() const { - uint16_t helpers; - if (guild && party) { - phmap::flat_hash_set> helperSet; + const auto &guildMembers = guild->getMembersOnline(); - const auto guildMembers = guild->getMembersOnline(); - helperSet.insert(guildMembers.begin(), guildMembers.end()); + stdext::vector_set> helperSet; + helperSet.insert(helperSet.end(), guildMembers.begin(), guildMembers.end()); + helperSet.insertAll(party->getMembers()); + helperSet.insertAll(party->getInvitees()); - const auto partyMembers = party->getMembers(); - helperSet.insert(partyMembers.begin(), partyMembers.end()); + helperSet.emplace(party->getLeader()); - const auto partyInvitees = party->getInvitees(); - helperSet.insert(partyInvitees.begin(), partyInvitees.end()); + return static_cast(helperSet.size()); + } - helperSet.insert(party->getLeader()); + if (guild) { + return static_cast(guild->getMemberCountOnline()); + } - helpers = helperSet.size(); - } else if (guild) { - helpers = guild->getMemberCountOnline(); - } else if (party) { - helpers = party->getMemberCount() + party->getInvitationCount() + 1; - } else { - helpers = 0; + if (party) { + return static_cast(party->getMemberCount() + party->getInvitationCount() + 1); } - return helpers; + return 0u; } void Player::sendClosePrivate(uint16_t channelId) { diff --git a/src/game/game.cpp b/src/game/game.cpp index 5b973f3776a..d741b24b1a2 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -830,13 +830,19 @@ ReturnValue Game::getPlayerByNameWildcard(const std::string &s, std::shared_ptr< return RETURNVALUE_NOERROR; } -std::shared_ptr Game::getPlayerByAccount(uint32_t acc) { - for (const auto &it : players) { - if (it.second->getAccountId() == acc) { - return it.second; +std::vector> Game::getPlayersByAccount(std::shared_ptr acc, bool allowOffline /* = false */) { + auto [accountPlayers, error] = acc->getAccountPlayers(); + if (error != account::ERROR_NO) { + return {}; + } + std::vector> ret; + for (const auto &[name, _] : accountPlayers) { + auto player = getPlayerByName(name, allowOffline); + if (player) { + ret.push_back(player); } } - return nullptr; + return ret; } bool Game::internalPlaceCreature(std::shared_ptr creature, const Position &pos, bool extendedPos /*=false*/, bool forced /*= false*/, bool creatureCheck /*= false*/) { diff --git a/src/game/game.hpp b/src/game/game.hpp index bbf2e66088c..f446615e29a 100644 --- a/src/game/game.hpp +++ b/src/game/game.hpp @@ -161,7 +161,7 @@ class Game { ReturnValue getPlayerByNameWildcard(const std::string &s, std::shared_ptr &player); - std::shared_ptr getPlayerByAccount(uint32_t acc); + std::vector> getPlayersByAccount(std::shared_ptr acc, bool allowOffline = false); bool internalPlaceCreature(std::shared_ptr creature, const Position &pos, bool extendedPos = false, bool forced = false, bool creatureCheck = false); diff --git a/src/items/tile.cpp b/src/items/tile.cpp index 787c5ed9b31..2b9527095dd 100644 --- a/src/items/tile.cpp +++ b/src/items/tile.cpp @@ -668,6 +668,27 @@ ReturnValue Tile::queryAdd(int32_t, const std::shared_ptr &thing, uint32_ } const auto playerTile = player->getTile(); + // moving from a pz tile to a non-pz tile + if (playerTile && playerTile->hasFlag(TILESTATE_PROTECTIONZONE)) { + auto maxOnline = g_configManager().getNumber(MAX_PLAYERS_PER_ACCOUNT, __FUNCTION__); + if (maxOnline > 1 && player->getAccountType() < account::ACCOUNT_TYPE_GAMEMASTER && !hasFlag(TILESTATE_PROTECTIONZONE)) { + auto maxOutsizePZ = g_configManager().getNumber(MAX_PLAYERS_OUTSIDE_PZ_PER_ACCOUNT, __FUNCTION__); + auto accountPlayers = g_game().getPlayersByAccount(player->getAccount()); + int countOutsizePZ = 0; + for (const auto &accountPlayer : accountPlayers) { + if (accountPlayer == player || accountPlayer->isOffline()) { + continue; + } + if (accountPlayer->getTile() && !accountPlayer->getTile()->hasFlag(TILESTATE_PROTECTIONZONE)) { + ++countOutsizePZ; + } + } + if (countOutsizePZ >= maxOutsizePZ) { + player->sendCreatureSay(player, TALKTYPE_MONSTER_SAY, fmt::format("You can only have {} character{} from your account outside of a protection zone.", maxOutsizePZ == 1 ? "one" : std::to_string(maxOutsizePZ), maxOutsizePZ > 1 ? "s" : ""), &getPosition()); + return RETURNVALUE_NOTPOSSIBLE; + } + } + } if (playerTile && player->isPzLocked()) { if (!playerTile->hasFlag(TILESTATE_PVPZONE)) { // player is trying to enter a pvp zone while being pz-locked diff --git a/src/lua/functions/creatures/npc/npc_functions.cpp b/src/lua/functions/creatures/npc/npc_functions.cpp index 0df0b55041a..c4f447c8823 100644 --- a/src/lua/functions/creatures/npc/npc_functions.cpp +++ b/src/lua/functions/creatures/npc/npc_functions.cpp @@ -384,7 +384,6 @@ int NpcFunctions::luaNpcOpenShopWindowTable(lua_State* L) { lua_pushnil(L); while (lua_next(L, 3) != 0) { const auto tableIndex = lua_gettop(L); - ShopBlock item; auto itemId = getField(L, tableIndex, "clientId"); auto subType = getField(L, tableIndex, "subType"); @@ -397,10 +396,11 @@ int NpcFunctions::luaNpcOpenShopWindowTable(lua_State* L) { auto sellPrice = getField(L, tableIndex, "sell"); auto storageKey = getField(L, tableIndex, "storageKey"); auto storageValue = getField(L, tableIndex, "storageValue"); - auto realName = getFieldString(L, tableIndex, "name"); - g_logger().debug("[{}] item '{}' sell price '{}', buyprice '{}'", __FUNCTION__, realName, sellPrice, buyPrice); - - items.emplace_back(itemId, subType, buyPrice, sellPrice, storageKey, storageValue, std::move(realName)); + auto itemName = getFieldString(L, tableIndex, "itemName"); + if (itemName.empty()) { + itemName = Item::items[itemId].name; + } + items.emplace_back(itemId, subType, buyPrice, sellPrice, storageKey, storageValue, itemName); lua_pop(L, 8); } lua_pop(L, 3); diff --git a/src/server/network/protocol/protocolgame.cpp b/src/server/network/protocol/protocolgame.cpp index 408f6c12904..357c85521fb 100644 --- a/src/server/network/protocol/protocolgame.cpp +++ b/src/server/network/protocol/protocolgame.cpp @@ -515,9 +515,11 @@ void ProtocolGame::login(const std::string &name, uint32_t accountId, OperatingS return; } - if (g_configManager().getBoolean(ONE_PLAYER_ON_ACCOUNT, __FUNCTION__) && player->getAccountType() < account::ACCOUNT_TYPE_GAMEMASTER && g_game().getPlayerByAccount(player->getAccountId())) { + auto onlineCount = g_game().getPlayersByAccount(player->getAccount()).size(); + auto maxOnline = g_configManager().getNumber(MAX_PLAYERS_PER_ACCOUNT, __FUNCTION__); + if (player->getAccountType() < account::ACCOUNT_TYPE_GAMEMASTER && onlineCount >= maxOnline) { g_game().removePlayerUniqueLogin(player); - disconnectClient("You may only login with one character\nof your account at the same time."); + disconnectClient(fmt::format("You may only login with {} character{}\nof your account at the same time.", maxOnline, maxOnline > 1 ? "s" : "")); return; } @@ -570,6 +572,24 @@ void ProtocolGame::login(const std::string &name, uint32_t accountId, OperatingS player->setOperatingSystem(operatingSystem); + const auto tile = g_game().map.getOrCreateTile(player->getLoginPosition()); + // moving from a pz tile to a non-pz tile + if (maxOnline > 1 && player->getAccountType() < account::ACCOUNT_TYPE_GAMEMASTER && !tile->hasFlag(TILESTATE_PROTECTIONZONE)) { + auto maxOutsizePZ = g_configManager().getNumber(MAX_PLAYERS_OUTSIDE_PZ_PER_ACCOUNT, __FUNCTION__); + auto accountPlayers = g_game().getPlayersByAccount(player->getAccount()); + int countOutsizePZ = 0; + for (const auto &accountPlayer : accountPlayers) { + if (accountPlayer != player && accountPlayer->getTile() && !accountPlayer->getTile()->hasFlag(TILESTATE_PROTECTIONZONE)) { + ++countOutsizePZ; + } + } + if (countOutsizePZ >= maxOutsizePZ) { + g_game().removePlayerUniqueLogin(player); + disconnectClient(fmt::format("You can only have {} character{} from your account outside of a protection zone.", maxOutsizePZ == 1 ? "one" : std::to_string(maxOutsizePZ), maxOutsizePZ > 1 ? "s" : "")); + return; + } + } + if (!g_game().placeCreature(player, player->getLoginPosition()) && !g_game().placeCreature(player, player->getTemplePosition(), false, true)) { g_game().removePlayerUniqueLogin(player); disconnectClient("Temple position is wrong. Please, contact the administrator."); From 5c87e81a758651a4c83274fc1c8b05c1ca2d8c60 Mon Sep 17 00:00:00 2001 From: Luan Santos Date: Wed, 13 Dec 2023 19:54:41 -0800 Subject: [PATCH 27/28] improve: more reliable quickloot/autoloot (#1997) Instead of trying to quickloot at a location, we quickloot the corpse directly. This makes it so we deterministically pick up all the loot, instead of losing some depending on how and where monsters are dying. --- src/creatures/creature.cpp | 14 +++++++------- src/game/game.cpp | 8 ++++---- src/game/game.hpp | 8 +------- 3 files changed, 12 insertions(+), 18 deletions(-) diff --git a/src/creatures/creature.cpp b/src/creatures/creature.cpp index 4720b903233..bc77050268d 100644 --- a/src/creatures/creature.cpp +++ b/src/creatures/creature.cpp @@ -800,23 +800,23 @@ bool Creature::dropCorpse(std::shared_ptr lastHitCreature, std::shared corpse->startDecaying(); bool corpses = corpse->isRewardCorpse() || (corpse->getID() == ITEM_MALE_CORPSE || corpse->getID() == ITEM_FEMALE_CORPSE); const auto player = mostDamageCreature ? mostDamageCreature->getPlayer() : nullptr; - if (corpse->getContainer() && player && !corpses) { + auto corpseContainer = corpse->getContainer(); + if (corpseContainer && player && !corpses) { auto monster = getMonster(); if (monster && !monster->isRewardBoss()) { std::ostringstream lootMessage; - lootMessage << "Loot of " << getNameDescription() << ": " << corpse->getContainer()->getContentDescription(player->getProtocolVersion() < 1200) << "."; - auto suffix = corpse->getContainer()->getAttribute(ItemAttribute_t::LOOTMESSAGE_SUFFIX); + lootMessage << "Loot of " << getNameDescription() << ": " << corpseContainer->getContentDescription(player->getProtocolVersion() < 1200) << "."; + auto suffix = corpseContainer->getAttribute(ItemAttribute_t::LOOTMESSAGE_SUFFIX); if (!suffix.empty()) { lootMessage << suffix; } player->sendLootMessage(lootMessage.str()); } - if (player->checkAutoLoot()) { - int32_t pos = tile->getStackposOfItem(player, corpse); + if (player->checkAutoLoot() && corpseContainer && mostDamageCreature->getPlayer()) { g_dispatcher().addEvent( - std::bind(&Game::playerQuickLoot, &g_game(), mostDamageCreature->getID(), this->getPosition(), corpse->getID(), pos - 1, nullptr, false, true), - "Game::playerQuickLoot" + std::bind(&Game::playerQuickLootCorpse, &g_game(), player, corpseContainer), + "Game::playerQuickLootCorpse" ); } } diff --git a/src/game/game.cpp b/src/game/game.cpp index d741b24b1a2..f70af5cf864 100644 --- a/src/game/game.cpp +++ b/src/game/game.cpp @@ -2545,7 +2545,7 @@ ReturnValue Game::internalTeleport(const std::shared_ptr &thing, const Po return RETURNVALUE_NOTPOSSIBLE; } -void Game::internalQuickLootCorpse(std::shared_ptr player, std::shared_ptr corpse) { +void Game::playerQuickLootCorpse(std::shared_ptr player, std::shared_ptr corpse) { if (!player || !corpse) { return; } @@ -5000,11 +5000,11 @@ void Game::playerQuickLoot(uint32_t playerId, const Position &pos, uint16_t item auto rewardId = corpse->getAttribute(ItemAttribute_t::DATE); auto reward = player->getReward(rewardId, false); if (reward) { - internalQuickLootCorpse(player, reward->getContainer()); + playerQuickLootCorpse(player, reward->getContainer()); } } else { if (!lootAllCorpses) { - internalQuickLootCorpse(player, corpse); + playerQuickLootCorpse(player, corpse); } else { playerLootAllCorpses(player, pos, lootAllCorpses); } @@ -5041,7 +5041,7 @@ void Game::playerLootAllCorpses(std::shared_ptr player, const Position & } corpses++; - internalQuickLootCorpse(player, tileCorpse); + playerQuickLootCorpse(player, tileCorpse); if (corpses >= 30) { break; } diff --git a/src/game/game.hpp b/src/game/game.hpp index f446615e29a..263119d3518 100644 --- a/src/game/game.hpp +++ b/src/game/game.hpp @@ -350,6 +350,7 @@ class Game { void playerSetFightModes(uint32_t playerId, FightMode_t fightMode, bool chaseMode, bool secureMode); void playerLookAt(uint32_t playerId, uint16_t itemId, const Position &pos, uint8_t stackPos); void playerLookInBattleList(uint32_t playerId, uint32_t creatureId); + void playerQuickLootCorpse(std::shared_ptr player, std::shared_ptr corpse); void playerQuickLoot(uint32_t playerId, const Position &pos, uint16_t itemId, uint8_t stackPos, std::shared_ptr defaultItem = nullptr, bool lootAllCorpses = false, bool autoLoot = false); void playerLootAllCorpses(std::shared_ptr player, const Position &pos, bool lootAllCorpses); void playerSetLootContainer(uint32_t playerId, ObjectCategory_t category, const Position &pos, uint16_t itemId, uint8_t stackPos); @@ -697,13 +698,6 @@ class Game { void playerSpeakToNpc(std::shared_ptr player, const std::string &text); std::shared_ptr createPlayerTask(uint32_t delay, std::function f, std::string context) const; - /** - * Player wants to loot a corpse - * \param player Player pointer - * \param corpse Container pointer to be looted - */ - void internalQuickLootCorpse(std::shared_ptr player, std::shared_ptr corpse); - /** * @brief Finds the container for loot based on the given parameters. * From 8ed72978bce184525a4de7578f0abd009721b264 Mon Sep 17 00:00:00 2001 From: sebbesiren <35768829+sebbesiren@users.noreply.github.com> Date: Fri, 15 Dec 2023 20:41:54 +0100 Subject: [PATCH 28/28] fix: skill food from hireling (#2028) Hireling food for Skill Choose didnt work due to bad if statement. Added if statement so it works as it should --- data-otservbr-global/npc/hireling.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data-otservbr-global/npc/hireling.lua b/data-otservbr-global/npc/hireling.lua index 11757bff0a5..ca72e1c5bcf 100644 --- a/data-otservbr-global/npc/hireling.lua +++ b/data-otservbr-global/npc/hireling.lua @@ -656,7 +656,7 @@ function createHirelingType(HirelingName) end elseif npcHandler:getTopic(playerId) == TOPIC.BANK then enableBankSystem[playerId] = true - elseif npcHandler:getTopic(playerId) == TOPIC.FOOD then + elseif npcHandler:getTopic(playerId) == TOPIC.FOOD or npcHandler:getTopic(playerId) == TOPIC_FOOD.SKILL_CHOOSE then handleFoodActions(npc, creature, message) elseif npcHandler:getTopic(playerId) == TOPIC.GOODS then -- Ensures players cannot access other shop categories