diff --git a/config.lua.dist b/config.lua.dist index 6c882bd4b47..1023fd37d5a 100644 --- a/config.lua.dist +++ b/config.lua.dist @@ -165,7 +165,6 @@ pvpRateDamageTakenPerLevel = 0.0 -- recommended to start with 0.1 pvpRateDamageReductionPerLevel = 0.0 -- recommended to start with 0.1 pvpMaxLevelDifference = 0 - -- Wheel of destiny system -- NOTE: set wheelSystemEnabled = false to disable the wheel of destiny -- NOTE: only the wheel points are modified, all other data is on the client executable and cannot be modified diff --git a/data-canary/scripts/globalevents/global_server_save.lua b/data-canary/scripts/globalevents/global_server_save.lua index 4ec9b873d4e..51e1ed1fc35 100644 --- a/data-canary/scripts/globalevents/global_server_save.lua +++ b/data-canary/scripts/globalevents/global_server_save.lua @@ -10,8 +10,6 @@ local function ServerSave() end -- Updating daily reward next server save UpdateDailyRewardGlobalStorage(DailyReward.storages.lastServerSave, os.time()) - -- Reset gamestore exp boost count. - db.query("UPDATE `player_storage` SET `value` = 0 WHERE `player_storage`.`key` = 51052") end local function ServerSaveWarning(time) 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 8c95fb9cb89..91b329140a0 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 @@ -38,7 +38,7 @@ monster.flags = { hostile = true, convinceable = false, pushable = false, - rewardBoss = true, + rewardBoss = false, illusionable = false, canPushItems = true, canPushCreatures = true, @@ -53,7 +53,7 @@ monster.flags = { } monster.events = { - "FerumbrasSoulSplinter", + "FerumbrasSoulSplinterDeath", } monster.light = { diff --git a/data-otservbr-global/monster/quests/ferumbras_ascendant/ferumbras_essence.lua b/data-otservbr-global/monster/quests/ferumbras_ascendant/ferumbras_essence.lua index c6ebbfd4321..973fa02afea 100644 --- a/data-otservbr-global/monster/quests/ferumbras_ascendant/ferumbras_essence.lua +++ b/data-otservbr-global/monster/quests/ferumbras_ascendant/ferumbras_essence.lua @@ -1,7 +1,7 @@ local mType = Game.createMonsterType("Ferumbras Essence") local monster = {} -monster.description = " ferumbras essence" +monster.description = "ferumbras essence" monster.experience = 0 monster.outfit = { lookType = 294, @@ -13,8 +13,12 @@ monster.outfit = { lookMount = 0, } -monster.health = 115 -monster.maxHealth = 115 +monster.events = { + "FerumbrasEssenceImmortal", +} + +monster.health = 35000 +monster.maxHealth = 35000 monster.race = "undead" monster.corpse = 9591 monster.speed = 100 @@ -38,7 +42,7 @@ monster.flags = { hostile = true, convinceable = false, pushable = false, - rewardBoss = true, + rewardBoss = false, illusionable = false, canPushItems = true, canPushCreatures = false, diff --git a/data-otservbr-global/scripts/actions/other/enchanting.lua b/data-otservbr-global/scripts/actions/other/enchanting.lua index 4432e157b80..3f7418ba7c4 100644 --- a/data-otservbr-global/scripts/actions/other/enchanting.lua +++ b/data-otservbr-global/scripts/actions/other/enchanting.lua @@ -66,7 +66,7 @@ function enchanting.onUse(player, item, fromPosition, target, toPosition, isHotk return true end - if item.itemid == 676 and table.contains({ 9020 }, target.itemid) then + if item.itemid == 676 and target.itemid == 9020 then target:transform(9019) item:remove(1) toPosition:sendMagicEffect(CONST_ME_MAGIC_RED) diff --git a/data-otservbr-global/scripts/actions/other/surprise_bag.lua b/data-otservbr-global/scripts/actions/other/surprise_bag.lua index 71520c03ebf..bbe76e26055 100644 --- a/data-otservbr-global/scripts/actions/other/surprise_bag.lua +++ b/data-otservbr-global/scripts/actions/other/surprise_bag.lua @@ -52,7 +52,7 @@ local config = { 5917, 3273, 10302, - 3123, + 9019, 5928, 5926, 5927, diff --git a/data-otservbr-global/scripts/actions/quests/adventures_of_galthen/megasylvan_yselda_lever.lua b/data-otservbr-global/scripts/actions/quests/adventures_of_galthen/megasylvan_yselda_lever.lua index 098630b3965..0c4f9542360 100644 --- a/data-otservbr-global/scripts/actions/quests/adventures_of_galthen/megasylvan_yselda_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/adventures_of_galthen/megasylvan_yselda_lever.lua @@ -4,7 +4,6 @@ local config = { position = Position(32619, 32493, 12), }, requiredLevel = 250, - playerPositions = { { pos = Position(32578, 32500, 12), teleport = Position(32619, 32498, 12) }, { pos = Position(32578, 32501, 12), teleport = Position(32619, 32498, 12) }, diff --git a/data-otservbr-global/scripts/actions/quests/feaster_of_souls/dread_maiden_lever.lua b/data-otservbr-global/scripts/actions/quests/feaster_of_souls/dread_maiden_lever.lua index db104351609..564c8770647 100644 --- a/data-otservbr-global/scripts/actions/quests/feaster_of_souls/dread_maiden_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/feaster_of_souls/dread_maiden_lever.lua @@ -4,7 +4,6 @@ local config = { position = Position(33712, 31503, 14), }, requiredLevel = 250, - playerPositions = { { pos = Position(33739, 31506, 14), teleport = Position(33712, 31509, 14), effect = CONST_ME_TELEPORT }, { pos = Position(33740, 31506, 14), teleport = Position(33712, 31509, 14), effect = CONST_ME_TELEPORT }, diff --git a/data-otservbr-global/scripts/actions/quests/feaster_of_souls/fear_feaster_lever.lua b/data-otservbr-global/scripts/actions/quests/feaster_of_souls/fear_feaster_lever.lua index 2640ad97d95..af870accd41 100644 --- a/data-otservbr-global/scripts/actions/quests/feaster_of_souls/fear_feaster_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/feaster_of_souls/fear_feaster_lever.lua @@ -4,7 +4,6 @@ local config = { position = Position(33711, 31469, 14), }, requiredLevel = 250, - playerPositions = { { pos = Position(33734, 31471, 14), teleport = Position(33711, 31474, 14), effect = CONST_ME_TELEPORT }, { pos = Position(33735, 31471, 14), teleport = Position(33711, 31474, 14), effect = CONST_ME_TELEPORT }, diff --git a/data-otservbr-global/scripts/actions/quests/feaster_of_souls/pale_worm_lever.lua b/data-otservbr-global/scripts/actions/quests/feaster_of_souls/pale_worm_lever.lua index ec64dd43de2..13940be3e9a 100644 --- a/data-otservbr-global/scripts/actions/quests/feaster_of_souls/pale_worm_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/feaster_of_souls/pale_worm_lever.lua @@ -4,7 +4,6 @@ local config = { position = Position(33805, 31504, 14), }, requiredLevel = 250, - timeToDefeat = 25 * 60, playerPositions = { { pos = Position(33772, 31504, 14), teleport = Position(33808, 31513, 14), effect = CONST_ME_TELEPORT }, diff --git a/data-otservbr-global/scripts/actions/quests/feaster_of_souls/unwelcome_lever.lua b/data-otservbr-global/scripts/actions/quests/feaster_of_souls/unwelcome_lever.lua index dbcec1c9c93..92d952503a6 100644 --- a/data-otservbr-global/scripts/actions/quests/feaster_of_souls/unwelcome_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/feaster_of_souls/unwelcome_lever.lua @@ -4,7 +4,6 @@ local config = { position = Position(33708, 31539, 14), }, requiredLevel = 250, - playerPositions = { { pos = Position(33736, 31537, 14), teleport = Position(33707, 31545, 14), effect = CONST_ME_TELEPORT }, { pos = Position(33737, 31537, 14), teleport = Position(33707, 31545, 14), effect = CONST_ME_TELEPORT }, diff --git a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/ferumbras_lever.lua b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/ferumbras_lever.lua index 674d6d77e4e..c259b308c0b 100644 --- a/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/ferumbras_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/ferumbras_ascendant/ferumbras_lever.lua @@ -1,30 +1,5 @@ -local config = { - bossName = "Ascending Ferumbras", - summonName = "Rift Invader", - bossPos = Position(33392, 31473, 14), - centerRoom = Position(33392, 31473, 14), -- Center Room - exitPosition = Position(33266, 31479, 14), -- Exit Position - newPos = Position(33392, 31479, 14), -- Player Position on room - playerPositions = { - Position(33269, 31477, 14), - Position(33269, 31478, 14), - Position(33269, 31479, 14), - Position(33269, 31480, 14), - Position(33269, 31481, 14), - Position(33270, 31477, 14), - Position(33270, 31478, 14), - Position(33270, 31479, 14), - Position(33270, 31480, 14), - Position(33270, 31481, 14), - Position(33271, 31477, 14), - Position(33271, 31478, 14), - Position(33271, 31479, 14), - Position(33271, 31480, 14), - Position(33271, 31481, 14), - }, - range = 20, - time = 30, -- time in minutes to remove the player -} +local config = AscendingFerumbrasConfig + local function clearFerumbrasRoom() local spectators = Game.getSpectators(config.bossPos, false, false, 20, 20, 20, 20) for i = 1, #spectators do @@ -42,7 +17,7 @@ end local ferumbrasAscendantLever = Action() function ferumbrasAscendantLever.onUse(player, item, fromPosition, target, toPosition, isHotkey) if item.itemid == 8911 then - if player:getPosition() ~= Position(33270, 31477, 14) then + if player:getPosition() ~= config.leverPos then return true end @@ -51,7 +26,7 @@ function ferumbrasAscendantLever.onUse(player, item, fromPosition, target, toPos local playerTile = Tile(Position(x, y, 14)):getTopCreature() if playerTile and playerTile:isPlayer() then if not playerTile:canFightBoss("Ferumbras Mortal Shell") then - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You or a member in your team have to wait 5 days to face Ferumbras again!") + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, string.format("You or a member in your team have to wait %d days to face Ferumbras again!", config.days)) item:transform(8912) return true end @@ -83,15 +58,16 @@ function ferumbrasAscendantLever.onUse(player, item, fromPosition, target, toPos playerTile:getPosition():sendMagicEffect(CONST_ME_POFF) playerTile:teleportTo(config.newPos) playerTile:getPosition():sendMagicEffect(CONST_ME_TELEPORT) - playerTile:setBossCooldown("Ferumbras Mortal Shell", os.time() + 280 * 60 * 3600) -- 14 days - player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have 30 minutes to kill and loot this boss. Otherwise you will lose that chance and will be kicked out.") - addEvent(clearFerumbrasRoom, 60 * config.time * 1000, player:getId(), config.centerRoom, config.range, config.range, config.exitPosition) + playerTile:setBossCooldown("Ferumbras Mortal Shell", os.time() + config.days * 24 * 3600) + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, string.format("You have %d minutes to kill and loot this boss. Otherwise you will lose that chance and will be kicked out.", config.time)) + addEvent(clearFerumbrasRoom, config.time * 60 * 1000, player:getId(), config.centerRoom, config.range, config.range, config.exitPosition) - for b = 1, 10 do + for b = 1, config.maxSummon do local xrand = math.random(-10, 10) local yrand = math.random(-10, 10) local position = Position(33392 + xrand, 31473 + yrand, 14) - if Game.createMonster("rift invader", position) then + if not Game.createMonster(config.summonName, position) then + logger.error("[ferumbrasAscendantLever.onUse] can't create monster {}, on position {}", config.summonName, position:toString()) end end diff --git a/data-otservbr-global/scripts/actions/quests/grave_danger/count_vlarkorth_lever.lua b/data-otservbr-global/scripts/actions/quests/grave_danger/count_vlarkorth_lever.lua index ea83f2419a7..184d5fa6eca 100644 --- a/data-otservbr-global/scripts/actions/quests/grave_danger/count_vlarkorth_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/grave_danger/count_vlarkorth_lever.lua @@ -4,7 +4,6 @@ local config = { position = Position(33456, 31434, 13), }, requiredLevel = 250, - playerPositions = { { pos = Position(33455, 31413, 13), teleport = Position(33454, 31445, 13), effect = CONST_ME_TELEPORT }, { pos = Position(33456, 31413, 13), teleport = Position(33454, 31445, 13), effect = CONST_ME_TELEPORT }, diff --git a/data-otservbr-global/scripts/actions/quests/grave_danger/duke_krule_lever.lua b/data-otservbr-global/scripts/actions/quests/grave_danger/duke_krule_lever.lua index 2ab2dc6d573..11c3d36a231 100644 --- a/data-otservbr-global/scripts/actions/quests/grave_danger/duke_krule_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/grave_danger/duke_krule_lever.lua @@ -4,7 +4,6 @@ local config = { position = Position(33456, 31473, 13), }, requiredLevel = 250, - playerPositions = { { pos = Position(33455, 31493, 13), teleport = Position(33455, 31464, 13), effect = CONST_ME_TELEPORT }, { pos = Position(33456, 31493, 13), teleport = Position(33455, 31464, 13), effect = CONST_ME_TELEPORT }, diff --git a/data-otservbr-global/scripts/actions/quests/grave_danger/earl_osam_lever.lua b/data-otservbr-global/scripts/actions/quests/grave_danger/earl_osam_lever.lua index db3da443500..363e3b2ba55 100644 --- a/data-otservbr-global/scripts/actions/quests/grave_danger/earl_osam_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/grave_danger/earl_osam_lever.lua @@ -4,7 +4,6 @@ local config = { position = Position(33488, 31441, 13), }, requiredLevel = 250, - playerPositions = { { pos = Position(33516, 31444, 13), teleport = Position(33488, 31430, 13), effect = CONST_ME_TELEPORT }, { pos = Position(33517, 31444, 13), teleport = Position(33488, 31430, 13), effect = CONST_ME_TELEPORT }, diff --git a/data-otservbr-global/scripts/actions/quests/grave_danger/king_zelos_lever.lua b/data-otservbr-global/scripts/actions/quests/grave_danger/king_zelos_lever.lua index fe58b304f17..aa14e575107 100644 --- a/data-otservbr-global/scripts/actions/quests/grave_danger/king_zelos_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/grave_danger/king_zelos_lever.lua @@ -4,7 +4,6 @@ local config = { position = Position(33443, 31545, 13), }, requiredLevel = 250, - playerPositions = { { pos = Position(33485, 31546, 13), teleport = Position(33443, 31554, 13), effect = CONST_ME_TELEPORT }, { pos = Position(33485, 31547, 13), teleport = Position(33443, 31554, 13), effect = CONST_ME_TELEPORT }, diff --git a/data-otservbr-global/scripts/actions/quests/grave_danger/lord_azaram_lever.lua b/data-otservbr-global/scripts/actions/quests/grave_danger/lord_azaram_lever.lua index 8baeee2a471..28a9369bc55 100644 --- a/data-otservbr-global/scripts/actions/quests/grave_danger/lord_azaram_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/grave_danger/lord_azaram_lever.lua @@ -4,7 +4,6 @@ local config = { position = Position(33424, 31473, 13), }, requiredLevel = 250, - playerPositions = { { pos = Position(33422, 31493, 13), teleport = Position(33423, 31465, 13), effect = CONST_ME_TELEPORT }, { pos = Position(33423, 31493, 13), teleport = Position(33423, 31465, 13), effect = CONST_ME_TELEPORT }, diff --git a/data-otservbr-global/scripts/actions/quests/secret_library/ghulosh_lever.lua b/data-otservbr-global/scripts/actions/quests/secret_library/ghulosh_lever.lua index aaa1e1cd9da..48fb4c17818 100644 --- a/data-otservbr-global/scripts/actions/quests/secret_library/ghulosh_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/secret_library/ghulosh_lever.lua @@ -4,7 +4,6 @@ local config = { position = Position(32756, 32720, 10), }, requiredLevel = 250, - playerPositions = { { pos = Position(32747, 32773, 10), teleport = Position(32757, 32727, 10), effect = CONST_ME_TELEPORT }, { pos = Position(32748, 32773, 10), teleport = Position(32757, 32727, 10), effect = CONST_ME_TELEPORT }, diff --git a/data-otservbr-global/scripts/actions/quests/secret_library/gorzindel_lever.lua b/data-otservbr-global/scripts/actions/quests/secret_library/gorzindel_lever.lua index ad191a2287c..2cfe4ffb399 100644 --- a/data-otservbr-global/scripts/actions/quests/secret_library/gorzindel_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/secret_library/gorzindel_lever.lua @@ -4,7 +4,6 @@ local config = { position = Position(32687, 32715, 10), }, requiredLevel = 250, - playerPositions = { { pos = Position(32747, 32749, 10), teleport = Position(32686, 32721, 10), effect = CONST_ME_TELEPORT }, { pos = Position(32748, 32749, 10), teleport = Position(32686, 32721, 10), effect = CONST_ME_TELEPORT }, diff --git a/data-otservbr-global/scripts/actions/quests/secret_library/lokathmor_lever.lua b/data-otservbr-global/scripts/actions/quests/secret_library/lokathmor_lever.lua index d70154ca142..5a56c186ee9 100644 --- a/data-otservbr-global/scripts/actions/quests/secret_library/lokathmor_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/secret_library/lokathmor_lever.lua @@ -4,7 +4,6 @@ local config = { position = Position(32751, 32689, 10), }, requiredLevel = 250, - playerPositions = { { pos = Position(32721, 32749, 10), teleport = Position(32751, 32685, 10), effect = CONST_ME_TELEPORT }, { pos = Position(32722, 32749, 10), teleport = Position(32751, 32685, 10), effect = CONST_ME_TELEPORT }, diff --git a/data-otservbr-global/scripts/actions/quests/secret_library/mazzinor_lever.lua b/data-otservbr-global/scripts/actions/quests/secret_library/mazzinor_lever.lua index 266a2917f6c..2472b5634ac 100644 --- a/data-otservbr-global/scripts/actions/quests/secret_library/mazzinor_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/secret_library/mazzinor_lever.lua @@ -4,7 +4,6 @@ local config = { position = Position(32725, 32719, 10), }, requiredLevel = 250, - playerPositions = { { pos = Position(32721, 32773, 10), teleport = Position(32726, 32726, 10), effect = CONST_ME_TELEPORT }, { pos = Position(32722, 32773, 10), teleport = Position(32726, 32726, 10), effect = CONST_ME_TELEPORT }, diff --git a/data-otservbr-global/scripts/actions/quests/secret_library/scourge_of_oblivion_lever.lua b/data-otservbr-global/scripts/actions/quests/secret_library/scourge_of_oblivion_lever.lua index 11265f1589c..7824ea47878 100644 --- a/data-otservbr-global/scripts/actions/quests/secret_library/scourge_of_oblivion_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/secret_library/scourge_of_oblivion_lever.lua @@ -4,7 +4,6 @@ local config = { position = Position(32726, 32727, 11), }, requiredLevel = 250, - playerPositions = { { pos = Position(32676, 32743, 11), teleport = Position(32726, 32733, 11), effect = CONST_ME_TELEPORT }, { pos = Position(32676, 32744, 11), teleport = Position(32726, 32733, 11), effect = CONST_ME_TELEPORT }, diff --git a/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_cruelty_lever.lua b/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_cruelty_lever.lua index ff8ebbadec6..2e01880589d 100644 --- a/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_cruelty_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_cruelty_lever.lua @@ -4,7 +4,6 @@ local config = { position = Position(33856, 31866, 7), }, requiredLevel = 250, - playerPositions = { { pos = Position(33854, 31854, 6), teleport = Position(33856, 31872, 7), effect = CONST_ME_TELEPORT }, { pos = Position(33855, 31854, 6), teleport = Position(33856, 31872, 7), effect = CONST_ME_TELEPORT }, diff --git a/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_greed_lever.lua b/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_greed_lever.lua index 9283f09c06a..522cde76845 100644 --- a/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_greed_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_greed_lever.lua @@ -4,7 +4,6 @@ local config = { position = Position(33746, 31666, 14), }, requiredLevel = 250, - playerPositions = { { pos = Position(33776, 31665, 14), teleport = Position(33747, 31671, 14), effect = CONST_ME_TELEPORT }, { pos = Position(33777, 31665, 14), teleport = Position(33747, 31671, 14), effect = CONST_ME_TELEPORT }, diff --git a/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_hatred_lever.lua b/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_hatred_lever.lua index 6364779657f..963404c8d85 100644 --- a/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_hatred_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_hatred_lever.lua @@ -4,7 +4,6 @@ local config = { position = Position(33744, 31599, 14), }, requiredLevel = 250, - playerPositions = { { pos = Position(33773, 31601, 14), teleport = Position(33743, 31604, 14), effect = CONST_ME_TELEPORT }, { pos = Position(33774, 31601, 14), teleport = Position(33743, 31604, 14), effect = CONST_ME_TELEPORT }, diff --git a/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_malice_lever.lua b/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_malice_lever.lua index 5b0644bd35a..44d102ad598 100644 --- a/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_malice_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_malice_lever.lua @@ -4,7 +4,6 @@ local config = { position = Position(33710, 31599, 14), }, requiredLevel = 250, - playerPositions = { { pos = Position(33679, 31599, 14), teleport = Position(33710, 31605, 14), effect = CONST_ME_TELEPORT }, { pos = Position(33680, 31599, 14), teleport = Position(33710, 31605, 14), effect = CONST_ME_TELEPORT }, diff --git a/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_megalomania_lever.lua b/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_megalomania_lever.lua index c45d2bfdc33..5896faa74c4 100644 --- a/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_megalomania_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_megalomania_lever.lua @@ -4,7 +4,6 @@ local config = { position = Position(33710, 31634, 14), }, requiredLevel = 250, - playerPositions = { { pos = Position(33676, 31634, 14), teleport = Position(33710, 31639, 14), effect = CONST_ME_TELEPORT }, { pos = Position(33677, 31634, 14), teleport = Position(33710, 31639, 14), effect = CONST_ME_TELEPORT }, diff --git a/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_spite_lever.lua b/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_spite_lever.lua index d7687077daf..0fd2396ae03 100644 --- a/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_spite_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/soul_war/goshnar_spite_lever.lua @@ -4,7 +4,6 @@ local config = { position = Position(33743, 31632, 14), }, requiredLevel = 250, - playerPositions = { { pos = Position(33774, 31634, 14), teleport = Position(33742, 31639, 14), effect = CONST_ME_TELEPORT }, { pos = Position(33775, 31634, 14), teleport = Position(33742, 31639, 14), effect = CONST_ME_TELEPORT }, diff --git a/data-otservbr-global/scripts/actions/quests/soul_war/reward_soul_war.lua b/data-otservbr-global/scripts/actions/quests/soul_war/reward_soul_war.lua index 2ab572b9376..1e3c9c773e0 100644 --- a/data-otservbr-global/scripts/actions/quests/soul_war/reward_soul_war.lua +++ b/data-otservbr-global/scripts/actions/quests/soul_war/reward_soul_war.lua @@ -52,3 +52,38 @@ end rewardSoulWar:position({ x = 33620, y = 31400, z = 10 }) rewardSoulWar:register() + +----------------------------- +-- Phantasmal Jade Mount function + +local phantasmalJadeMount = Action() +function phantasmalJadeMount.onUse(player, item, fromPosition, target, toPosition, isHotkey) + local storage = Storage.Quest.U12_40.SoulWar.MountReward + if player:getStorageValue(storage) == 1 then + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You already have Phantasmal Jade mount!") + return false + end + + if table.contains({ 34072, 34073, 34074 }, item.itemid) then + -- check items + if player:getItemCount(34072) >= 4 and player:getItemCount(34073) == 1 and player:getItemCount(34074) == 1 then + player:removeItem(34072, 4) + player:removeItem(34073, 1) + player:removeItem(34074, 1) + player:addMount(167) + player:setStorageValue(storage, 1) + player:addAchievement("You got Horse Power") + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Congratulations! You won Phantasmal Jade mount.") + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Congratulations! You won You got Horse Power achievement.") + player:getPosition():sendMagicEffect(CONST_ME_HOLYDAMAGE) + return true + else + player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You don't have the necessary items!") + player:getPosition():sendMagicEffect(CONST_ME_POFF) + return false + end + end +end + +phantasmalJadeMount:id(34072, 34073, 34074) +phantasmalJadeMount:register() diff --git a/data-otservbr-global/scripts/actions/quests/the_dream_courts/lever.lua b/data-otservbr-global/scripts/actions/quests/the_dream_courts/lever.lua index 606b2b30b04..75dcc91bbb9 100644 --- a/data-otservbr-global/scripts/actions/quests/the_dream_courts/lever.lua +++ b/data-otservbr-global/scripts/actions/quests/the_dream_courts/lever.lua @@ -4,7 +4,6 @@ local config = { position = Position(33617, 32561, 13), }, requiredLevel = 250, - timeToDefeat = 15 * 60, playerPositions = { { pos = Position(33638, 32562, 13), teleport = Position(33617, 32567, 13), effect = CONST_ME_TELEPORT }, diff --git a/data-otservbr-global/scripts/actions/quests/the_dream_courts/nightmare_beast_lever.lua b/data-otservbr-global/scripts/actions/quests/the_dream_courts/nightmare_beast_lever.lua index 2c30247b915..2b5fd532123 100644 --- a/data-otservbr-global/scripts/actions/quests/the_dream_courts/nightmare_beast_lever.lua +++ b/data-otservbr-global/scripts/actions/quests/the_dream_courts/nightmare_beast_lever.lua @@ -4,7 +4,6 @@ local config = { position = Position(32208, 32046, 15), }, requiredLevel = 250, - playerPositions = { { pos = Position(32212, 32070, 15), teleport = Position(32208, 32052, 15), effect = CONST_ME_TELEPORT }, { pos = Position(32210, 32070, 15), teleport = Position(32208, 32052, 15), effect = CONST_ME_TELEPORT }, diff --git a/data-otservbr-global/scripts/actions/roshamuul/prison/golden.lua b/data-otservbr-global/scripts/actions/roshamuul/prison/golden.lua index 0e5c8f40934..aa3c9d950fb 100644 --- a/data-otservbr-global/scripts/actions/roshamuul/prison/golden.lua +++ b/data-otservbr-global/scripts/actions/roshamuul/prison/golden.lua @@ -1,26 +1,28 @@ local setting = { timeToFightAgain = 10, - clearRoomTime = 60, -- In hour - centerRoom = { x = 33528, y = 32334, z = 12 }, + ignorePlayersCount = true, + clearRoomTime = 60, -- In minutes + leverPosition = Position(33606, 32362, 11), + centerRoom = Position(33528, 32334, 12), range = 10, storage = Storage.PrinceDrazzakTime, clearRoomStorage = GlobalStorage.PrinceDrazzakEventTime, - bossName = "prince drazzak", - bossPosition = { x = 33528, y = 32333, z = 12 }, + bossName = "Prince Drazzak", + bossPosition = Position(33528, 32333, 12), } local playerPositions = { - { fromPos = { x = 33607, y = 32362, z = 11 }, toPos = { x = 33526, y = 32341, z = 12 } }, - { fromPos = { x = 33608, y = 32362, z = 11 }, toPos = { x = 33527, y = 32341, z = 12 } }, - { fromPos = { x = 33609, y = 32362, z = 11 }, toPos = { x = 33528, y = 32341, z = 12 } }, - { fromPos = { x = 33610, y = 32362, z = 11 }, toPos = { x = 33529, y = 32341, z = 12 } }, - { fromPos = { x = 33611, y = 32362, z = 11 }, toPos = { x = 33530, y = 32341, z = 12 } }, + { fromPos = Position(33607, 32362, 11), toPos = Position(33526, 32341, 12) }, + { fromPos = Position(33608, 32362, 11), toPos = Position(33527, 32341, 12) }, + { fromPos = Position(33609, 32362, 11), toPos = Position(33528, 32341, 12) }, + { fromPos = Position(33610, 32362, 11), toPos = Position(33529, 32341, 12) }, + { fromPos = Position(33611, 32362, 11), toPos = Position(33530, 32341, 12) }, } local golden = Action() -function golden.onUse(player, item, fromPosition, target, toPosition, monster, isHotkey) - if toPosition == Position(33606, 32362, 11) then +function golden.onUse(player, item, fromPosition, target, toPosition, isHotkey) + if toPosition == setting.leverPosition and not setting.ignorePlayersCount then for i = 1, #playerPositions do local creature = Tile(playerPositions[i].fromPos):getTopCreature() if not creature then @@ -30,11 +32,15 @@ function golden.onUse(player, item, fromPosition, target, toPosition, monster, i end end - if toPosition == Position(33606, 32362, 11) then - if roomIsOccupied(setting.centerRoom, false, setting.range, setting.range) or Game.getStorageValue(setting.clearRoomStorage) == 1 then + if toPosition == setting.leverPosition then + if roomIsOccupied(setting.centerRoom, false, setting.range, setting.range) then player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Someone is fighting against the boss! You need wait awhile.") return true end + if Game.getStorageValue(setting.clearRoomStorage) == 1 then + Game.setStorageValue(setting.clearRoomStorage, 0) + clearRoom(setting.centerRoom, setting.range, setting.range, setting.clearRoomStorage) + end for i = 1, #playerPositions do local creature = Tile(playerPositions[i].fromPos):getTopCreature() @@ -49,7 +55,9 @@ function golden.onUse(player, item, fromPosition, target, toPosition, monster, i creature:getPosition():sendMagicEffect(CONST_ME_TELEPORT) end else - return false + if not setting.ignorePlayersCount then + return false + end end end item:remove() diff --git a/data-otservbr-global/scripts/creaturescripts/others/login.lua b/data-otservbr-global/scripts/creaturescripts/others/login.lua index b7009b530e9..27bfddd5ddc 100644 --- a/data-otservbr-global/scripts/creaturescripts/others/login.lua +++ b/data-otservbr-global/scripts/creaturescripts/others/login.lua @@ -33,7 +33,7 @@ function playerLogin.onLogin(player) backpack:addItem(items[i][1], items[i][2]) end end - player:addItem(2920, 1, true, 1, CONST_SLOT_AMMO) + db.query("UPDATE `players` SET `istutorial` = 0 where `id`=" .. player:getGuid()) -- Open channels if table.contains({ TOWNS_LIST.DAWNPORT, TOWNS_LIST.DAWNPORT_TUTORIAL }, player:getTown():getId()) then 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 f141f4f5089..5d81cf2f22c 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 @@ -49,7 +49,7 @@ function ascendantBossesKill.onDeath(creature) onDeathForDamagingPlayers(creature, function(creature, player) if creature:getName():lower() == "ferumbras mortal shell" then - player:setBossCooldown(creature:getName(), os.time() + 60 * 60 * 14 * 24) + player:setBossCooldown(creature:getName(), os.time() + AscendingFerumbrasConfig.days * 24 * 3600) elseif creature:getName():lower() == "the lord of the lice" then player:setStorageValue(Storage.FerumbrasAscension.TheLordOfTheLiceAccess, 1) end diff --git a/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/ferumbras_mortal_shell_death.lua b/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/ferumbras_mortal_shell_death.lua index 9add0b883ff..877e987ac02 100644 --- a/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/ferumbras_mortal_shell_death.lua +++ b/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/ferumbras_mortal_shell_death.lua @@ -1,15 +1,18 @@ local ferumbrasMortalShell = CreatureEvent("FerumbrasMortalShell") + +local config = AscendingFerumbrasConfig + function ferumbrasMortalShell.onDeath(creature, corpse, lasthitkiller, mostdamagekiller, lasthitunjustified, mostdamageunjustified) if creature:getName():lower() ~= "destabilized ferumbras" then return true end - local monster = Game.createMonster("Ferumbras Mortal Shell", Position(33392, 31473, 14), true, true) + local monster = Game.createMonster("Ferumbras Mortal Shell", config.bossPos, true, true) if not monster then return true end monster:say("AAAAAAAAAAAAAAAAAAHHHHHHHHHHHHHH!", TALKTYPE_MONSTER_SAY) - lasthitkiller:say("FINALY YOU FORCED FERUMBRAS BACK INTO A MORTAL FORM - HE IS NOT AMUSED!", TALKTYPE_MONSTER_SAY, nil, nil, Position(33392, 31475, 14)) + lasthitkiller:say("FINALY YOU FORCED FERUMBRAS BACK INTO A MORTAL FORM - HE IS NOT AMUSED!", TALKTYPE_MONSTER_SAY, nil, nil, config.bossPos) return true end diff --git a/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/ferumbras_soul_splinter.lua b/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/ferumbras_soul_splinter.lua index 73238b09b03..cfcf638251c 100644 --- a/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/ferumbras_soul_splinter.lua +++ b/data-otservbr-global/scripts/creaturescripts/quests/ferumbras_ascendant/ferumbras_soul_splinter.lua @@ -1,10 +1,19 @@ -local ferumbrasSoulSplinter = CreatureEvent("FerumbrasSoulSplinter") +local ferumbrasSoulSplinter = CreatureEvent("FerumbrasSoulSplinterDeath") + function ferumbrasSoulSplinter.onDeath(creature, corpse, lasthitkiller, mostdamagekiller, lasthitunjustified, mostdamageunjustified) local monster = Game.createMonster("ferumbras essence", creature:getPosition(), true, true) if not monster then + logger.error("[ferumbrasSoulSplinter.onDeath] cannot create monster on position {}", creature:getPosition():toString()) return true end return true end ferumbrasSoulSplinter:register() + +local ferumbrasEssenceImmortal = CreatureEvent("FerumbrasEssenceImmortal") +function ferumbrasEssenceImmortal.onHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin) + return 0, 0, 0, 0 +end + +ferumbrasEssenceImmortal:register() 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 29eb15c99df..ae000aaf097 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 @@ -9,6 +9,8 @@ local crystals = { [8] = { fromPosition = Position(33386, 31470, 14), toPosition = Position(33388, 31472, 14), crystalPosition = Position(33387, 31471, 14), globalStorage = GlobalStorage.FerumbrasAscendant.Crystals.Crystal8 }, } +local config = AscendingFerumbrasConfig + local riftInvaderDeath = CreatureEvent("RiftInvaderDeath") function riftInvaderDeath.onDeath(creature, corpse, lasthitkiller, mostdamagekiller, lasthitunjustified, mostdamageunjustified) local pos = Position(33392 + math.random(-10, 10), 31473 + math.random(-10, 10), 14) @@ -30,7 +32,7 @@ function riftInvaderDeath.onDeath(creature, corpse, lasthitkiller, mostdamagekil Game.setStorageValue(GlobalStorage.FerumbrasAscendant.Crystals.AllCrystals, Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Crystals.AllCrystals) + 1) end if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.Crystals.AllCrystals) == 8 then - local creature = Tile(Position(33392, 31473, 14)):getTopCreature() + local creature = Tile(config.bossPos):getTopCreature() creature:say("NOOOOOOOOOOO!", TALKTYPE_MONSTER_YELL) creature:say("FERUMBRAS BURSTS INTO SOUL SPLINTERS!", TALKTYPE_MONSTER_YELL, nil, nil, Position(33392, 31475, 14)) creature:remove() @@ -46,12 +48,20 @@ function riftInvaderDeath.onDeath(creature, corpse, lasthitkiller, mostdamagekil end end - local vortex = Game.createItem(22455, 1, creature:getPosition()) + local tilePool = Tile(creature:getPosition()) + if tilePool then + local pool = tilePool:getItemById(2886) + if pool then + pool:remove() + end + end + + local vortex = Game.createItem(config.vortex, 1, creature:getPosition()) if vortex then - addEvent(function(pos) - local tile = Tile(pos) + addEvent(function(creaturePos) + local tile = Tile(creaturePos) if tile then - local vortexItem = tile:getItemById(22455) + local vortexItem = tile:getItemById(config.vortex) if vortexItem then vortexItem:remove(1) end diff --git a/data-otservbr-global/scripts/globalevents/others/global_server_save.lua b/data-otservbr-global/scripts/globalevents/others/global_server_save.lua index 6cdb27447b6..c65255b592b 100644 --- a/data-otservbr-global/scripts/globalevents/others/global_server_save.lua +++ b/data-otservbr-global/scripts/globalevents/others/global_server_save.lua @@ -10,8 +10,6 @@ local function ServerSave() end -- Updating daily reward next server save. UpdateDailyRewardGlobalStorage(DailyReward.storages.lastServerSave, os.time()) - -- Reset gamestore exp boost count. - db.query("UPDATE `player_storage` SET `value` = 0 WHERE `player_storage`.`key` = 51052") end local function ServerSaveWarning(time) diff --git a/data-otservbr-global/scripts/globalevents/spawn/mawhawk.lua b/data-otservbr-global/scripts/globalevents/spawn/mawhawk.lua index 36817060264..e34657d211c 100644 --- a/data-otservbr-global/scripts/globalevents/spawn/mawhawk.lua +++ b/data-otservbr-global/scripts/globalevents/spawn/mawhawk.lua @@ -8,7 +8,7 @@ local config = { local mawhawk = GlobalEvent("mawhawk") function mawhawk.onThink(interval, lastExecution) - if not checkBoss(config.centerPosition, config.rangeX, config.rangeY, config.monsterName) then + if not checkBoss(config.centerPosition, config.rangeX, config.rangeY, config.monsterName, config.bossPosition) then addEvent(Game.broadcastMessage, 150, "Beware! Mawhawk!", MESSAGE_EVENT_ADVANCE) end return true diff --git a/data-otservbr-global/scripts/globalevents/spawn/tyrn.lua b/data-otservbr-global/scripts/globalevents/spawn/tyrn.lua index 79959d1a28d..47e7756f2ba 100644 --- a/data-otservbr-global/scripts/globalevents/spawn/tyrn.lua +++ b/data-otservbr-global/scripts/globalevents/spawn/tyrn.lua @@ -8,7 +8,7 @@ local config = { local tyrn = GlobalEvent("tyrn") function tyrn.onThink(interval, lastExecution) - if not checkBoss(config.centerPosition, config.rangeX, config.rangeY, config.monsterName) then + if not checkBoss(config.centerPosition, config.rangeX, config.rangeY, config.monsterName, config.bossPosition) then addEvent(Game.broadcastMessage, 150, "Beware of Tyrn!", MESSAGE_EVENT_ADVANCE) end return true diff --git a/data-otservbr-global/scripts/globalevents/vip/online_coins.lua b/data-otservbr-global/scripts/globalevents/vip/online_coins.lua index 074df6d6be3..bbd4e98f9d7 100644 --- a/data-otservbr-global/scripts/globalevents/vip/online_coins.lua +++ b/data-otservbr-global/scripts/globalevents/vip/online_coins.lua @@ -31,7 +31,7 @@ function onlineCoinsEvent.onThink(interval) local checkIp = {} for _, player in pairs(players) do - if player:getAccountType() >= ACCOUNT_TYPE_GAMEMASTER then + if player:getGroup():getId() > GROUP_TYPE_SENIORTUTOR then goto continue end diff --git a/data-otservbr-global/scripts/globalevents/vip/online_tokens.lua b/data-otservbr-global/scripts/globalevents/vip/online_tokens.lua index 8733f4fa0d3..4cde5ae926d 100644 --- a/data-otservbr-global/scripts/globalevents/vip/online_tokens.lua +++ b/data-otservbr-global/scripts/globalevents/vip/online_tokens.lua @@ -32,7 +32,7 @@ function onlineTokensEvent.onThink(interval) local checkIp = {} for _, player in pairs(players) do - if player:getAccountType() >= ACCOUNT_TYPE_GAMEMASTER then + if player:getGroup():getId() > GROUP_TYPE_SENIORTUTOR then goto continue end diff --git a/data-otservbr-global/scripts/lib/register_lever_tables.lua b/data-otservbr-global/scripts/lib/register_lever_tables.lua new file mode 100644 index 00000000000..ce8ad6a02b8 --- /dev/null +++ b/data-otservbr-global/scripts/lib/register_lever_tables.lua @@ -0,0 +1,14 @@ +AscendingFerumbrasConfig = { + bossName = "Ascending Ferumbras", + summonName = "Rift Invader", + maxSummon = 15, + leverPos = Position(33270, 31477, 14), + bossPos = Position(33392, 31473, 14), + centerRoom = Position(33392, 31473, 14), -- Center Room + exitPosition = Position(33266, 31479, 14), -- Exit Position + newPos = Position(33392, 31479, 14), -- Player Position on room + days = 3, + range = 20, + time = 60, -- time in minutes to remove the player + vortex = 23482, +} diff --git a/data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/seal.lua b/data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/seal.lua index 1d7d88a9d0c..f8727da061e 100644 --- a/data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/seal.lua +++ b/data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/seal.lua @@ -98,7 +98,8 @@ function seal.onStepIn(creature, item, position, fromPosition) player:teleportTo(setting.toPosition) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) elseif item.actionid == 24846 then - player:say("You cannot enter, you must wait fourteen days after preventing the ascension of Ferumbras.", TALKTYPE_MONSTER_SAY) + local days = AscendingFerumbrasConfig.days + player:say("You cannot enter, you must wait " .. days .. " days after preventing the ascension of Ferumbras.", TALKTYPE_MONSTER_SAY) else player:teleportTo(setting.backPosition) player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) diff --git a/data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/vortex.lua b/data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/vortex.lua index 2c74fc917dd..eaa838cd8e1 100644 --- a/data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/vortex.lua +++ b/data-otservbr-global/scripts/movements/quests/ferumbras_ascendant/vortex.lua @@ -1,5 +1,7 @@ local vortex = MoveEvent() +local config = AscendingFerumbrasConfig + function vortex.onStepIn(creature, item, position, fromPosition) local monster = creature:getMonster() if not monster or monster:getName():lower() ~= "ferumbras essence" then @@ -10,8 +12,8 @@ function vortex.onStepIn(creature, item, position, fromPosition) position:sendMagicEffect(CONST_ME_POFF) Game.setStorageValue(GlobalStorage.FerumbrasAscendant.FerumbrasEssence, Game.getStorageValue(GlobalStorage.FerumbrasAscendant.FerumbrasEssence) + 1) if Game.getStorageValue(GlobalStorage.FerumbrasAscendant.FerumbrasEssence) >= 8 then - Game.createMonster("Destabilized Ferumbras", Position(33392, 31473, 14), true, true) - for i = 1, 20 do + Game.createMonster("Destabilized Ferumbras", config.bossPos, true, true) + for i = 1, config.maxSummon do Game.createMonster("Rift Fragment", Position(math.random(33381, 33403), math.random(31462, 31483), 14), true, true) end end @@ -19,5 +21,5 @@ function vortex.onStepIn(creature, item, position, fromPosition) end vortex:type("stepin") -vortex:id(20121) +vortex:id(config.vortex) vortex:register() diff --git a/data-otservbr-global/world/custom/otservbr-custom-zones.xml b/data-otservbr-global/world/custom/otservbr-custom-zones.xml new file mode 100644 index 00000000000..a9224bd3c2d --- /dev/null +++ b/data-otservbr-global/world/custom/otservbr-custom-zones.xml @@ -0,0 +1,2 @@ + + diff --git a/data-otservbr-global/world/otservbr-monster.xml b/data-otservbr-global/world/otservbr-monster.xml index 493d167b02b..bc326a9fb21 100644 --- a/data-otservbr-global/world/otservbr-monster.xml +++ b/data-otservbr-global/world/otservbr-monster.xml @@ -161325,11 +161325,6 @@ - - - - - @@ -161398,9 +161393,6 @@ - - - @@ -161443,10 +161435,6 @@ - - - - @@ -161583,13 +161571,10 @@ - - - diff --git a/data/XML/mounts.xml b/data/XML/mounts.xml index b0922f3f431..23bea06f950 100644 --- a/data/XML/mounts.xml +++ b/data/XML/mounts.xml @@ -216,5 +216,9 @@ - + + + + + diff --git a/data/libs/exercise_training.lua b/data/libs/exercise_training.lua index df9f9e31241..6981c55ca3b 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 left training!") + player:sendTextMessage(MESSAGE_FAILURE, "You've stopped training!") return LeaveTraining(playerId) end diff --git a/data/modules/scripts/gamestore/gamestore.lua b/data/modules/scripts/gamestore/gamestore.lua index c4313dc9d5b..20e51a4167e 100644 --- a/data/modules/scripts/gamestore/gamestore.lua +++ b/data/modules/scripts/gamestore/gamestore.lua @@ -1114,14 +1114,6 @@ GameStore.Categories = { rookgaard = true, state = GameStore.States.STATE_NONE, offers = { - { - icons = { "Arctic_Unicorn.png" }, - name = "Artic Unicorn", - price = 870, - id = 114, - description = "{character}\n{speedboost}\n\nThe Arctic Unicorn lives in a deep rivalry with its cousin the Blazing Unicorn. Even though they were born in completely different areas, they somehow share the same bloodline. The eternal battle between fire and ice continues. Who will win? Tangerine vs.crystal blue! The choice is yours!", - type = GameStore.OfferTypes.OFFER_TYPE_MOUNT, - }, { icons = { "Armoured_War_Horse.png" }, name = "Armoured War Horse", @@ -1130,6 +1122,14 @@ GameStore.Categories = { description = "{character}\n{speedboost}\n\nThe Armoured War Horse is a dangerous black beauty! When you see its threatening, blood-red eyes coming towards you, you'll know trouble is on its way. Protected by its heavy armour plates, the warhorse is the perfect partner for dangerous hunting sessions and excessive enemy slaughtering.", type = GameStore.OfferTypes.OFFER_TYPE_MOUNT, }, + { + icons = { "Arctic_Unicorn.png" }, + name = "Artic Unicorn", + price = 870, + id = 114, + description = "{character}\n{speedboost}\n\nThe Arctic Unicorn lives in a deep rivalry with its cousin the Blazing Unicorn. Even though they were born in completely different areas, they somehow share the same bloodline. The eternal battle between fire and ice continues. Who will win? Tangerine vs.crystal blue! The choice is yours!", + type = GameStore.OfferTypes.OFFER_TYPE_MOUNT, + }, { icons = { "Batcat.png" }, name = "Batcat", @@ -1178,6 +1178,14 @@ GameStore.Categories = { description = "{character}\n{speedboost}\n\nYou are fascinated by insectoid creatures and can picture yourself riding one during combat or just for travelling? The Bloodcurl will carry you through the Tibian wilderness with ease.", type = GameStore.OfferTypes.OFFER_TYPE_MOUNT, }, + { + icons = { "Bogwurm.png" }, + name = "Bogwurm", + price = 870, + id = 189, + description = "{character}\n{speedboost}\n\nThe Bogwurm, Gloomwurm, and Rustwurm belong to a little known subset of the dragon family, and usually live out their lives in habitats far away from human interaction. Them being cunning hunters, and their keen sense of perception make these wurms great companions for whomever can locate and tame them.", + type = GameStore.OfferTypes.OFFER_TYPE_MOUNT, + }, { icons = { "Boreal_Owl.png" }, name = "Boreal Owl", @@ -1194,14 +1202,6 @@ GameStore.Categories = { description = "{character}\n{speedboost}\n\nThe vibrant colours and elegance of a Tangerine Flecked Koi, a Brass Speckled Koi, and an Ink Spotted Koi make them a fascinating sight to behold, and their boisterous nature and speed will make you the first to arrive wherever there are riches to gain. Wield your weapon as gracefully and effortlessly as your swimming companion glides through the water, and the two of you will make the perfect and most deadly pair.", type = GameStore.OfferTypes.OFFER_TYPE_MOUNT, }, - { - icons = { "Bogwurm.png" }, - name = "Bogwurm", - price = 870, - id = 189, - description = "{character}\n{speedboost}\n\nThe Bogwurm, Gloomwurm, and Rustwurm belong to a little known subset of the dragon family, and usually live out their lives in habitats far away from human interaction. Them being cunning hunters, and their keen sense of perception make these wurms great companions for whomever can locate and tame them.", - type = GameStore.OfferTypes.OFFER_TYPE_MOUNT, - }, { icons = { "Bunny_Dray.png" }, name = "Bunny Dray", @@ -1274,6 +1274,16 @@ GameStore.Categories = { description = "{character}\n{speedboost}\n\nIf the Coralripper moves its fins, it generates enough air pressure that it can even float over land. Its numerous eyes allow it to quickly detect dangers even in confusing situations and eliminate them with one powerful bite. If you watch your fingers, you are going to be good friends.", type = GameStore.OfferTypes.OFFER_TYPE_MOUNT, }, + { + icons = { "Corpsefire_Skull.png" }, + name = "Corpsefire Skull", + price = 750, + id = 220, + description = "{character}\n{speedboost}\n\nSkulls are the infernal heralds of untamed power. Bodies are obsolete when sinister forces animate your being. Embrace their presence and command the devastating might that awaits on the back of an eerie Corpsefire Skull!", + type = GameStore.OfferTypes.OFFER_TYPE_MOUNT, + state = GameStore.States.STATE_NEW, + home = true, + }, { icons = { "Cranium_Spider.png" }, name = "Cranium Spider", @@ -1306,6 +1316,14 @@ GameStore.Categories = { description = "{character}\n{speedboost}\n\nBorn from the depths of the forest, where flora and fauna intertwine in mysterious ways, the Floral Beast is a colourful creature that is sure to turn some heads. The Hyacinth, Peony, and Dandelion mount are loyal companions that will safely carry you through their natural habitat of the woods, or lands unknown to them.", type = GameStore.OfferTypes.OFFER_TYPE_MOUNT, }, + { + icons = { "Darkfire_Devourer.png" }, + name = "Darkfire Devourer", + price = 1300, + id = 213, + 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, + }, { icons = { "Dawn_Strayer.png" }, name = "Dawn Strayer", @@ -1330,6 +1348,16 @@ GameStore.Categories = { description = "{character}\n{speedboost}\n\nIts roaring is piercing marrow and bone and can be heard over ten miles away. The Desert King is the undisputed ruler of its territory and no one messes with this animal. Show no fear and prove yourself worthy of its trust and you will get yourself a valuable companion for your adventures.", type = GameStore.OfferTypes.OFFER_TYPE_MOUNT, }, + { + icons = { "Doom_Skull.png" }, + name = "Doom Skull", + price = 750, + id = 219, + description = "{character}\n{speedboost}\n\nSkulls are the infernal heralds of untamed power. Bodies are obsolete when sinister forces animate your being. Embrace their presence and command the devastating might that awaits on the back of a grim Doom Skull.", + type = GameStore.OfferTypes.OFFER_TYPE_MOUNT, + state = GameStore.States.STATE_NEW, + home = true, + }, { icons = { "Doombringer.png" }, name = "Doombringer", @@ -1498,6 +1526,14 @@ GameStore.Categories = { description = "{character}\n{speedboost}\n\nThe Flying Divan is the perfect mount for those who are too busy to take care of an animal mount or simply like to travel on a beautiful, magic hand-woven carpet.", type = GameStore.OfferTypes.OFFER_TYPE_MOUNT, }, + { + icons = { "Foxmouse.png" }, + name = "Foxmouse", + price = 750, + id = 218, + 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, + }, { icons = { "Frostbringer.png" }, name = "Frostbringer", @@ -1698,6 +1734,16 @@ GameStore.Categories = { description = "{character}\n{speedboost}\n\nThe Magic Carpet is the perfect mount for those who are too busy to take care of an animal mount or simply like to travel on a beautiful, magic hand-woven carpet.", type = GameStore.OfferTypes.OFFER_TYPE_MOUNT, }, + { + icons = { "Magma_Skull.png" }, + name = "Magma Skull", + price = 750, + id = 220, + description = "{character}\n{speedboost}\n\nSkulls are the infernal heralds of untamed power. Bodies are obsolete when sinister forces animate your being. Embrace their presence and command the devastating might that awaits on the back of a blazing Magma Skull.", + type = GameStore.OfferTypes.OFFER_TYPE_MOUNT, + state = GameStore.States.STATE_NEW, + home = true, + }, { icons = { "Marsh_Toad.png" }, name = "Marsh Toad", @@ -2026,6 +2072,14 @@ GameStore.Categories = { description = "{character}\n{speedboost}\n\nIncredible strength and smartness, an irrepressible will to survive, passionately hunting in groups. If these attributes apply to your character, we have found the perfect partner for you. Have a proper look at Snow Pelt, which stands loyally by its master's side in every situation. It is time to become the leader of the wolf pack!", type = GameStore.OfferTypes.OFFER_TYPE_MOUNT, }, + { + icons = { "Snow_Strider.png" }, + name = "Snow Strider", + price = 870, + id = 164, + description = "{character}\n{speedboost}\n\nA magical fire burns inside these wolves. Bred as the faithful guardians for an eccentric wizard's tower, these creatures make for loyal companions during your travels. While not originally intended for riding, their sturdy frame makes the Dawn Strayer, Dusk Pryer and Snow Strider suitable mounts.", + type = GameStore.OfferTypes.OFFER_TYPE_MOUNT, + }, { icons = { "Snowy_Owl.png" }, name = "Snowy Owl", @@ -2035,11 +2089,11 @@ GameStore.Categories = { type = GameStore.OfferTypes.OFFER_TYPE_MOUNT, }, { - icons = { "Snow_Strider.png" }, - name = "Snow Strider", - price = 870, - id = 164, - description = "{character}\n{speedboost}\n\nA magical fire burns inside these wolves. Bred as the faithful guardians for an eccentric wizard's tower, these creatures make for loyal companions during your travels. While not originally intended for riding, their sturdy frame makes the Dawn Strayer, Dusk Pryer and Snow Strider suitable mounts.", + icons = { "Spirit_of_Purity.png" }, + name = "Spirit of Purity", + price = 1000, + id = 215, + 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/modules/scripts/gamestore/init.lua b/data/modules/scripts/gamestore/init.lua index 86c2c60d4bc..81fbd421e59 100644 --- a/data/modules/scripts/gamestore/init.lua +++ b/data/modules/scripts/gamestore/init.lua @@ -438,7 +438,7 @@ function parseBuyStoreOffer(playerId, msg) -- Handled errors have a code index and unhandled errors do not local pcallOk, pcallError = pcall(function() if offer.type == GameStore.OfferTypes.OFFER_TYPE_ITEM then - GameStore.processItemPurchase(player, offer.itemtype, offer.count, offer.moveable) + GameStore.processItemPurchase(player, offer.itemtype, offer.count, offer.movable) elseif offer.type == GameStore.OfferTypes.OFFER_TYPE_POUCH then GameStore.processItemPurchase(player, offer.itemtype, offer.count) elseif offer.type == GameStore.OfferTypes.OFFER_TYPE_INSTANT_REWARD_ACCESS then @@ -446,13 +446,13 @@ function parseBuyStoreOffer(playerId, msg) elseif offer.type == GameStore.OfferTypes.OFFER_TYPE_CHARMS then GameStore.processCharmsPurchase(player) elseif offer.type == GameStore.OfferTypes.OFFER_TYPE_BLESSINGS then - GameStore.processSignleBlessingPurchase(player, offer.blessid, offer.count) + GameStore.processSingleBlessingPurchase(player, offer.blessid, offer.count) elseif offer.type == GameStore.OfferTypes.OFFER_TYPE_ALLBLESSINGS then GameStore.processAllBlessingsPurchase(player, offer.count) elseif offer.type == GameStore.OfferTypes.OFFER_TYPE_PREMIUM then GameStore.processPremiumPurchase(player, offer.id) elseif offer.type == GameStore.OfferTypes.OFFER_TYPE_STACKABLE then - GameStore.processStackablePurchase(player, offer.itemtype, offer.count, offer.name, offer.moveable) + GameStore.processStackablePurchase(player, offer.itemtype, offer.count, offer.name, offer.movable) elseif offer.type == GameStore.OfferTypes.OFFER_TYPE_HOUSE then GameStore.processHouseRelatedPurchase(player, offer) elseif offer.type == GameStore.OfferTypes.OFFER_TYPE_OUTFIT then @@ -477,7 +477,7 @@ function parseBuyStoreOffer(playerId, msg) elseif offer.type == GameStore.OfferTypes.OFFER_TYPE_TEMPLE then GameStore.processTempleTeleportPurchase(player) elseif offer.type == GameStore.OfferTypes.OFFER_TYPE_CHARGES then - GameStore.processChargesPurchase(player, offer.itemtype, offer.name, offer.charges, offer.moveable) + GameStore.processChargesPurchase(player, offer.itemtype, offer.name, offer.charges, offer.movable) elseif offer.type == GameStore.OfferTypes.OFFER_TYPE_HIRELING then local hirelingName = msg:getString() local sex = msg:getByte() @@ -1495,7 +1495,7 @@ end -- take a table {code = ..., message = ...} if the error is handled. When no code -- index is present the error is assumed to be unhandled. -function GameStore.processItemPurchase(player, offerId, offerCount, moveable) +function GameStore.processItemPurchase(player, offerId, offerCount, movable) if player:getFreeCapacity() < ItemType(offerId):getWeight(offerCount) then return error({ code = 0, message = "Please make sure you have free capacity to hold this item." }) end @@ -1504,7 +1504,7 @@ function GameStore.processItemPurchase(player, offerId, offerCount, moveable) if inbox then for t = 1, offerCount do local inboxItem = inbox:addItem(offerId, offerCount or 1) - if moveable ~= true and inboxItem then + if movable ~= true and inboxItem then inboxItem:setAttribute(ITEM_ATTRIBUTE_STORE, systemTime()) end end @@ -1513,7 +1513,7 @@ function GameStore.processItemPurchase(player, offerId, offerCount, moveable) end end -function GameStore.processChargesPurchase(player, itemtype, name, charges, moveable) +function GameStore.processChargesPurchase(player, itemtype, name, charges, movable) if player:getFreeCapacity() < ItemType(itemtype):getWeight(1) then return error({ code = 0, message = "Please make sure you have free capacity to hold this item." }) end @@ -1522,7 +1522,7 @@ function GameStore.processChargesPurchase(player, itemtype, name, charges, movea if inbox then local inboxItem = inbox:addItem(itemtype, charges) - if moveable ~= true and inboxItem then + if movable ~= true and inboxItem then inboxItem:setAttribute(ITEM_ATTRIBUTE_STORE, systemTime()) end else @@ -1530,7 +1530,7 @@ function GameStore.processChargesPurchase(player, itemtype, name, charges, movea end end -function GameStore.processSignleBlessingPurchase(player, blessId, count) +function GameStore.processSingleBlessingPurchase(player, blessId, count) player:addBlessing(blessId, count) end @@ -1563,7 +1563,7 @@ function GameStore.processPremiumPurchase(player, offerId) end end -function GameStore.processStackablePurchase(player, offerId, offerCount, offerName, moveable) +function GameStore.processStackablePurchase(player, offerId, offerCount, offerName, movable) local function isKegItem(itemId) return itemId >= ITEM_KEG_START and itemId <= ITEM_KEG_END end @@ -1599,12 +1599,12 @@ function GameStore.processStackablePurchase(player, offerId, offerCount, offerNa local kegItem = parcel:addItem(offerId, 1) kegItem:setAttribute(ITEM_ATTRIBUTE_CHARGES, pack) - if moveable ~= true and kegItem then + if movable ~= true and kegItem then kegItem:setAttribute(ITEM_ATTRIBUTE_STORE, systemTime()) end else local parcelItem = parcel:addItem(offerId, pack) - if moveable ~= true and parcelItem then + if movable ~= true and parcelItem then parcelItem:setAttribute(ITEM_ATTRIBUTE_STORE, systemTime()) end end @@ -1613,7 +1613,7 @@ function GameStore.processStackablePurchase(player, offerId, offerCount, offerNa end else local item = inbox:addItem(offerId, isKeg and 1 or offerCount) - if moveable ~= true and item then + if movable ~= true and item then item:setAttribute(ITEM_ATTRIBUTE_STORE, systemTime()) end if item and isKeg then @@ -1645,7 +1645,7 @@ function GameStore.processHouseRelatedPurchase(player, offer) decoKit:setAttribute(ITEM_ATTRIBUTE_DATE, offer.count) end - if offer.moveable ~= true then + if offer.movable ~= true then decoKit:setAttribute(ITEM_ATTRIBUTE_STORE, systemTime()) end end diff --git a/data/npclib/npc.lua b/data/npclib/npc.lua index f4e8feddd96..5ca017e1f73 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 is missing, nil or not found") + return logger.error("[NpcHandler:say] - Npc parameter for npc '{}' is missing, nil or not found", npc:getName()) end local player = Player(playerId) if not player then - return logger.error("[NpcHandler:say] - Player parameter is missing, nil or not found") + return logger.error("[NpcHandler:say] - Player parameter for npc '{}' is missing, nil or not found", npc:getName()) end local parseInfo = { diff --git a/data/npclib/npc_system/npc_handler.lua b/data/npclib/npc_system/npc_handler.lua index 980e9d5f371..27b941366ee 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 is missing or nil") + return logger.error("[NpcHandler:removeInteraction] - Player parameter for npc '{}' is missing or nil", npc:getName()) end if self:getEventDelayedSay(playerId) then diff --git a/data/scripts/talkactions/gm/teleport_set_destination.lua b/data/scripts/talkactions/gm/teleport_set_destination.lua index cc1520db08e..62e8d12ffc7 100644 --- a/data/scripts/talkactions/gm/teleport_set_destination.lua +++ b/data/scripts/talkactions/gm/teleport_set_destination.lua @@ -1,38 +1,32 @@ -- Script for set teleport destination -- /teleport xxxx, xxxx, x -local teleportSetDestination = TalkAction("/teleport") +local teleportSetDestination = TalkAction("/teleport", "/tp") function teleportSetDestination.onSay(player, words, param) -- create log logCommand(player, words, param) if param == "" then - player:sendCancelMessage("Teleport position required.") + player:sendCancelMessage("Command param required.") return true end - local position = player:getPosition() - position:getNextPosition(player:getDirection(), 1) - local tile = Tile(position) - local teleport = tile and tile:getItemByType(ITEM_TYPE_TELEPORT) - if teleport then - local split = param:split(",") -- Split always return a table, even if it's empty - if #split ~= 3 then - player:sendCancelMessage('You need to declare the X, Y of Z of destination. Please use "/teleport X, Y, Z".') - return true - else - local destPosition = Position(split[1], split[2], split[3]) - if destPosition and destPosition:getTile() then - teleport:setDestination(destPosition) + local params = param:split(",") + if params[3] then + local position = player:getPosition() + position:getNextPosition(player:getDirection(), 1) + local destination = Position(params[1], params[2], params[3]) + if destination and destination:getTile() then + local tp = Game.createItem(35502, 1, position) + if tp then + tp:setDestination(destination) player:sendTextMessage(MESSAGE_EVENT_ADVANCE, string.format("New position: %s", param)) - else - player:sendCancelMessage("Destination position is not valid.") - return true end + else + player:sendCancelMessage("Destination position is not valid.") end else - player:sendCancelMessage("The item is not a teleport type") - return true + player:sendCancelMessage('You need to declare the X, Y of Z of destination. Please use "/teleport X, Y, Z".') end return true end diff --git a/data/scripts/talkactions/god/add_mounts.lua b/data/scripts/talkactions/god/add_mounts.lua index 6a589327039..3de09916505 100644 --- a/data/scripts/talkactions/god/add_mounts.lua +++ b/data/scripts/talkactions/god/add_mounts.lua @@ -18,7 +18,7 @@ function mounts.onSay(player, words, param) return true end - for i = 1, 217 do + for i = 1, 221 do target:addMount(i) end diff --git a/data/scripts/talkactions/god/close_server.lua b/data/scripts/talkactions/god/close_server.lua index 9f020e289d6..a807b4f72a1 100644 --- a/data/scripts/talkactions/god/close_server.lua +++ b/data/scripts/talkactions/god/close_server.lua @@ -19,8 +19,6 @@ function closeServer.onSay(player, words, param) end -- Updating daily reward next server save. UpdateDailyRewardGlobalStorage(DailyReward.storages.lastServerSave, os.time()) - -- Reset gamestore exp boost count. - db.query("UPDATE `player_storage` SET `value` = 0 WHERE `player_storage`.`key` = 51052") elseif param == "maintainance" then Game.setGameState(GAME_STATE_MAINTAIN) player:sendTextMessage(MESSAGE_ADMINISTRADOR, "Server is set to maintenance mode.") diff --git a/data/scripts/talkactions/player/reward.lua b/data/scripts/talkactions/player/reward.lua index a1ad754a309..b6c882eb9a2 100644 --- a/data/scripts/talkactions/player/reward.lua +++ b/data/scripts/talkactions/player/reward.lua @@ -1,11 +1,12 @@ local config = { items = { - { id = 35284, charges = 64000 }, - { id = 35279, charges = 64000 }, - { id = 35281, charges = 64000 }, - { id = 35283, charges = 64000 }, - { id = 35282, charges = 64000 }, - { id = 35280, charges = 64000 }, + { id = 35284, charges = 64400 }, + { id = 35279, charges = 64400 }, + { id = 35281, charges = 64400 }, + { id = 35283, charges = 64400 }, + { id = 35282, charges = 64400 }, + { id = 35280, charges = 64400 }, + { id = 44066, charges = 64400 }, }, storage = tonumber(Storage.PlayerWeaponReward), -- storage key, player can only win once } @@ -29,6 +30,7 @@ local function sendExerciseRewardModal(player) if item then item:setActionId(IMMOVABLE_ACTION_ID) item:setAttribute(ITEM_ATTRIBUTE_STORE, systemTime()) + item:setAttribute(ITEM_ATTRIBUTE_DESCRIPTION, string.format("You won this exercise weapon as a reward to be a %s player. Use it in a dummy!\nHave a nice game..", configManager.getString(configKeys.SERVER_NAME))) else player:sendTextMessage(MESSAGE_LOOK, "You need to have capacity and empty slots to receive.") return