-
-
Notifications
You must be signed in to change notification settings - Fork 670
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 leave-party-ondeath
- Loading branch information
Showing
4 changed files
with
31 additions
and
3 deletions.
There are no files selected for viewing
28 changes: 28 additions & 0 deletions
28
data-otservbr-global/scripts/movements/teleport/candia.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,28 @@ | ||
local config = { | ||
{ position = { x = 33338, y = 32125, z = 7 }, destination = { x = 33574, y = 32224, z = 7 } }, -- Candia > Feyrist | ||
{ position = { x = 33339, y = 32125, z = 7 }, destination = { x = 33575, y = 32224, z = 7 } }, -- Candia > Feyrist | ||
{ position = { x = 33574, y = 32222, z = 7 }, destination = { x = 33338, y = 32127, z = 7 } }, -- Feyrist > Candia | ||
{ position = { x = 33575, y = 32222, z = 7 }, destination = { x = 33339, y = 32127, z = 7 } }, -- Feyrist > Candia | ||
} | ||
|
||
local candia = MoveEvent() | ||
function candia.onStepIn(creature, item, position, fromPosition) | ||
local player = creature:getPlayer() | ||
if not player then | ||
return false | ||
end | ||
|
||
for value in pairs(config) do | ||
if Position(config[value].position) == player:getPosition() then | ||
player:teleportTo(Position(config[value].destination)) | ||
player:getPosition():sendMagicEffect(CONST_ME_TELEPORT) | ||
return true | ||
end | ||
end | ||
end | ||
|
||
candia:type("stepin") | ||
for value in pairs(config) do | ||
candia:position(config[value].position) | ||
end | ||
candia: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