diff --git a/data-canary/scripts/actions/other/sewer.lua b/data-canary/scripts/actions/other/sewer.lua deleted file mode 100644 index 2868e887ae5..00000000000 --- a/data-canary/scripts/actions/other/sewer.lua +++ /dev/null @@ -1,12 +0,0 @@ -local sewer = Action() - -function sewer.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if item:getId() == 435 then - fromPosition.z = fromPosition.z + 1 - end - player:teleportTo(fromPosition, false) - return true -end - -sewer:id(435) -sewer:register() diff --git a/data-otservbr-global/scripts/actions/other/teleport.lua b/data-otservbr-global/scripts/actions/other/teleport.lua deleted file mode 100644 index 7e763f00594..00000000000 --- a/data-otservbr-global/scripts/actions/other/teleport.lua +++ /dev/null @@ -1,19 +0,0 @@ -local ladderTable = Game.getLadderIds() - -local upFloorIds = ladderTable - -local teleport = Action() - -function teleport.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if table.contains(upFloorIds, item.itemid) then - fromPosition:moveUpstairs() - else - fromPosition.z = fromPosition.z + 1 - end - player:teleportTo(fromPosition, false) - return true -end - -teleport:id(435) -teleport:id(unpack(ladderTable)) -teleport:register() diff --git a/data-canary/scripts/actions/other/ladder_up.lua b/data/scripts/actions/items/ladder_up.lua similarity index 71% rename from data-canary/scripts/actions/other/ladder_up.lua rename to data/scripts/actions/items/ladder_up.lua index 80d811fa741..5ec5f7c5b67 100644 --- a/data-canary/scripts/actions/other/ladder_up.lua +++ b/data/scripts/actions/items/ladder_up.lua @@ -1,9 +1,9 @@ -local setting = { 1948, 1968, 5542, 20474, 20475, 28656, 31262 } +local ladderTable = Game.getLadderIds() local ladder = Action() function ladder.onUse(player, item, fromPosition, target, toPosition, isHotkey) - if table.contains(setting, item.itemid) then + if table.contains(ladderTable, item.itemid) then fromPosition:moveUpstairs() else fromPosition.z = fromPosition.z + 1 @@ -18,8 +18,5 @@ function ladder.onUse(player, item, fromPosition, target, toPosition, isHotkey) return true end -for index, value in ipairs(setting) do - ladder:id(value) -end - +ladder:id(435, unpack(ladderTable)) ladder:register()