mirror of
https://github.com/opentibiabr/canary
synced 2026-08-16 06:26:09 -04:00
1. Fixes a minor issue where, when emptying the balloons, they were transformed into 255 instead of being reset to 1. 2. Adjusts the usage of the "bathtub" in datapacks, in addition to the RLMap, ensuring better compatibility. 3. Makes minor aesthetic changes to enhance the code's readability. Resolves #2923
26 lines
528 B
Lua
26 lines
528 B
Lua
local config = {
|
|
[37572] = CONST_ME_GAZHARAGOTH,
|
|
[37573] = CONST_ME_FERUMBRAS_1,
|
|
[37574] = CONST_ME_MAD_MAGE,
|
|
[37575] = CONST_ME_HORESTIS,
|
|
[37576] = CONST_ME_DEVOVORGA,
|
|
}
|
|
|
|
local vessels = Action()
|
|
|
|
function vessels.onUse(player, item, fromPosition, target, toPosition, isHotkey)
|
|
local vessel = config[item.itemid]
|
|
if not vessel or not target:isPlayer() then
|
|
return true
|
|
end
|
|
|
|
toPosition:sendMagicEffect(vessel)
|
|
item:remove(1)
|
|
return true
|
|
end
|
|
|
|
for index in pairs(config) do
|
|
vessels:id(index)
|
|
end
|
|
|
|
vessels:register()
|