Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: disable ladder effect and add support for all ladders #3114

Merged
merged 1 commit into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions data-canary/scripts/actions/other/sewer.lua

This file was deleted.

19 changes: 0 additions & 19 deletions data-otservbr-global/scripts/actions/other/teleport.lua

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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()
Loading