RM2k3 had a command that let you set a variable to the database ID of an item that a character had equipped; eg. if you told it to reference Alex's Weapon ID, and Alex had a Bronze Sword which was #6 in the Weapons database, it'd set the variable to 6.
This function was, for some reason, dropped from RMXP, and I'd like to know if there's a way to recreate it using scripts.
The reason I'm asking is that I'm using an (evented) custom battle system that involves being able to dual-wield weapons. The right-hand weapon is tied to Enter / C and the left-hand is tied to Shift / Z. At present it works, but only because you can't use the same weapons in both the Right and Left hands - the game determines what items are in the "Weapon" and "Shield" slots via a series of conditional branches, but this also means that the weapons need to broken up into two categories and can't be used interchangeably. It severely limits the scope of what the player can do.
What I'm aiming to do is plug in one of the Dual Wielding scripts that's floating around and then re-write the CBS events so that it just grabs the equipment ID of whatever's in a specific slot, regardless of what kind of equipment it is. The item's actual stats are irrelevant; the CBS only cares about the ID number and they could both technically be Helmets for all it cares.
Thanks to anyone who can help me with this.