This repository has been archived by the owner on May 20, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 162
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix falcon castle access to doors and teleport (#758)
Fix: • access to quest doors in falcon castle • access to teleport in falcon castle • door to ghoul quest Add: • timer and random reward to chests • reward from chests in falcon castle
- Loading branch information
Showing
23 changed files
with
333 additions
and
107 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,36 @@ | ||
local config = { | ||
[57601] = Position(33326, 31351, 7), | ||
[57602] = Position(33382, 31292, 7), | ||
[57603] = Position(33374, 31310, 7), | ||
[64007] = Position(33346, 31349, 7), | ||
local boats = { | ||
{pos = {x = 33344, y = 31349, z = 7}, destination = Position(33326, 31351, 7), unlockShortcut = Storage.TheSecretLibrary.ShortcutToBastion}, | ||
{pos = {x = 33373, y = 31309, z = 7}, destination = Position(33382, 31292, 7)}, | ||
{pos = {x = 33382, y = 31294, z = 7}, destination = Position(33374, 31310, 7)}, | ||
{pos = {x = 33328, y = 31352, z = 7}, destination = Position(33346, 31348, 7), access = Storage.TheSecretLibrary.ShortcutToBastion} | ||
} | ||
|
||
local boat = Action() | ||
|
||
function boat.onUse(player, item, fromPosition, itemEx, toPosition) | ||
for actionId, destination in pairs(config) do | ||
if item.actionid == actionId then | ||
player:teleportTo(destination) | ||
destination:sendMagicEffect(CONST_ME_POFF) | ||
fromPosition:sendMagicEffect(CONST_ME_POFF) | ||
return true | ||
end | ||
end | ||
for b = 1, #boats do | ||
if item:getPosition() == Position(boats[b].pos) then | ||
if boats[b].unlockShortcut then | ||
if player:getStorageValue(boats[b].unlockShortcut) < 1 then | ||
player:setStorageValue(boats[b].unlockShortcut, 1) | ||
end | ||
end | ||
if boats[b].access then | ||
if player:getStorageValue(boats[b].access) == 1 then | ||
player:teleportTo(boats[b].destination) | ||
player:getPosition():sendMagicEffect(CONST_ME_WATERSPLASH) | ||
return true | ||
end | ||
else | ||
player:teleportTo(boats[b].destination) | ||
player:getPosition():sendMagicEffect(CONST_ME_WATERSPLASH) | ||
return true | ||
end | ||
end | ||
end | ||
end | ||
|
||
boat:aid(57601, 57602, 57603, 64007) | ||
for a = 1, #boats do | ||
boat:position(boats[a].pos) | ||
end | ||
boat: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
51 changes: 51 additions & 0 deletions
51
data/scripts/creaturescripts/quests/the_secret_library/falcon_minibosses.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,51 @@ | ||
local grandCommanderSoerenDeath = CreatureEvent("GrandCommanderSoerenDeath") | ||
function grandCommanderSoerenDeath.onDeath(creature, corpse, killer, mostDamage, unjustified, mostDamage_unjustified) | ||
if killer:isPlayer() and killer:getStorageValue(Storage.TheSecretLibrary.MiniBosses.GrandCommanderSoeren) < 1 then | ||
killer:setStorageValue(Storage.TheSecretLibrary.MiniBosses.GrandCommanderSoeren, 1) | ||
if killer:getStorageValue(Storage.TheSecretLibrary.MiniBosses.PreceptorLazare) == 1 then | ||
killer:setStorageValue(Storage.TheSecretLibrary.LowerBastionAccess, 1) -- Access to quest door | ||
end | ||
end | ||
end | ||
grandCommanderSoerenDeath:register() | ||
|
||
local preceptorLazareDeath = CreatureEvent("PreceptorLazareDeath") | ||
function preceptorLazareDeath.onDeath(creature, corpse, killer, mostDamage, unjustified, mostDamage_unjustified) | ||
if killer:isPlayer() and killer:getStorageValue(Storage.TheSecretLibrary.MiniBosses.PreceptorLazare) < 1 then | ||
killer:setStorageValue(Storage.TheSecretLibrary.MiniBosses.PreceptorLazare, 1) | ||
if killer:getStorageValue(Storage.TheSecretLibrary.MiniBosses.GrandCommanderSoeren) == 1 then | ||
killer:setStorageValue(Storage.TheSecretLibrary.LowerBastionAccess, 1) -- Access to quest door | ||
end | ||
end | ||
end | ||
preceptorLazareDeath:register() | ||
|
||
local grandChaplainGaunderDeath = CreatureEvent("GrandChaplainGaunderDeath") | ||
function grandChaplainGaunderDeath.onDeath(creature, corpse, killer, mostDamage, unjustified, mostDamage_unjustified) | ||
if killer:isPlayer() and killer:getStorageValue(Storage.TheSecretLibrary.MiniBosses.GrandChaplainGaunder) < 1 then | ||
killer:setStorageValue(Storage.TheSecretLibrary.MiniBosses.GrandChaplainGaunder, 1) | ||
if killer:getStorageValue(Storage.TheSecretLibrary.MiniBosses.GrandCanonDominus) == 1 then | ||
killer:setStorageValue(Storage.TheSecretLibrary.UndergroundBastionAccess, 1) -- Access to quest door | ||
end | ||
end | ||
end | ||
grandChaplainGaunderDeath:register() | ||
|
||
local grandCanonDominusDeath = CreatureEvent("GrandCanonDominusDeath") | ||
function grandCanonDominusDeath.onDeath(creature, corpse, killer, mostDamage, unjustified, mostDamage_unjustified) | ||
if killer:isPlayer() and killer:getStorageValue(Storage.TheSecretLibrary.MiniBosses.GrandCanonDominus) < 1 then | ||
killer:setStorageValue(Storage.TheSecretLibrary.MiniBosses.GrandCanonDominus, 1) | ||
if killer:getStorageValue(Storage.TheSecretLibrary.MiniBosses.GrandChaplainGaunder) == 1 then | ||
killer:setStorageValue(Storage.TheSecretLibrary.UndergroundBastionAccess, 1) -- Access to quest door | ||
end | ||
end | ||
end | ||
grandCanonDominusDeath:register() | ||
|
||
local dazedLeafGolemDeath = CreatureEvent("DazedLeafGolemDeath") | ||
function dazedLeafGolemDeath.onDeath(creature, corpse, killer, mostDamage, unjustified, mostDamage_unjustified) | ||
if killer:isPlayer() and killer:getStorageValue(Storage.TheSecretLibrary.OberonAccess) < 1 then | ||
killer:setStorageValue(Storage.TheSecretLibrary.OberonAccess, 1) -- Access to teleport | ||
end | ||
end | ||
dazedLeafGolemDeath: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
Oops, something went wrong.