Hi IGCN Team,
I'm currently implementing a Lua system around the Moss Merchant spin boxes and I would like to display messages to the player whenever they perform a spin.
The ideal behavior would be:
When the player clicks Open Box / Spin in the Moss Merchant UI, the server can detect that action.
Immediately show a message like:
You used x2 Jewel of Wish to spin.
After the reward is generated, show another message:
You received: Jewel of Chaos x1.
Right now the only available hooks related to this interaction appear to be:
onNpcTalk(oPlayer, oNpc)
onCloseWindow(oPlayer)
These only allow detecting when the NPC window opens or closes, which means we can only compare inventory before and after the session, but we cannot detect each individual spin action.
So my question is:
Is there any Lua API (existing or planned) that can catch the player action when they click the Moss Merchant "Open Box / Spin" button?
For example something like:
onMossSpin(oPlayer, boxType)
onChaosBoxMix(oPlayer, mixId)
onNpcAction(oPlayer, actionId)
or any event triggered when the server processes the spin request.
Being able to hook this action would allow Lua scripts to:
display spin cost messages
show reward notifications
log Moss spins
implement custom spin mechanics
If such an API does not exist yet, would it be possible to expose a hook for the Moss Merchant spin action?
Thank you!

Recommended Comments
There are no comments to display.