Spell changes are required to make runes work without target (player), but Oen is right. You cannot use
sendUseOnCreature
on client side, as it does not send 'target position', only it's ID (creature ID), then server calculates
toPosition
using creature current position (for ex. Action Lua script).
That's exactly what 7.8+ client code does.
On client side you see some creature on position X, when it moves, on server it's immediately moved to X+1, when player press arrow key. On client side it knows that given creature is on position X+1 too, but it starts playing move animation that moves creature from tile to tile smoothly. If you use rune on X position, when creature started it's move (animation), it should send given position to server, as there is no creature on position X anymore, but client (7.8+) detects that there is a 'walking creature' (animation) on position X and that moving creature ID is 123 and it sends packet
sendUseOnCreature
with ID instead of position.
You can replace:
C++:
if(toThing->isCreature() && (g_game.getProtocolVersion() >= 780 || g_game.getFeature(Otc::GameForceAllowItemHotkeys)))
m_protocolGame->sendUseOnCreature(pos, item->getId(), subType ? subType : item->getStackPos(), toThing->getId());
else
m_protocolGame->sendUseItemWith(pos, item->getId(), subType ? subType : item->getStackPos(), toThing->getPosition(), toThing->getId(), toThing->getStackPos());
with:
C++:
m_protocolGame->sendUseItemWith(pos, item->getId(), subType ? subType : item->getStackPos(), toThing->getPosition(), toThing->getId(), toThing->getStackPos());
but shooting through Battle Window will still hit target on it's actual (server) position.
You got to test, if it fixes your problem.