(See title)
Legacy Lua events are all bad made.
Cause items cannot think! Creatures, although, can.
Back to topic: It's a good idea indeed. Should've been here since the beginning.
Anyone here ever study how a entity system works? Basically you add "components" to the entities(thing) and then the thing can have movement(movement component), a.i component(like onthink) etc.
It's not the right way to think about items.
We have:
// Player:onMoveItem(item, count, fromPosition, toPosition) or Player.onMoveItem(self, item, count, fromPosition, toPosition, fromCylinder, toCylinder)
// Player:onItemMoved(item, count, fromPosition, toPosition) or Player.onItemMoved(self, item, count, fromPosition, toPosition, fromCylinder, toCylinder)
// moveevent:onEquip / deEquip / etc. (callback)
What do items do?
There are systems to cover everything:
Use them on things - _that's what actions is for_
Apply conditions/buffs - _movements / attributes / items.xml_
Damage creatures - _items.xml / weapons.xml / onHealthChange()_
In every other situation the item is being interacted _with_, by the game.
Having an onThink(), a perpetual loop in the scheduler is _not a good idea_ outside NPCs/Monsters imo(?)