Scriptcall from item with valriable

I want to know how to make a scriptcall to check if I have an item.
But using a variable that determines which item is being checked.
Because I would have to do that check with several items, and that code would speed things up.
$game_party.has_item?($data_items[$game_variables[X]])
$game_party.has_item?($data_weapons[$game_variables[X]])
$game_party.has_item?($data_armors[$game_variables[X]])
Should work
The variable would just have a number in it.

Original thread: https://forums.rpgmakerweb.com/threads/scriptcall-from-item-with-valriable.168456/