feat: add Way of the Monk quest, monster updates, and core data improvements
This commit introduces the complete implementation of the Way of the Monk quest, along with multiple updates to monsters, bosses, items, and core gameplay data.
Quest:
• Added full quest definition for Way of the Monk, including mission flow, shrine tracking, and storage handling.
• Registered the new quest module in the quest catalog.
• Introduced new storage keys related to monk quest progression and items.
• Added a sample monk player migration (DB version 55) for testing purposes.
• Added Blue Valley to the towns list to support quest locations.
Monsters and Bosses:
• Added new monster Tame Terror Bird with complete stats, behaviors, and loot.
• Reworked Mitmah Vanguard boss with updated events, attributes, attacks, defenses, elemental modifiers, loot, and lifecycle hooks.
• Expanded loot tables for bosses such as The Brainstealer and The Monster, including monk-related items and potions.
Items and Loot:
• Updated frazzlemaw and guzzlemaw loot to drop traditional sai instead of sai.
• Added monk-related item IDs to destruction scripts and Dawnport cleanup logic.
Gameplay:
• Added Monk’s Apparition to the Soul War quest apparition list.
• Introduced a new combat formula for fist fighting skill.
• Removed legacy fist fighting attack speed configuration from server settings.
Workflow:
• Improved GitHub Actions workflow to ensure reusable checks run on the correct branch.
This update introduces several enhancements to the loot system, allowing
for more flexible loot management across different monsters without the
need to modify each monster's individual script. A global loot option
has been added, which is disabled by default, to assign items that any
monster can drop. This feature simplifies the addition of common loot
across multiple monsters, enhancing the modularity of loot management.
The "registerLoot" function has been improved to eliminate code
duplication and enhance efficiency. The "closeContainer" function has
been updated to remove problematic code that could cause crashes when
"container" used before "erase". Additionally, a new Lua function,
"getMonsterTypeByName", has been introduced to facilitate getting
monster types.
feat: add client and server features for gameplay and UI improvements
- Renamed Supply Stash to Stash and removed depot slot limit count
- Added advanced filters for Stash item categories
- Reworked Cyclopedia Combat Stats into Offense, Defense, and Misc Stats
- Added detailed tooltips and integrated stats into Skills widget
- Introduced Magical Archive interface for spells and runes with filters
- Overhauled Quest Log and Tracker with pinning, search, sort, compact display, and notifications
- Enhanced Exaltation Forge with boots tier bonus and Dust management
- Redesigned Charms System with new Major and Minor charms and balance changes
- Added new mounts and outfits for customization
- Improved server and client behavior with advanced stash, spell archive, detailed stats, and enhanced tier systems
- Verified features through manual and in-game testing
Removed Lua callbacks from `MonsterType` of various monsters. These
callbacks were empty, which meant the functions were still being
"called" by the monsters without performing any action, creating a
significant performance bottleneck.
Removed the `onHear` event callback, which had a significant impact on
the server and was not used anywhere. It executed the `onHear` callback
for each spectator, causing an unnecessary overload without any real
benefit, especially as we have other methods to check for these events.
Additionally, the `monsterOnSpawn` event callback was removed and
replaced with `MonsterType::onSpawn`, which is much more efficient since
it only needs to be declared in the script for each monster that
actually uses it.
Finally, the way `setRewardBoss` was handled was improved. Previously,
it was executed in an `onSpawn` event callback, but now it is done
directly during the parsing of each monster script, marking them as
reward bosses at the time of script loading, improving efficiency.
Remember that for this quest to work properly, it is necessary to delete
the old Soul War scripts (the repository had the quest divided into
parts, and I completely redid it using modern features and systems, such
as BossLever, Zones, EventCallback, and others).
It is also necessary to update the soul war map, the new map is in the
releases
I won’t document all the changes here for obvious reasons; the quest is
mostly written in Lua, so there are many monster scripts and other
elements that were added or modified, making this a large pull request
as a result. I thought about separating the pull request into smaller
commits, but I came to the conclusion that this could cause confusion,
since the quest would depend on several other commits to work correctly,
so I decided to keep everything in one to avoid future "problems".
Added talkactions:
/distanceeffect (for testing distance effects)
/testtaintconditions (for testing taint icons on player inventory bar)
• The "Missing configuration for identifier" log has set to debug, since
in cpp there are default values already to avoid putting all the
values in lua
• Fixed some EventCallbacks that were not properly passing arguments as
references (using std::ref)
• Added a check for EventCallbacks with the same names, improving the
resource management of callbacks. Each time a callback was called, a new
element was created in the vector. Now there will only be one and it
will be reused with each execution
• Passed some vectors from CreatureVector for copying, thus avoiding
possible crashes when changing the vectors, it was necessary due to the
change of maps in ebb and flow in real time (so the player can be in the
creature vector during the vector reading and be removed)
• Added new callback for MonsterType (lua scripts) called "onSpawn",
which will execute whenever the creature is created
• Added new callback for MonsterType (lua scripts) called
"onPlayerAttack", which will be executed whenever a player attacks the
monster, it should be used with care as the same callback will be valid
for all instances of the same monster
• Added new EventCallback called "playerOnThink", thus facilitating
players' onThink
• Added new EventCallbacks called "creatureOnCombat" and "mapOnLoad", to
facilitate the development of the quest
• Added a new function argument on the CreatureEvent
"executeOnPrepareDeath" called "realDamage"
• The Lua function "monster:setType" now includes a new argument called
"restoreHealth" (boolean). This argument determines whether the function
will restore the monster's health after setting its type.
• The Lua function "player:addOutfit" now accept the "outfit name" and
includes new argument called "addon" for setting the outfit's addon
• New Lua function "player:sendCreatureAppear" to update the creature's
appearance to the client (necessary for changing the ebb and flow maps,
same reason I mentioned above, the player is on the map during the
change, so it is necessary to send the update to the client)
• Removed the exception for the message: "The map in folder 'x' is
missing or corrupted", this prevents the console from stopping loading
and closing the server, as in the case of a misconfigured worldchange.
Co-authored-by: Pedro Henrique Alves Cruz <phac@cin.ufpe.br>
Monitoring feature to alert whenever there's a price mismatch between NPCs for item transactions.
This ensures any instance where an item is sold for less than its purchase price, or vice versa, is promptly identified and reported.
Co-authored-by: Leilani A. <168607226+kaleohanopahala@users.noreply.github.com>
Introduced two new monster flags: isPreyable and isPreyExclusive to enhance prey system interactions. isPreyable, when set to false, excludes the monster from prey slot selections and updates dialogues to reflect this unavailability. isPreyExclusive, when true, prevents the monster from appearing in standard (free/gold) rerolls but allows it to be chosen via the 5 preycard option. This update affects 168 monsters, aligning with the prey system specifications outlined on the Tibia Fandom page.
Fix initialization of vector and map from category and others small
things.
---------
Co-authored-by: Elson Costa <elsongabriel@hotmail.com>
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
This pull request addresses an issue where the
Player.addAchievementProgress function was not properly handling null
values, leading to arithmetic errors. The fix ensures that the function
behaves as expected and correctly increments the achievement progress.
Additionally, adjustments were made to the logic to enhance the overall
functionality.
Full achievements system in cpp and send cyclopedia informations. Thanks
for @marcosvf132 to the original pr:
https://github.com/opentibiabr/canary/pull/425/files
---------
Co-authored-by: Marcos <66353315+marcosvf132@users.noreply.github.com>
With this modification, we will be able to focus on just one repository (the canary), and archive otservbr-global repository.
The intention is that we can have two datapacks in the same repository, being able to easily switch from one to the other, just change in config.lua the "dataPackDirectory" from "data-otservbr-global" to "data-canary" or vice versa.
The main purpose is to facilitate our development, at the same time that the community will be able to contribute in a single repository, but keeping the choice of using a "clean" datapack.
I made some more modifications, such as removing the unused C++ gamestore, I also removed the "allowPickupable" tag, which was duplicated, and I made some other adjustments.
Folder structure changes
Now we have the following structure:
• data = this will be the "core" folder, it is where the files that are absolutely necessary for the executable to open correctly, such as libs, xmls, etc. Here we will have files that both the global and the canary datapack will share with each other
• data-otservbr-global = here will be the global datapack files, some libs and folders that are only for the global server, such as scripts, monsters, npcs, world.
• data-canary = a "clean" datapack as far as possible, with only the scripts and files necessary for the server to work.
• NOTE: The "data" folder is actually the "core" of the server, we didn't rename it to avoid having to make changes to the sites and login.php, since they read the "data/xml". The other two folders, data-otservbr-global and data-canary can be changed in config.lua, which one you want the executable to read, by default we'll point to the global one, as that's what most use. If you want to start a custom server with "as few files and scripts as possible", then switch to "data-canary".
We also added a boolean in config.lua that allows choosing another name for the datapack, by default we will also keep this disabled, since we will only maintain support for these two datapacks, it is up to each one to know what they are doing in case they want to change it.
So, in the end, we have the reorganization in the folders:

