Skip to content

Commit

Permalink
Merge branch 'main' into fix_crit_atelier_gem_status
Browse files Browse the repository at this point in the history
  • Loading branch information
elsongabriel committed Apr 29, 2024
2 parents f03dd44 + 8b89817 commit 482e524
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,26 +103,26 @@ function teleportBoss.onStepIn(creature, item, position, fromPosition)
end
local player = creature
if player:getLevel() < config.requiredLevel then
player:teleportTo(exitPosition, true)
player:teleportTo(config.exitPosition, true)
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You need to be level " .. config.requiredLevel .. " or higher.")
return true
end
if locked then
player:teleportTo(exitPosition, true)
player:teleportTo(config.exitPosition, true)
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "There's already someone fighting with " .. config.bossName .. ".")
return false
end
if zone:countPlayers(IgnoredByMonsters) >= 5 then
player:teleportTo(exitPosition, true)
player:teleportTo(config.exitPosition, true)
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "The boss room is full.")
return false
end
local timeLeft = player:getBossCooldown(config.bossName) - os.time()
if timeLeft > 0 then
player:teleportTo(exitPosition, true)
player:teleportTo(config.exitPosition, true)
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT)
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have to wait " .. getTimeInWords(timeLeft) .. " to face " .. config.bossName .. " again!")
player:getPosition():sendMagicEffect(CONST_ME_POFF)
Expand Down

0 comments on commit 482e524

Please sign in to comment.