thanks @Flatlander, this was my attempt to replicate the effect, before seeing your code
function shootProjectileTo(cid, pos, oldPos, effect, count)
if not count then
count = 1
end
local backCount = count+1
local path = getPathToPos(cid, pos)
if path ~= false then...