Hi, i need a function that checks every sqm doSendDistanceShoot passes.
And i have a question, if there is no function like this.
Does skrypt like this(not completed, maybe 5%) eat tons of resources?
If someone have better idea to check these sqm, please tell me !
And i have a question, if there is no function like this.
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local pos = getCreaturePosition(cid)
for i=-4,4 do
if toPosition.x == pos.x+i and toPosition.y == pos.y+i then
pos = {x=pos.x+i, y=pos.y+i, z=pos.z, stackpos=253}
doSendDistanceShoot(fromPosition, pos, CONST_ANI_WHIRLWINDAXE)
if i > 0 then
for k=1,i do
pos = getCreaturePosition(cid)
pos = {x=pos.x+k, y=pos.y+k, z=pos.z, stackpos=253}
blabla
end
else
for k=i,-1 do
pos = getCreaturePosition(cid)
pos = {x=pos.x+k, y=pos.y+k, z=pos.z, stackpos=253}
blabla
end
end
end
end
return true
end
If someone have better idea to check these sqm, please tell me !
Last edited: