Do you know how to edit the source? Since the find person function is not made in LUA, rather in the source code, it's inevitable to modify it from there.
Here are some pointers if you have any experience:
spells.cpp -> :1292 [SearchPlayer]
Further down you can see validation processes at :1325-:1334
You can add your own if-statement here
Further more, you can do this iteration-process to check all the items equipped by the player:
Code:
bool foundItem = false;
for (int32_t slotId = 1; slotId <= 10; ++slotId) {
Item* item = player->inventory[slotId];
if (item) {
if (item->getId() == 2014) {
foundItem = true;
}
}
}
if (!foundItem) {
return false;
}
This little piece of code should hopefully iterate through the player's item slots, checking if any of the items has the id of
2014, if the item was not found, it simply cancels the process. Then you can add error messages, etc. Let me know how it works out.
There might be variation in the sources, depending on version, but the function names
should be the same.
Ignazio