Note that we made few real changes to the files, the abundance of modified files is due to moving from one folder to another and also adding the global datapack to this repository (with an abundance of files). If you want to migrate your datapack to the global one, you should know what you're doing, if you don't know, just pass your modifications to the "new files" or get in touch on our discord group so we can help you: https://discord.gg/X3mSnMH8jg
It's a tag that works at the compilation level and shouldn't be in config.lua, because the version is always just one and cannot be modified at the configuration level.
Description:
NPCS converted to revscriptsys and removed the npcs xml
Changed jiddo lib to work with revscriptsys npcs, also making several improvements to the lib. And several other functions that have been improved or rework. We also removed all the code from the lib that parse/handle the npcs xml.
Module shop has been removed (a big improvement was made where the shop is now in npcType, more easily and is called directly from source).
Added back storage of npcs spawns in the world folder (there was also a reorganization, where npcs and monsters will be in separate files from now on, as it will be possible to see npcs on the map).
Several other modifications and adaptations to make compatibility possible.
Fix: https://github.com/opentibiabr/otservbr-global-datapack/issues/2
NOTE: This commit will work directly with the pull https://github.com/opentibiabr/otservbr-global-datapack/pull/1 from the otservbr-global repository.
After this commit, the OTServBR-Global will use the Canary Engine, there will no longer be source code in global.
NPCS Lib modifications:
Added new callbacks:
- onCloseChannel (CALLBACK_ON_CLOSE_CHANNEL)
- onMove (CALLBACK_ON_MOVE)
- FocusModule.tradeCallback
- NpcsEvent_t enum: NPCS_EVENT_PLAYER_CLOSE_CHANNEL
Lua functions:
- NpcHandler:getKeywordHandler()
- NpcHandler:getEventDelayedSay(playerId)
- NpcHandler:setEventDelayedSay(playerId, newEventDelayedSay)
- NpcHandler:getEventSay(playerId)
- NpcHandler:setEventSay(playerId, newEventSay)
- NpcHandler:getTalkStart(playerId)
- NpcHandler:setTalkStart(playerId, newTalkStart)
- NpcHandler:getTopic(playerId)
- NpcHandler:setTopic(playerId, newTopic)
- NpcHandler:checkInteraction(npc, player)
- NpcHandler:updateInteraction(npc, player)
- NpcHandler:setInteraction(npc, player)
- NpcHandler:removeInteraction(npc, player)
- NpcHandler:tradeRequest(npc, player, message)
- NpcHandler:onMove(npc, player, fromPosition, toPosition)
- NpcHandler:sendMessages(message, messageTable, npc, player, useDelay, delay)
- FocusModule:setTradeCallback(callback)
- Npc:sayWithDelay(npcId, text, messageType, delay, event, playerId)
- Npc:sendMessage(player, text)
- Npc:isMerchant()
- Npc:closeShopWindow(player)
- Npc:isInTalkRange(playerPosition)
- Npc:move(direction)
- Npc:turn(direction)
- Npc:follow(player)
- Npc:getId()
- Npc:sellItem(player, itemid, amount, <optional> subtype, <optional> actionid, <optional: default: 1> canDropOnMap)
- Npc:getDistanceTo(uid)
- NpcType:getSpeechBubble()
- NpcType:setSpeechBubble()
- Player:getItemIdByCid(itemId)
- Item:getClientId()
- LuaFunctionsLoader::getErrorDesc(ErrorCode_t code) new callback: LUA_ERROR_NPC_TYPE_NOT_FOUND
CPP functions:
- Npc::onPlayerCloseChannel(creature)
- Game::loadCustomMap(name)
- Iomap: loadMonstersCustom(map), loadNpcsCustom(map), loadHousesCustom(map)
Cpp definitions:
- ITEM_FILLED_BATH_TUBE, ITEM_SWORD_RING, ITEM_CLUB_RING, ITEM_DWARVEN_RING, ITEM_RING_HEALING, ITEM_STEALTH_RING, ITEM_TIME_RING, ITEM_PAIR_SOFT_BOOTS, ITEM_PAIR_SOFT_BOOTS_ACTIVATED, ITEM_DEATH_RING, ITEM_DEATH_RING_ACTIVATED, ITEM_PRISMATIC_RING, ITEM_PRISMATIC_RING_ACTIVATED.
Othes:
- Added bank system lib (bank_system.lua)
- TalkAction: /addmoney playername, moneycount
Modified callbacks:
- FROM: CALLBACK_CREATURE_APPEAR, TO: CALLBACK_ON_APPEAR
- FROM: CALLBACK_CREATURE_DISAPPEAR, TO: CALLBACK_ON_DISAPPEAR
- FROM: CALLBACK_CREATURE_SAY, TO: CALLBACK_ON_SAY
- FROM: CALLBACK_ONTHINK, TO: CALLBACK_ON_THINK
- FROM: CALLBACK_PLAYER_ENDTRADE, TO: CALLBACK_PLAYER_END_TRADE
- FROM: CALLBACK_PLAYER_CLOSECHANNEL, TO: CALLBACK_CLOSE_CHANNEL
- FROM: CALLBACK_ONADDFOCUS, TO: CALLBACK_SET_INTERACTION
- FROM: CALLBACK_ONRELEASEFOCUS, TO: CALLBACK_REMOVE_INTERACTION
- FROM: CALLBACK_ONTRADEREQUEST, TO: CALLBACK_ON_TRADE_REQUEST
- FROM: SHOP_TRADEREQUEST, TO: FOCUS_TRADE_MESSAGE
Modified functions:
- From: player:removeMoneyNpc(), to: player:removeMoneyBank(cost)
- From: NpcHandler.eventSay[focus] = nil, to: NpcHandler:setEventSay(playerId, nil)
- From: NpcHandler.eventDelayedSay[focus] = nil, to: NpcHandler:setEventDelayedSay(playerId, nil)
- From: NpcHandler.talkStart[focus] = nil, to: NpcHandler:setTalkStart(playerId, nil)
- From: NpcHandler.topic[focus] = nil, to: NpcHandler:setTopic(playerId, nil)
- From: NpcHandler:onCreatureAppear, to: NpcHandler:onAppear
- From: NpcHandler:onCreatureDisappear, to: NpcHandler:onDisappear
- From: NpcHandler:onCreatureAppear, to: NpcHandler:onAppear
- From: NpcHandler:onCreatureSay, to: NpcHandler:onSay
- From: NpcHandler:onPlayerCloseChannel, to: NpcHandler:onCloseChannel
- From: NpcHandler.topic[playerId] = topicId, to: NpcHandler:setTopic(playerId, topicId)
- From: NpcHandler.topic[playerId] == topicId, to: NpcHandler:getTopic(playerId) == topicId
- From: Charm:cancelMessage(), to: charm:messageCancel()
- From: Charm:logMsg(), to: Charm:messageServerLog()
- msgcontains(message, keyword) = It was refactored so that it identifies the entire string and does not read just one word, generating this issue: https://github.com/opentibiabr/otservbr-global/issues/2736
Removed callbacks:
- NpcHandler: focuses, idleTime, talkRadius, shopItems, MESSAGE_ONBUY, MESSAGE_BOUGHT, MESSAGE_SELL, MESSAGE_ONSELL, MESSAGE_SOLD, MESSAGE_IDLETIMEOUT
- Voice modules
- Shop module
- NpcSystem (It was used to parse XML npcs information)
Removed Lua functions:
- NpcHandler:isFocused
- NpcHandler:releaseFocus
- NpcHandler:onPlayerEndTrade
- NpcHandler:onSell
- doNpcSellItem
- doCreatureSayWithDelay
- doPlayerSellItem
- doPlayerBuyItemContainer
- doPlayerRemoveMoney
- getPlayerMoney
- closeShopWindow
Removed CPP functions:
- Npc:getCurrencyTrading()
Others modifications:
- Changed configkey = From: MAP_CUSTOM_ENABLED, to: TOGGLE_MAP_CUSTOM
- Fixed the load of the custom map, which is now directly in the source and works as a complement to the main map.
- Removed ConfigKey: MAP_CUSTOM_FILE and MAP_CUSTOM_SPAWN
- Some functions are capitalized to indicate that they are global functions, for example: MessageContains(), GetCount(), and others.
Somes familiars fixes and adjusts
Rename from "pet/Pet" to "familiar/Familiar"
Removed "familiar = false" from monsters, this is false by default
Renamed from "mtype:isPet" to "mtype:familiar"
Co-authored-by: @dudantas <eduardo.dantas@hotmail.com.br>
NOTE: The pull request of optimization and enhancement of ItemAttributes is needed for this commit: 419dbd6dbd. If don't use the "ItemAttributes enhancent" commit, the imbuement will crash!
Thanks to @lgrossi for the reviews made and for helping to solve several problems.
Thanks @Glatharth for provide the script for convert tables lua in items.xml: https://gist.github.com/dudantas/548fdbc3c521327c7d5320e27adba8fb
The system has been completely converted to c++
Fixed bugs and adapted the operation to be the same as global tibia
Possibility to imbue the equipped item
Added config.lua key for enable/disable the use of storages by the imbuement system (togleImbuementShrineStorage)
The imbuement of each item is now configured in items.xml in the following settings:
<attribute key="imbuementslot" value="3">
<attribute key="elemental damage" value ="3"/>
<attribute key="life leech" value ="3"/>
<attribute key="mana leech" value ="3"/>
<attribute key="critical hit" value ="3"/>
<attribute key="elemental protection death" value ="3"/>
<attribute key="elemental protection earth" value ="3"/>
<attribute key="elemental protection fire" value ="3"/>
<attribute key="elemental protection ice" value ="3"/>
<attribute key="elemental protection energy" value ="3"/>
<attribute key="elemental protection holy" value ="3"/>
<attribute key="increase speed" value ="3"/>
<attribute key="skillbost axe" value ="3"/>
<attribute key="skillbost sword" value ="3"/>
<attribute key="skillbost club" value ="3"/>
<attribute key="skillbost shielding" value ="3"/>
<attribute key="skillbost distance" value ="3"/>
<attribute key="skillbost magic level" value ="3"/>
<attribute key="increase capacity" value ="3"/>
</attribute>
Where the "imbuementslot" value is from 1 to 3 and the imbuement name values are also from 1 to 3, which is the imbuement level (basic, intricate or powerful), the name must be placed as above, as it is from the name that the value of each imbuement is called by ItemParse.