hmm... tricky, tricky. The best would be that the dev team would include some kind of active/inactive state for the dragged item in visionaire and make it able to activate an outline (+ choose color) when the dragged item is hovered above objects/items.
For now im stuck because i dont want to build a weird system only to drop items correctly. "dropping any" doesn't work for the system where you have for each item a command because there is no action which catches these cases (executed command: any).
The other solution was to use a "set item" when left clicking an item and via your lua script setting the cursor to its item representation.
This works so far, but I come across two problems: It seems that "item dropped" action doesn't worked with that...I guess i have to use the normal "left click executed with item #item# " here (left click is my default comand).
Second problem is that i cant check via "if current item is" stuff in visionaire because this if-condition doesnt exist either. I think i have to use some lua here, too to determine if a right click cancels the dragging or opens my inventory
Lets see.....
*Updated my post several times because of grammer and additions
EDIT: i guess i stick with the second workaround:
I used your script as a basis, so setting an item automagically changes the cursor.
When no item is set the default cursor is used.
Every Item gets its "called by another action " action which gets called by your lua script to change the cursor to its representation. the default cursor action is set inside my interface.
executing "left click" with no item set on an item, sets the item
executing "left click" with an item set on the same item, sets the cursor back to default
executing "left click" with "any" item set shows a default phrase.
when an item is set (defined via lua script) a condition is set. when right clicking, the cursor is set to default. When no item is set the inventory opens or closes.
Every "item X dropped" action in the game has to be changed to a normal "left click executed with item X" action to make sure the pseudo dropping still works ("left click" is my default action).
On doorways where i change the cursor to arrows should not change, when an item is set (like when used the normal dragging from visionaire). To achieve this i added a condition "used_item" which turns true / false inside your script when having an item or not.
Every item has also a representation as a cursor with an inactive (normal item) and active (item with border) state.