Skip to content

[lua][sql] Implement Maat's Concoction and Maat's Mix - #11179

Open
JasonW77 wants to merge 2 commits into
LandSandBoat:basefrom
JasonW77:fix/maats-jp-items
Open

JasonW77 wants to merge 2 commits into
LandSandBoat:basefrom
JasonW77:fix/maats-jp-items

Conversation

@JasonW77

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?

Implements usable-item scripts for Maat's Concoction (6597, 50 JP) and Maat's Mix (6598, 10 JP).

item_basic already names 6597 maats_concoction. item_usable still had it as mutton_curry with both rows -- TODO: Not implemented. Deeds already grant these items.

JP is applied to the current main job and stops at the 500 spent+unspent cap. Use is blocked below 99 (and for non-PCs).

Sources:

Steps to test these changes

  • Import/update sql/item_usable.sql (or run dbtool).
  • On a 99 job with fewer than 500 JP, use Mix: +10 JP. Use Concoction: +50 JP.
  • At 495 JP, Concoction should grant only 5 (cap 500) or refuse if already at cap.
  • Below 99, item should fail to use.
  • Confirm a PC with these items from deeds can consume them.

Made with Cursor

Comment thread scripts/globals/item_utils.lua Outdated
Comment thread scripts/globals/item_utils.lua
Comment thread scripts/globals/item_utils.lua Outdated
local job = target:getMainJob()
local total = target:getJobPoints(job) + target:getSpentJobPoints()
if total >= xi.itemUtils.JOB_POINTS_MAX then
return xi.msg.basic.ITEM_UNABLE_TO_USE_2

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.

Do you have a capture showing this is what happens?

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.

Same as above: no capture for the 500 JP cap fail path. Left the same unverified message and noted it in the helper.

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.

Same: no retail client, so no capture for the 500 JP fail path. TODO left in place.

Comment thread sql/item_usable.sql Outdated
INSERT INTO `item_usable` VALUES (6596,'duck_curry',1,10,0,0,0,0,0,0); -- TODO: Not implemented
INSERT INTO `item_usable` VALUES (6597,'mutton_curry',1,1,0,0,0,0,0,0); -- TODO: Not implemented
INSERT INTO `item_usable` VALUES (6598,'maats_mix',1,1,0,0,0,0,0,0); -- TODO: Not implemented
INSERT INTO `item_usable` VALUES (6597,'maats_concoction',1,1,0,0,0,0,0,0);

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.

Need capture for animation IDs

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.

No capture for the animation. Left animation / animationTime at 0 and added a TODO rather than copying a nearby potion or food ID.

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.

Same: no retail client, so no animation capture. Left animation at 0 with a TODO.

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.

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.

item_basic already names 6597 maats_concoction; item_usable still listed it as mutton_curry and both rows were TODO.
Concoction grants 50 JP, Mix grants 10, capped at 500 spent+unspent for the current job.
jobPointsMax is file-local. Fail messages and animation IDs are unverified pending retail captures.
Sources: BG-Wiki Maat's Mix / Maat's Concoction.
@JasonW77
JasonW77 force-pushed the fix/maats-jp-items branch from 76d8f13 to 54a2a69 Compare August 19, 2026 07:02
@JasonW77

Copy link
Copy Markdown
Contributor Author

I only play on a private server and do not have a retail client, so I cannot produce packet captures for the fail messages or item-use animation.

The fail message IDs and item_usable animation columns are left unverified with TODOs. Happy to plug in real IDs if someone has a capture.

@JasonW77

Copy link
Copy Markdown
Contributor Author

Parsed siknoz's Concoction dump (Raguza, 2021-10-13, Upper Jeuno).

0x028 ItemStart: category 9, FourCC item-use, param item 6597, message 28.
0x028 ItemFinish: category 5, actionid 6597, animation 34, param 50, message 807 (caplog: Raguza receives 50 job points.).

Set item_usable.animation for 6597 to 34. animationTime stays 0 (same as other elixir/drink rows that use 34).

Could not fetch the Mix OneDrive dumps from this environment (HTTP 403). Fail-message IDs and Mix animation are still TODO until those zips are available locally.

Success message 807 is not in MsgBasic yet; left unwired rather than adding an unverified enum name.

@JasonW77

Copy link
Copy Markdown
Contributor Author

Parsed the Mix dumps (thanks siknoz).

Success (Siknawz 2025-07-21 and 2026-05-23):

  • 0x028 ItemFinish: item 6598, animation 34, param 10, message 807 (caplog: Siknawz receives 10 job points.)
  • Same animation as Concoction. item_usable 6598 is now 34.

500 JP fail (Siknawz 2026-05-23, packets-only zip):

  • Capturer: ya so just doesnt use it, no error message
  • Client sent 0x037. No 0x029 unable-to-use. Incoming 0x028 was ItemStart with FourCC ItemInterrupt (spit), message 0.
  • onItemCheck now returns -1 at cap (LSB RefuseSilently). Under-99 still uses ITEM_UNABLE_TO_USE_2 (no dump for that path).

Wired 0x028 success message 807 as xi.msg.basic.RECEIVES_JOB_POINTS / MsgBasic::ReceivesJobPoints.

Animation 34 and message 807 from 0x028. At 500 JP onItemCheck returns -1 (no 0x029 fail).
@JasonW77
JasonW77 force-pushed the fix/maats-jp-items branch from a9c4031 to ac9e005 Compare August 21, 2026 22:35
@github-actions github-actions Bot added the stale label Sep 5, 2026
-- Mix Siknawz 2025-07-21 and 2026-05-23). At 500 JP retail sends no 0x029; capturer
-- noted "just doesnt use it, no error message". onItemCheck -1 is RefuseSilently.
-- Under-99 fail message is unverified.
local jobPointsMax = 500

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.

unneeded. use the 500 directly, this number cannot ever change

@LandSandBoat LandSandBoat deleted a comment from github-actions Bot Sep 12, 2026
@Xaver-DaRed Xaver-DaRed removed the stale label Sep 12, 2026
@Xaver-DaRed

Xaver-DaRed commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

You need to adress this CI errors
imagen

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.

4 participants