Skip to content

Commit

Permalink
* Fixed Morguthis wall action.
Browse files Browse the repository at this point in the history
  • Loading branch information
jprzimba committed Jan 8, 2025
1 parent bb485f9 commit 41524cc
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
local Morguthiswall = Action()

function Morguthiswall.onUse(player, item, fromPosition, target, toPosition)
local wallPosition = Position(33211, 32698, 13)
local wallId = 1306

local tile = Tile(wallPosition)
if not tile then
return false
end

local wall = tile:getItemById(wallId)
if wall then
wall:remove()
else
local creatures = tile:getCreatures()
if creatures then
for _, creature in ipairs(creatures) do
local newPosition = Position(wallPosition.x, wallPosition.y + 1, wallPosition.z)
creature:teleportTo(newPosition)
end
end

local items = tile:getItems()
if items then
for _, tileItem in ipairs(items) do
local newPosition = Position(wallPosition.x, wallPosition.y + 1, wallPosition.z)
tileItem:moveTo(newPosition)
end
end

Game.createItem(wallId, 1, wallPosition)
end

return true
end

Morguthiswall:aid(10808)
Morguthiswall:register()
2 changes: 1 addition & 1 deletion markdowns/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
- Prevent players from entering the pool while in ghost mode. ([Tryller](https://github.com/jprzimba))
- Prevent players from logging out while in the pool.
- Prevent the use of `/n`, `/m`, and `/s` commands while in the pool. ([Tryller](https://github.com/jprzimba))

- Fixed Morguthis wall action. ([kaleohanopahala](https://github.com/kaleohanopahala))

## Version 4.1

Expand Down

0 comments on commit 41524cc

Please sign in to comment.