You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 17, 2021. It is now read-only.
D1G1T4L3CH0 edited this page Mar 5, 2015
·
2 revisions
Summary
Item placed in player's inventory, picked up from inventory, and picked up from world. This can create a lot of calls. Inventory slot 58 is the cursor, you can use that to detect if the player has picked up the item from inventory, you may want to ignore those.
Object Returned
Data Type
Object
Description
int
InventorySlot
Inventory slot number.
int
Amount
How many.
string
Name
Item name.
int
Prefix
Item prefix number to the name. Use with Terraria.Item.Prefix().
int
NetID
NetID
Example
Lua
functionYourPlugin:Initialized()
export.Hooks= {}
export.Hooks.InventoryItemReceived=
{
Call=export.OnInventoryItemReceived,
}
endfunctionYourPlugin:OnInventoryItemReceived(ctx, args)
--example to be written laterend