Think that would be good if players couldn't hide some big items like Great lances or maybe long bardiches being infantry, here is an example code to do it.
common_drop_lance = (0, 0, 2, [],
[
(multiplayer_is_server),
(try_for_agents, ":agent"),
(agent_is_alive, ":agent"),
(agent_is_human, ":agent"),
(try_begin),
(agent_has_item_equipped, ":agent", "itm_example_lance_1"),
(assign, ":cur_item", "itm_lance_1"),
(else_try),
(agent_has_item_equipped, ":agent", "itm_example_lance_2"),
(assign, ":cur_item", "itm_battle_lance_2"),
(else_try),
(agent_has_item_equipped, ":agent", "itm_example_big_item"),
(assign, ":cur_item", "itm_big_item"),
(try_end),
(try_begin),
(agent_get_horse, ":horse", ":agent"), ## You don't drop item if
(eq, ":horse", -1), ## you are riding a horse.
(agent_has_item_equipped, ":agent", ":cur_item"),
(agent_get_wielded_item, ":item", ":agent"), ## You don't drop item if you have
(neq, ":item", ":cur_item"), ## it in your hands.
(agent_unequip_item, ":agent", ":cur_item"),
(set_spawn_position, ":cur_pos"),
(agent_get_position, ":cur_pos",":agent"),
(spawn_item, ":cur_item"),
(try_end),
(try_end),
]
)