forked from opentibiabr/canary
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into callback-quest
- Loading branch information
Showing
134 changed files
with
2,050 additions
and
1,275 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
dofile(DATA_DIRECTORY .. "/lib/others/dawnport.lua") | ||
dofile(DATA_DIRECTORY .. "/lib/others/soulpit.lua") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,179 @@ | ||
SoulPit = { | ||
SoulCoresConfiguration = { | ||
chanceToGetSameMonsterSoulCore = 15, -- 15% | ||
chanceToDropSoulCore = 5, -- 5% | ||
chanceToGetOminousSoulCore = 2, -- 2% | ||
chanceToDropSoulPrism = 4, -- 4% | ||
monsterVariationsSoulCore = { | ||
["Horse"] = "horse soul core (taupe)", | ||
["Brown Horse"] = "horse soul core (brown)", | ||
["Grey Horse"] = "horse soul core (gray)", | ||
["Nomad"] = "nomad soul core (basic)", | ||
["Nomad Blue"] = "nomad soul core (blue)", | ||
["Nomad Female"] = "nomad soul core (female)", | ||
["Purple Butterfly"] = "butterfly soul core (purple)", | ||
["Butterfly"] = "butterfly soul core (blue)", | ||
["Blue Butterfly"] = "butterfly soul core (blue)", | ||
["Red Butterfly"] = "butterfly soul core (red)", | ||
}, | ||
monstersDifficulties = { | ||
["Harmless"] = 1, | ||
["Trivial"] = 2, | ||
["Easy"] = 3, | ||
["Medium"] = 4, | ||
["Hard"] = 5, | ||
["Challenge"] = 6, | ||
}, | ||
}, | ||
encounter = nil, | ||
kickEvent = nil, | ||
soulCores = Game.getSoulCoreItems(), | ||
requiredLevel = 8, | ||
playerPositions = { | ||
{ | ||
pos = Position(32375, 31158, 8), | ||
teleport = Position(32373, 31151, 8), | ||
effect = CONST_ME_TELEPORT, | ||
}, | ||
{ | ||
pos = Position(32375, 31159, 8), | ||
teleport = Position(32374, 31151, 8), | ||
effect = CONST_ME_TELEPORT, | ||
}, | ||
{ | ||
pos = Position(32375, 31160, 8), | ||
teleport = Position(32375, 31151, 8), | ||
effect = CONST_ME_TELEPORT, | ||
}, | ||
{ | ||
pos = Position(32375, 31161, 8), | ||
teleport = Position(32376, 31151, 8), | ||
effect = CONST_ME_TELEPORT, | ||
}, | ||
{ | ||
pos = Position(32375, 31162, 8), | ||
teleport = Position(32377, 31151, 8), | ||
effect = CONST_ME_TELEPORT, | ||
}, | ||
}, | ||
waves = { | ||
[1] = { | ||
stacks = { | ||
[1] = 7, | ||
}, | ||
}, | ||
[2] = { | ||
stacks = { | ||
[1] = 4, | ||
[5] = 3, | ||
}, | ||
}, | ||
[3] = { | ||
stacks = { | ||
[1] = 5, | ||
[15] = 2, | ||
}, | ||
}, | ||
[4] = { | ||
stacks = { | ||
[1] = 3, | ||
[5] = 3, | ||
[40] = 1, | ||
}, | ||
}, | ||
}, | ||
effects = { | ||
[1] = CONST_ME_TELEPORT, | ||
[5] = CONST_ME_ORANGETELEPORT, | ||
[15] = CONST_ME_REDTELEPORT, | ||
[40] = CONST_ME_PURPLETELEPORT, | ||
}, | ||
possibleAbilities = { | ||
"overpowerSoulPit", | ||
"enrageSoulPit", | ||
"opressorSoulPit", | ||
}, | ||
bossAbilities = { | ||
overpowerSoulPit = { | ||
criticalChance = 50, -- 50% | ||
criticalDamage = 25, -- 25% | ||
apply = function(monster) | ||
monster:criticalChance(SoulPit.bossAbilities.overpowerSoulPit.criticalChance) | ||
monster:criticalDamage(SoulPit.bossAbilities.overpowerSoulPit.criticalDamage) | ||
end, | ||
}, | ||
enrageSoulPit = { | ||
bounds = { | ||
[{ 0.8, 0.6 }] = 0.9, -- 10% damage reduction | ||
[{ 0.6, 0.4 }] = 0.75, -- 25% damage reduction | ||
[{ 0.4, 0.2 }] = 0.6, -- 40% damage reduction | ||
[{ 0.0, 0.2 }] = 0.4, -- 60% damage reduction | ||
}, | ||
apply = function(monster) | ||
monster:registerEvent("enrageSoulPit") | ||
end, | ||
}, | ||
opressorSoulPit = { | ||
spells = { | ||
{ name = "soulpit opressor", interval = 2000, chance = 25, minDamage = 0, maxDamage = 0 }, | ||
{ name = "soulpit powerless", interval = 2000, chance = 30, minDamage = 0, maxDamage = 0 }, | ||
{ name = "soulpit intensehex", interval = 2000, chance = 15, minDamage = 0, maxDamage = 0 }, | ||
}, | ||
apply = function(monster) | ||
-- Applying spells | ||
for _, spell in pairs(SoulPit.bossAbilities.opressorSoulPit.spells) do | ||
monster:addAttackSpell(readSpell(spell, monster:getType())) | ||
end | ||
|
||
return true | ||
end, | ||
}, | ||
}, | ||
timeToKick = 10 * 60 * 1000, -- 10 minutes | ||
checkMonstersDelay = 4.5 * 1000, -- 4.5 seconds | The check delay should never be less than the timeToSpawnMonsters. | ||
timeToSpawnMonsters = 4 * 1000, -- 4 seconds | ||
totalMonsters = 7, | ||
obeliskActive = 47379, | ||
obeliskInactive = 47367, | ||
obeliskPosition = Position(32375, 31157, 8), | ||
bossPosition = Position(32376, 31144, 8), | ||
exit = Position(32373, 31158, 8), | ||
zone = Zone("soulpit"), | ||
|
||
getMonsterVariationNameBySoulCore = function(searchName) | ||
for mTypeName, soulCoreName in pairs(SoulPit.SoulCoresConfiguration.monsterVariationsSoulCore) do | ||
if soulCoreName == searchName then | ||
return mTypeName | ||
end | ||
end | ||
|
||
return nil | ||
end, | ||
getSoulCoreMonster = function(name) | ||
return name:match("^(.-) soul core") | ||
end, | ||
onFuseSoulCores = function(player, item, target) | ||
local itemCount = item:getCount(item:getId()) | ||
if item:getId() == target:getId() and itemCount <= 1 then | ||
return false | ||
end | ||
|
||
local itemSoulCore = SoulPit.getSoulCoreMonster(item:getName()) | ||
local targetSoulCore = SoulPit.getSoulCoreMonster(target:getName()) | ||
if not itemSoulCore or not targetSoulCore then | ||
return false | ||
end | ||
|
||
local randomSoulCore = SoulPit.soulCores[math.random(#SoulPit.soulCores)] | ||
player:addItem(randomSoulCore:getId(), 1) | ||
player:getPosition():sendMagicEffect(CONST_ME_MAGIC_BLUE) | ||
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, string.format("You have received a %s soul core.", randomSoulCore:getName())) | ||
|
||
item:remove(1) | ||
target:remove(1) | ||
return true | ||
end, | ||
} | ||
|
||
SoulPit.zone:addArea(Position(32362, 31132, 8), Position(32390, 31153, 8)) | ||
SoulPit.zone:setRemoveDestination(SoulPit.exit) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
function onUpdateDatabase() | ||
logger.info("Updating database to version 49 (feat: animus mastery (soulpit))") | ||
|
||
db.query("ALTER TABLE `players` ADD `animus_mastery` mediumblob DEFAULT NULL;") | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 0 additions & 23 deletions
23
data-otservbr-global/scripts/actions/bosses_levers/gorzindel.lua
This file was deleted.
Oops, something went wrong.
28 changes: 0 additions & 28 deletions
28
data-otservbr-global/scripts/actions/bosses_levers/king_zelos.lua
This file was deleted.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
data-otservbr-global/scripts/actions/soulpit/soulpit_arena_exit.lua
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
local soulpitArenaExitConfig = { | ||
arenaExit = Position(32375, 31153, 8), | ||
destination = Position(32373, 31158, 8), | ||
} | ||
|
||
local soulpitArenaExit = Action() | ||
|
||
function soulpitArenaExit.onUse(player, item, fromPosition, target, toPosition, isHotkey) | ||
if not player then | ||
return false | ||
end | ||
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) | ||
player:teleportTo(soulpitArenaExitConfig.destination) | ||
end | ||
|
||
soulpitArenaExit:position(soulpitArenaExitConfig.arenaExit) | ||
soulpitArenaExit:register() |
Oops, something went wrong.