Skip to content

Add correct behavior to all non-Mamook Incursion doors in Mamook - #11484

Open
TiberonKalkaz wants to merge 1 commit into
LandSandBoat:basefrom
TiberonKalkaz:Mamook_Doors
Open

TiberonKalkaz wants to merge 1 commit into
LandSandBoat:basefrom
TiberonKalkaz:Mamook_Doors

Conversation

@TiberonKalkaz

@TiberonKalkaz TiberonKalkaz commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

I affirm:

  • I understand that if I do not agree to the following points by completing the checkboxes my PR will be ignored.
  • I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.
  • I have read and understood the Contributing Guide and the Code of Conduct.
  • I have tested my code and the things my code has changed since the last commit in the PR and will test after any later commits.

What does this pull request do?

  1. Adds functionality to 8 Ebony Doors
    1. Doors are locked from a single direction - openable from the alternate facing
    2. Doors are openable by Tanscale Key or by Thief Tools - trading keys/tools from the non-locked side has no effect
    3. Messaging for Thf Main and non-Thf Mains is added - Thf main are told they can use Thief Tools
    4. Basic LockPick rate added for level 65 and >= 75 based on captures using Theif Tools
    5. More Data is needed for Living Keys, Skeleton Keys, and >75.
    6. 3 of the Ebony Doors are not reachable by players yet but are coded.
    7. Doors remain open for 15s
  2. Adds gating functionality to the Red Bell Mahogany Door
    1. This door is only used when the Mamool Ja have taken the Astral Candescence - in the event Mamook Incursion
    2. The AC cannot be currently stolen on LSB
    3. The Red Bell KI required to open the door, which only drops when Mamool Ja have the AC is not coded to "drop".
    4. This door has had it's note about a red bell added and no longer opens to a blank/unfinished room
  3. Adds functionality to Mahogany Door outside Galool Ja Ja's room
    1. Door requires 3 keys to be traded from outside the room.
    2. No Thief lockpicking option
    3. Door remains open for 17s
    4. Door is not openable from the inside
  4. Adds functionality to Mahogany Door inside Galool Ja Ja's room
    1. One of three doors in Galool Ja Ja's room is targetable and interactable - the north room
    2. Interacting with the door give the player an event offering them a chance to run away
    3. Selecting Yes teleports the player to Jade Sepulcher

Steps to test these changes

For the Ebony Doors

  1. Teleport to the door (coords are in npc scirps and in mamook npcs.yaml
  2. Interact from the locked side as non-thf 75 - get the message about tanscale
  3. Interact from the locked side as thf 75 - get the message about tanscale and thief tools
  4. Attempt to trade keys or tools from the unlocked side of the door - nothing happens
  5. Trade tanscale from the locked side - door opens for 15s, key breaks
  6. Interact with door from the non-locked side - door opens for 15s, message about unlocking from the inside.
  7. Trade thief tools from the locked side as a 75 thf - unlock the door 20% of the time, break tools 80% of the time.

For Red Bell Mahogany Door

  1. Interact with the door - it does not open, just provides a message about a red bell.

For Galool Ja Ja's Door

  1. Interact from Locked Side - get a message about 3 colors - door does not open
  2. Trade a bunch of garbage - door does not open
  3. Trade exactly 2224, 2225, 2226 (Silverscale, Tanscale, Blackscale) - door opens for 17s
  4. Interact from non-locked side - surprise - the gate is firmly shut. you are locked in. hope everyone got in 17s.

For Galool Ja Ja's North Room Door

  1. Interact and say No - no teleport
  2. Interact and say Yes - teleported to the exact spot in Jade Sepulcher from the captures

Out of Scope:

Door ID Type Why OOS Notes
17043954 Mahogany Door Beyond Mamook Incursion Red Bell Door Looks to be decorative per capture. Opens w/o Key
17043955 Mahogany Door Beyond Mamook Incursion Red Bell Door Looks to be a duplicate of the AC Recovery Fight Entry Door. Position is slighly different
17043990 Mahogany Door Beyond Mamook Incursion Red Bell Door AC Recovery Fight Entry Door
17043949 Mahogany Door Landing spot from Red Bell Door teleport Presumably is a way to teleport back

Captutes

Open Bugs:

Closes Bug 2712 reported against Pheonix

Comment thread scripts/zones/Mamook/globals.lua Outdated
return xi.item.SKELETON_KEY
elseif npcUtil.tradeHasExactly(trade, xi.item.LIVING_KEY) then
return xi.item.LIVING_KEY
elseif npcUtil.tradeHasExactly(trade, xi.item.SET_OF_THIEFS_TOOLS) then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use tradeMatches function

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will do

is tradeHadExactly on the deprecation path? If so I can take a swing at wiping it out in a future PR

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, the tl;dr is our old trade functions are really not good for the codebase as a whole for trading due to how item locking works. So we're moving away from locking immediately and now we check up front and lock/consume them later.

Comment thread scripts/zones/Mamook/globals.lua Outdated
local mamookGlobal = {}

local doorOpenTime = 15 -- Doors stay open for 15s
local noValidationFlag = 0x8000

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use the values directly

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updating

Comment thread scripts/zones/Mamook/globals.lua Outdated
end

-----------------------------------
-- Helper fcn to find success rate based on level and thf tool

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fcn

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will be wiped out by the next comment

Comment thread scripts/zones/Mamook/globals.lua Outdated
return
end

local rate = getDoorSuccessRate(thfKeyType, player:getMainLvl())

@Xaver-DaRed Xaver-DaRed Sep 15, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a helper function called inside a helper function which is also only called once in the whole file.
Something tells me all of this could be better organized

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will collapse helper fcns

Comment thread scripts/zones/Mamook/globals.lua Outdated
end

-- handle the Tanscale Key
if npcUtil.tradeHasExactly(trade, xi.item.MAMOOK_TANSCALE_KEY) then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tradeMatches

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updating

end

entity.onEventUpdate = function(player, csid, option, npc)
end

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dont add empty functions to npc or mob scripts, please

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeeted - was left over from testing

Comment thread scripts/zones/Mamook/npcs/_1t2.lua Outdated

local lockedSideOfDoor = function(player)
return player:getXPos() > -240.000
end

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please no. No "1 line functions that consist of a single check" and no "local variables defined at the very top outside of any concrete function" specially not when its only used once.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will update each npc file

i'll take a backlog to update the pattern in arrapago reef npcs as well (I think it was there)

Comment thread scripts/zones/Mamook/npcs/_1t2.lua Outdated

entity.onTrade = function(player, npc, trade)
if
npcUtil.tradeHasExactly(trade, { xi.item.MAMOOK_SILVERSCALE_KEY, xi.item.MAMOOK_TANSCALE_KEY, xi.item.MAMOOK_BLACKSCALE_KEY }) and

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tradeMatches

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated

local entity = {}

entity.onTrade = function(player, npc, trade)
end

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove empty functions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants