I think I need to rewrite the part about the client's missiles, maybe I can change the missel coordinate via server protocolJust guessing:
The way projectiles are drawn is different, because thy are slow, cant really tell about that. BBut to make it move, you may try to change
What?!
Ontopic. Try to recalculate the position of the spell target with an event? Never tried.
I really did not know, what is allowed to post links or make references to other forums...the problem is you are asking on otland dont waste your time just go to tibiaking people are actually uploading stuff there for free instead of 5$ foer my OT PLX
so much for a fucking open source community when people will eat you like lizards for uploading content like CAST system because men i was making some monis for my scripts
Please, go to that forum if you think this one is useless. There is 0 development.you call it other forums i call it geniue resources.
function shootProjectileTo(cid, pos, oldpos, disteffect, count, speed, combat, area, min, max, effect, aggressive)
if isCreature(cid) then
local target = pos
if isCreature(target) then
pos = getCreaturePosition(target)
end
if not oldpos then oldpos = getCreaturePosition(cid) end
local newPos = getPositionByDirection({x=oldpos.x, y=oldpos.y, z=oldpos.z}, getDirectionTo(oldpos, pos, true), 1)
newPos.stackpos = 1
local hit = false
if getDistanceBetween(newPos, pos) <= 0 then
hit = true
elseif isTile(newPos) then
while newPos.stackpos < 256 and hit == false do
local thing = getThingFromPosition(newPos)
if thing.uid == 0 and newPos.stackpos == 0 then
newPos.stackpos = 256
elseif thing.uid == 0 and newPos.stackpos > 3 and newPos.stackpos < 255 then
newPos.stackpos = 255
else
newPos.stackpos = newPos.stackpos + 1
end
if thing.uid > 0 then
if isCreature(thing.uid) then
hit = true
elseif thing.itemid > 0 then
local thingInfo = getItemInfo(thing.itemid)
if thingInfo.blockSolid == true and math.random(1, 100) < 50 then
hit = true
end
if thingInfo.blockProjectile == true then
newPos = oldpos
hit = true
end
end
end
end
end
if hit and combat then
if isCreature(cid) then
doAreaCombatHealth(cid, combat, newPos, area, min, max, effect, aggressive)
else
doSendMagicEffect(newPos, 55)
end
return true
end
doSendDistanceShoot(oldpos, newPos, disteffect, false, speed)
if not count then count = 1 end
count = count - 1
if count > 0 then
addEvent(shootProjectileTo, speed, cid, target, newPos, disteffect, count, speed, combat, area, min, max, effect, aggressive)
return true
end
end
return true
end
doSendDistanceShoot(oldpos, newPos, disteffect, false, speed)
You're an amazing person, I really appreciate your contributions.Hello Friends I see my video up there.
Here is the code I used, it's for TFS 0.X (not TFS 1.X) so you are using the new TFS you'll have to edit it to make it work probably.
Code:function shootProjectileTo(cid, pos, oldpos, disteffect, count, speed, combat, area, min, max, effect, aggressive) if isCreature(cid) then local target = pos if isCreature(target) then pos = getCreaturePosition(target) end if not oldpos then oldpos = getCreaturePosition(cid) end local newPos = getPositionByDirection({x=oldpos.x, y=oldpos.y, z=oldpos.z}, getDirectionTo(oldpos, pos, true), 1) newPos.stackpos = 1 local hit = false if getDistanceBetween(newPos, pos) <= 0 then hit = true elseif isTile(newPos) then while newPos.stackpos < 256 and hit == false do local thing = getThingFromPosition(newPos) if thing.uid == 0 and newPos.stackpos == 0 then newPos.stackpos = 256 elseif thing.uid == 0 and newPos.stackpos > 3 and newPos.stackpos < 255 then newPos.stackpos = 255 else newPos.stackpos = newPos.stackpos + 1 end if thing.uid > 0 then if isCreature(thing.uid) then hit = true elseif thing.itemid > 0 then local thingInfo = getItemInfo(thing.itemid) if thingInfo.blockSolid == true and math.random(1, 100) < 50 then hit = true end if thingInfo.blockProjectile == true then newPos = oldpos hit = true end end end end end if hit and combat then if isCreature(cid) then doAreaCombatHealth(cid, combat, newPos, area, min, max, effect, aggressive) else doSendMagicEffect(newPos, 55) end return true end doSendDistanceShoot(oldpos, newPos, disteffect, false, speed) if not count then count = 1 end count = count - 1 if count > 0 then addEvent(shootProjectileTo, speed, cid, target, newPos, disteffect, count, speed, combat, area, min, max, effect, aggressive) return true end end return true end
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
local newPos = getPositionByDirection(oldPos, path[count], 1)
if count == #path then
doSendDistanceShoot(getCreaturePosition(cid), newPos, effect)
end
if count < #path then
if isWalkable(newPos, true, false, true) then
shootProjectileTo(cid, pos, newPos, effect, count+1)
else
doSendDistanceShoot(getCreaturePosition(cid), newPos, effect)
end
end
end
end