-
-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
121 changed files
with
1,820 additions
and
1,134 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
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
47 changes: 47 additions & 0 deletions
47
data-otxserver/scripts/creaturescripts/monster/faceless_bane_immunity.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,47 @@ | ||
local bossName = "Faceless Bane" | ||
|
||
local function healBoss(creature) | ||
if creature then | ||
creature:addHealth(creature:getMaxHealth()) | ||
creature:getPosition():sendMagicEffect(CONST_ME_BLOCKHIT) | ||
end | ||
end | ||
|
||
local function createSummons(creature) | ||
if creature then | ||
local pos = creature:getPosition() | ||
Game.createMonster("Gazer Spectre", pos, true, false, creature) | ||
Game.createMonster("Ripper Spectre", pos, true, false, creature) | ||
Game.createMonster("Burster Spectre", pos, true, false, creature) | ||
end | ||
end | ||
|
||
local function resetBoss(creature, deaths) | ||
if creature then | ||
healBoss(creature) | ||
createSummons(creature) | ||
Game.setStorageValue(GlobalStorage.TheDreamCourts.FacelessBane.Deaths, deaths + 1) | ||
Game.setStorageValue(GlobalStorage.TheDreamCourts.FacelessBane.StepsOn, 0) | ||
Game.setStorageValue(GlobalStorage.TheDreamCourts.FacelessBane.ResetSteps, 1) | ||
end | ||
end | ||
|
||
local facelessBaneImmunity = CreatureEvent("facelessBaneImmunity") | ||
|
||
function facelessBaneImmunity.onHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType) | ||
if creature and creature:isMonster() and creature:getName() == bossName then | ||
local creatureHealthPercent = (creature:getHealth() * 100) / creature:getMaxHealth() | ||
local facelessBaneDeathsStorage = Game.getStorageValue(GlobalStorage.TheDreamCourts.FacelessBane.Deaths) | ||
|
||
if creatureHealthPercent <= 20 and facelessBaneDeathsStorage < 1 then | ||
resetBoss(creature, facelessBaneDeathsStorage) | ||
return true | ||
elseif Game.getStorageValue(GlobalStorage.TheDreamCourts.FacelessBane.StepsOn) < 1 then | ||
healBoss(creature) | ||
return true | ||
end | ||
end | ||
return primaryDamage, primaryType, secondaryDamage, secondaryType | ||
end | ||
|
||
facelessBaneImmunity:register() |
39 changes: 39 additions & 0 deletions
39
data-otxserver/scripts/creaturescripts/quests/grimvale/feroxa_transform.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,39 @@ | ||
local feroxaTransform = CreatureEvent("FeroxaTransform") | ||
function feroxaTransform.onThink(creature) | ||
if creature:getName():lower() ~= "feroxa" then | ||
return true | ||
end | ||
if creature:getMaxHealth() == 100000 then | ||
if creature:getHealth() <= 50000 then | ||
creature:getPosition():sendMagicEffect(CONST_ME_POFF) | ||
Game.createMonster("feroxa2", creature:getPosition(), true, true) | ||
creature:remove() | ||
end | ||
end | ||
if creature:getMaxHealth() == 50000 then | ||
if creature:getHealth() <= 25000 then | ||
creature:getPosition():sendMagicEffect(CONST_ME_POFF) | ||
local feroxas = { | ||
[1] = { name = "feroxa3" }, | ||
[2] = { name = "feroxa4" }, | ||
} | ||
Game.createMonster(feroxas[math.random(#feroxas)].name, creature:getPosition(), true, true) | ||
creature:remove() | ||
end | ||
end | ||
end | ||
|
||
feroxaTransform:register() | ||
|
||
local feroxaDeath = CreatureEvent("FeroxaDeath") | ||
function feroxaDeath.onDeath(creature, corpse, deathList) | ||
if creature and creature:getMonster() then | ||
local pool = Tile(creature:getPosition()):getItemById(2886) | ||
if pool then | ||
pool:remove() | ||
end | ||
Game.createMonster("Feroxa5", creature:getPosition(), true, true) | ||
end | ||
end | ||
|
||
feroxaDeath:register() |
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
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
Oops, something went wrong.