-
-
Notifications
You must be signed in to change notification settings - Fork 647
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Subindo algumas atualizações para a minha branch de customizações.
- Loading branch information
Showing
28 changed files
with
1,792 additions
and
1,332 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
23 changes: 23 additions & 0 deletions
23
data-otservbr-global/scripts/actions/quests/Fonte_One_KK/Fonte_One.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,23 @@ | ||
local config = { | ||
[3598461] = Position(32340, 32224, 6), -- to the room | ||
[3598462] = Position(32337, 31815, 7), -- outside the room | ||
} | ||
|
||
local theThievesVine = Action() | ||
function theThievesVine.onUse(player, item, fromPosition, target, toPosition, isHotkey) | ||
local targetPosition = config[item.actionid] | ||
if not targetPosition then | ||
return true | ||
end | ||
if player:isPzLocked() then | ||
player:sendTextMessage(MESSAGE_FAILURE, "You can not enter a protection zone after attacking another player.") | ||
player:getPosition():sendMagicEffect(CONST_ME_POFF) | ||
return true | ||
end | ||
player:teleportTo(targetPosition) | ||
|
||
return true | ||
end | ||
|
||
theThievesVine:aid(3598461, 3598462) | ||
theThievesVine:register() |
23 changes: 23 additions & 0 deletions
23
data-otservbr-global/scripts/actions/quests/Fonte_One_KK/climbing_vine.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,23 @@ | ||
local config = { | ||
[35981] = Position(32340, 32224, 6), -- to the room | ||
[35982] = Position(32337, 31815, 7), -- outside the room | ||
} | ||
|
||
local theThievesVine = Action() | ||
function theThievesVine.onUse(player, item, fromPosition, target, toPosition, isHotkey) | ||
local targetPosition = config[item.actionid] | ||
if not targetPosition then | ||
return true | ||
end | ||
if player:isPzLocked() then | ||
player:sendTextMessage(MESSAGE_FAILURE, "You can not enter a protection zone after attacking another player.") | ||
player:getPosition():sendMagicEffect(CONST_ME_POFF) | ||
return true | ||
end | ||
player:teleportTo(targetPosition) | ||
|
||
return true | ||
end | ||
|
||
theThievesVine:aid(35981, 35982) | ||
theThievesVine:register() |
2 changes: 1 addition & 1 deletion
2
data-otservbr-global/scripts/actions/quests/forgotten_knowledge/horror_lever.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
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
102 changes: 85 additions & 17 deletions
102
data-otservbr-global/scripts/actions/quests/forgotten_knowledge/tenebris_lever.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 |
---|---|---|
@@ -1,27 +1,95 @@ | ||
local config = { | ||
boss = { | ||
name = "Lady Tenebris", | ||
position = Position(32912, 31599, 14), | ||
}, | ||
bossName = "Lady Tenebris", | ||
timeToFightAgain = 20, -- In hour | ||
timeToDefeat = 15, -- In minutes | ||
playerPositions = { | ||
{ pos = Position(32902, 31623, 14), teleport = Position(32911, 31603, 14) }, | ||
{ pos = Position(32902, 31624, 14), teleport = Position(32911, 31603, 14) }, | ||
{ pos = Position(32902, 31625, 14), teleport = Position(32911, 31603, 14) }, | ||
{ pos = Position(32902, 31626, 14), teleport = Position(32911, 31603, 14) }, | ||
{ pos = Position(32902, 31627, 14), teleport = Position(32911, 31603, 14) }, | ||
{ pos = Position(32902, 31623, 14), teleport = Position(32911, 31603, 14), effect = CONST_ME_TELEPORT }, | ||
{ pos = Position(32902, 31624, 14), teleport = Position(32911, 31603, 14), effect = CONST_ME_TELEPORT }, | ||
{ pos = Position(32902, 31625, 14), teleport = Position(32911, 31603, 14), effect = CONST_ME_TELEPORT }, | ||
{ pos = Position(32902, 31626, 14), teleport = Position(32911, 31603, 14), effect = CONST_ME_TELEPORT }, | ||
{ pos = Position(32902, 31627, 14), teleport = Position(32911, 31603, 14), effect = CONST_ME_TELEPORT }, | ||
}, | ||
onUseExtra = function(player) | ||
for d = 1, 6 do | ||
Game.createMonster("shadow tentacle", Position(math.random(32909, 32914), math.random(31596, 31601), 14), true, true) | ||
end | ||
end, | ||
bossPosition = Position(32912, 31599, 14), | ||
specPos = { | ||
from = Position(32895, 31585, 14), | ||
to = Position(32830, 32855, 14), | ||
}, | ||
exit = Position(32902, 31629, 14), | ||
} | ||
|
||
local lever = BossLever(config) | ||
lever:position(Position(32902, 31622, 14)) | ||
lever:register() | ||
local forgottenKnowledgeTenebris = Action() | ||
function forgottenKnowledgeTenebris.onUse(player, item, fromPosition, target, toPosition, isHotkey) | ||
if config.playerPositions[1].pos ~= player:getPosition() then | ||
return false | ||
end | ||
|
||
local spec = Spectators() | ||
spec:setOnlyPlayer(false) | ||
spec:setRemoveDestination(config.exit) | ||
spec:setCheckPosition(config.specPos) | ||
spec:check() | ||
|
||
if spec:getPlayers() > 0 then | ||
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "There's someone fighting with " .. config.bossName .. ".") | ||
return true | ||
end | ||
|
||
local lever = Lever() | ||
lever:setPositions(config.playerPositions) | ||
lever:setCondition(function(creature) | ||
if not creature or not creature:isPlayer() then | ||
return true | ||
end | ||
|
||
if creature:getStorageValue(config.storage) > os.time() then | ||
local info = lever:getInfoPositions() | ||
for _, v in pairs(info) do | ||
local newPlayer = v.creature | ||
if newPlayer then | ||
newPlayer:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You or a member in your team have to wait " .. config.timeToFightAgain .. " hours to face " .. config.bossName .. " again!") | ||
if newPlayer:getStorageValue(config.storage) > os.time() then | ||
newPlayer:getPosition():sendMagicEffect(CONST_ME_POFF) | ||
end | ||
end | ||
end | ||
return false | ||
end | ||
return true | ||
end) | ||
|
||
lever:checkPositions() | ||
if lever:checkConditions() then | ||
spec:removeMonsters() | ||
for d = 1, 6 do | ||
Game.createMonster("shadow tentacle", Position(math.random(32909, 32914), math.random(31596, 31601), 14), true, true) | ||
end | ||
local monster = Game.createMonster(config.bossName, config.bossPosition, true, true) | ||
if not monster then | ||
return true | ||
end | ||
lever:teleportPlayers() | ||
lever:setCooldownAllPlayers(config.bossName, os.time() + config.timeToFightAgain * 3600) | ||
addEvent(function() | ||
local old_players = lever:getInfoPositions() | ||
spec:clearCreaturesCache() | ||
spec:setOnlyPlayer(true) | ||
spec:check() | ||
local player_remove = {} | ||
for i, v in pairs(spec:getCreatureDetect()) do | ||
for _, v_old in pairs(old_players) do | ||
if v_old.creature == nil or v_old.creature:isMonster() then | ||
break | ||
end | ||
if v:getName() == v_old.creature:getName() then | ||
table.insert(player_remove, v_old.creature) | ||
break | ||
end | ||
end | ||
end | ||
spec:removePlayers(player_remove) | ||
end, config.timeToDefeat * 60 * 1000) | ||
end | ||
end | ||
|
||
forgottenKnowledgeTenebris:position(Position(32902, 31622, 14)) | ||
forgottenKnowledgeTenebris:register() |
Oops, something went wrong.