Skip to content

Commit

Permalink
Merge branch 'main' into FIX_STAMINA_REGEN
Browse files Browse the repository at this point in the history
  • Loading branch information
elsongabriel authored Jan 2, 2024
2 parents 54ae1ef + 1f5b87c commit bf39cd6
Show file tree
Hide file tree
Showing 78 changed files with 799 additions and 342 deletions.
1 change: 1 addition & 0 deletions config.lua.dist
Original file line number Diff line number Diff line change
Expand Up @@ -474,6 +474,7 @@ location = "South America"
-- The URL layout is https://discord.com/api/webhooks/:id/:token
-- Leave empty if you wish to disable.
discordWebhookURL = ""
discordSendFooter = true

-- Vip System (Get more info in: https://github.com/opentibiabr/canary/pull/1063)
-- NOTE: set vipSystemEnabled to true to enable the vip system functionalities (this overrides premium checks)
Expand Down
2 changes: 1 addition & 1 deletion data-canary/lib/core/constants.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ STACKPOS_FOURTH_ITEM_ABOVE_GROUNDTILE = 4
STACKPOS_FIFTH_ITEM_ABOVE_GROUNDTILE = 5
STACKPOS_TOP_CREATURE = 253
STACKPOS_TOP_FIELD = 254
STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE = 255
STACKPOS_TOP_MOVABLE_ITEM_OR_CREATURE = 255

THING_TYPE_PLAYER = CREATURETYPE_PLAYER + 1
THING_TYPE_MONSTER = CREATURETYPE_MONSTER + 1
Expand Down
2 changes: 1 addition & 1 deletion data-canary/lib/core/storages.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Reserved player action storage key ranges (const.hpp)
[2001 - 2011]
Others reserved player action/storages
[100] = unmoveable/untrade/unusable items
[100] = unmovable/untrade/unusable items
[101] = use pick floor
[102] = well down action
[103-120] = others keys action
Expand Down
2 changes: 1 addition & 1 deletion data-canary/scripts/runes/chameleon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function rune.onCastSpell(creature, variant, isHotkey)
item = Tile(position):getTopDownItem()
end

if not item or item.itemid == 0 or not isMoveable(item.uid) then
if not item or item.itemid == 0 or not isMovable(item.uid) then
creature:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
creature:getPosition():sendMagicEffect(CONST_ME_POFF)
return false
Expand Down
8 changes: 4 additions & 4 deletions data-otservbr-global/lib/compat/compat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ STACKPOS_FOURTH_ITEM_ABOVE_GROUNDTILE = 4
STACKPOS_FIFTH_ITEM_ABOVE_GROUNDTILE = 5
STACKPOS_TOP_CREATURE = 253
STACKPOS_TOP_FIELD = 254
STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE = 255
STACKPOS_TOP_MOVABLE_ITEM_OR_CREATURE = 255

THING_TYPE_PLAYER = CREATURETYPE_PLAYER + 1
THING_TYPE_MONSTER = CREATURETYPE_MONSTER + 1
Expand Down Expand Up @@ -1094,8 +1094,8 @@ function isCorpse(uid)
return i ~= nil and ItemType(i:getId()):isCorpse() or false
end

isItemMoveable = isItemMovable
isMoveable = isMovable
isItemMovable = isItemMovable
isMovable = isMovable

function getItemName(itemId)
return ItemType(itemId):getName()
Expand Down Expand Up @@ -1380,7 +1380,7 @@ function getThingfromPos(pos)

local thing
local stackpos = pos.stackpos or 0
if stackpos == STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE then
if stackpos == STACKPOS_TOP_MOVABLE_ITEM_OR_CREATURE then
thing = tile:getTopCreature()
if thing == nil then
local item = tile:getTopDownItem()
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/lib/core/storages.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Reserved player action storage key ranges (const.h)
[2001 - 2011]
Others reserved player action/storages
[100] = unmoveable/untrade/unusable items
[100] = unmovable/untrade/unusable items
[101] = use pick floor
[102] = well down action
[103-120] = others keys action
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/lib/quests/svargrond_arena.lua
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ function SvargrondArena.resetPit(pitId)
if movableItem and movableItem:isItem() then
local itemType = ItemType(movableItem:getId())
if itemType and itemType:isMovable() and not table.contains(SvargrondArena.itemsNotErasable, movableItem:getId()) then
moveableItem:remove()
movableItem:remove()
end
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,11 @@ monster.loot = {
{ name = "giant topaz", chance = 2041 },
{ name = "dawnfire sherwani", chance = 200 },
{ name = "frostflower boots", chance = 200 },
{ name = "feverbloom boots", chance = 200 },
{ id = 39233, chance = 200 }, -- enchanted turtle amulet
{ name = "midnight tunic", chance = 200 },
{ name = "midnight sarong", chance = 200 },
{ name = "naga quiver", chance = 200 },
{ name = "naga sword", chance = 200 },
{ name = "naga axe", chance = 200 },
{ name = "naga club", chance = 200 },
Expand Down
2 changes: 1 addition & 1 deletion data-otservbr-global/npc/inigo.lua
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ local hints = {
[8] = "Always eat as much {food} as possible. \z
This way, you'll regenerate health points for a longer period of time.",
[9] = "After you have killed a monster, you have 10 seconds in which the corpse \z
is not moveable and no one else but you can loot it.",
is not movable and no one else but you can loot it.",
[10] = "Be careful when you approach three or more {monsters} because you only can block the attacks of two! \z
In such a situation, even a few salamanders can do severe damage or even kill you.",
[11] = "There are many ways to gather {food}. Many creatures drop food but you can also pick blueberries or \z
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ local ferumbrasAscendantHabitatCorrupted = Action()
function ferumbrasAscendantHabitatCorrupted.onUse(player, item, fromPosition, target, toPosition, isHotkey)
if item.itemid == 9125 then
if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Corrupted) >= 1 then
player:say("The lever are stuck, need some time to it can be moveable again.", TALKTYPE_MONSTER_SAY)
player:say("The lever are stuck, need some time to it can be movable again.", TALKTYPE_MONSTER_SAY)
return true
end
Game.createMonster("lovely yielothax", Position(33619, 32722, 12), true, true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ local ferumbrasAscendantHabitatDesert = Action()
function ferumbrasAscendantHabitatDesert.onUse(player, item, fromPosition, target, toPosition, isHotkey)
if item.itemid == 9125 then
if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Desert) >= 1 then
player:say("The lever are stuck, need some time to it can be moveable again.", TALKTYPE_MONSTER_SAY)
player:say("The lever are stuck, need some time to it can be movable again.", TALKTYPE_MONSTER_SAY)
return true
end
Game.createMonster("lovely rotworm", Position(33641, 32684, 12), true, true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ local ferumbrasAscendantHabitatDimension = Action()
function ferumbrasAscendantHabitatDimension.onUse(player, item, fromPosition, target, toPosition, isHotkey)
if item.itemid == 9125 then
if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Dimension) >= 1 then
player:say("The lever are stuck, need some time to it can be moveable again.", TALKTYPE_MONSTER_SAY)
player:say("The lever are stuck, need some time to it can be movable again.", TALKTYPE_MONSTER_SAY)
return true
end
Game.createMonster("lovely souleater", Position(33642, 32722, 12), true, true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ local ferumbrasAscendantHabitatGlass = Action()
function ferumbrasAscendantHabitatGlass.onUse(player, item, fromPosition, target, toPosition, isHotkey)
if item.itemid == 9125 then
if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Grass) >= 1 then
player:say("The lever are stuck, need some time to it can be moveable again.", TALKTYPE_MONSTER_SAY)
player:say("The lever are stuck, need some time to it can be movable again.", TALKTYPE_MONSTER_SAY)
return true
end
Game.createMonster("lovely frazzlemaw", Position(33642, 32666, 12), true, true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ local ferumbrasAscendantHabitatIce = Action()
function ferumbrasAscendantHabitatIce.onUse(player, item, fromPosition, target, toPosition, isHotkey)
if item.itemid == 9125 then
if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Ice) >= 1 then
player:say("The lever are stuck, need some time to it can be moveable again.", TALKTYPE_MONSTER_SAY)
player:say("The lever are stuck, need some time to it can be movable again.", TALKTYPE_MONSTER_SAY)
return true
end
Game.createMonster("lovely snake", Position(33642, 32702, 12), true, true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ local ferumbrasAscendantHabitatMushroom = Action()
function ferumbrasAscendantHabitatMushroom.onUse(player, item, fromPosition, target, toPosition, isHotkey)
if item.itemid == 9125 then
if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Mushroom) >= 1 then
player:say("The lever are stuck, need some time to it can be moveable again.", TALKTYPE_MONSTER_SAY)
player:say("The lever are stuck, need some time to it can be movable again.", TALKTYPE_MONSTER_SAY)
return true
end
Game.createMonster("lovely scorpion", Position(33617, 32684, 12), true, true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ local ferumbrasAscendantHabitatRoshamuul = Action()
function ferumbrasAscendantHabitatRoshamuul.onUse(player, item, fromPosition, target, toPosition, isHotkey)
if item.itemid == 9125 then
if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Roshamuul) >= 1 then
player:say("The lever are stuck, need some time to it can be moveable again.", TALKTYPE_MONSTER_SAY)
player:say("The lever are stuck, need some time to it can be movable again.", TALKTYPE_MONSTER_SAY)
return true
end
Game.createMonster("lovely deer", Position(33619, 32666, 12), true, true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ local ferumbrasAscendantHabitatVenom = Action()
function ferumbrasAscendantHabitatVenom.onUse(player, item, fromPosition, target, toPosition, isHotkey)
if item.itemid == 9125 then
if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Habitats.Venom) >= 1 then
player:say("The lever are stuck, need some time to it can be moveable again.", TALKTYPE_MONSTER_SAY)
player:say("The lever are stuck, need some time to it can be movable again.", TALKTYPE_MONSTER_SAY)
return true
end
Game.createMonster("lovely polar bear", Position(33617, 32702, 12), true, true)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
local config = {
boss = {
name = "Timira The Many-Headed",
position = Position(33815, 32703, 9),
},
boss = { name = "Timira the Many-Headed" },
encounter = "Timira the Many-Headed",
requiredLevel = 250,
playerPositions = {
{ pos = Position(33809, 32702, 8), teleport = Position(33816, 32708, 9), effect = CONST_ME_TELEPORT },
{ pos = Position(33808, 32702, 8), teleport = Position(33816, 32708, 9), effect = CONST_ME_TELEPORT },
{ pos = Position(33807, 32702, 8), teleport = Position(33816, 32708, 9), effect = CONST_ME_TELEPORT },
{ pos = Position(33806, 32702, 8), teleport = Position(33816, 32708, 9), effect = CONST_ME_TELEPORT },
{ pos = Position(33805, 32702, 8), teleport = Position(33816, 32708, 9), effect = CONST_ME_TELEPORT },
{ pos = Position(33809, 32702, 8), teleport = Position(33787, 32680, 10), effect = CONST_ME_TELEPORT },
{ pos = Position(33808, 32702, 8), teleport = Position(33787, 32680, 10), effect = CONST_ME_TELEPORT },
{ pos = Position(33807, 32702, 8), teleport = Position(33787, 32680, 10), effect = CONST_ME_TELEPORT },
{ pos = Position(33806, 32702, 8), teleport = Position(33787, 32680, 10), effect = CONST_ME_TELEPORT },
{ pos = Position(33805, 32702, 8), teleport = Position(33787, 32680, 10), effect = CONST_ME_TELEPORT },
},
specPos = {
from = Position(33803, 32690, 9),
Expand All @@ -21,3 +19,7 @@ local config = {
local lever = BossLever(config)
lever:position({ x = 33810, y = 32702, z = 8 })
lever:register()

local zone = lever:getZone()
zone:addArea({ x = 33777, y = 32673, z = 10 }, { x = 33801, y = 32700, z = 10 })
zone:addArea({ x = 33784, y = 32701, z = 9 }, { x = 33806, y = 32716, z = 9 })
Loading

0 comments on commit bf39cd6

Please sign in to comment.