whitevo
Feeling good, thats what I do.
Using TFS 1.0
I noticed my custom charge spell on monster gives timeout for server if the charge spell comes 8 tiles away from targeted monster. It has no problem to execute it when its 7 tiles or less.
Im using:
Monster(cid):getTargetList()
getPath(startPos, endPos, obstacle) --custom function
It spirals out from startPos until it finds endPos. It will search maximum 10 tiles in one direction. (this means covers only 100 tiles. else it returns empty table). After finding endPos is will trace back to startPos using table indexes, so it will take the shortest path to StartPos. Return value is table with positions.
Monster(cid):teleportTo(position) --it teleports the monster trough shortest path until it reach destination position. Using AddEvent() with interval 300.
For each position i do: Tile(position):getBottomCreature() -- if it finds target it will deal damage to it.
I also add Condition HASTE on monster for the charing duration -- total duration is SUM of addEvent intervals
Any clue why 8+ tiles cause timeout?
I noticed my custom charge spell on monster gives timeout for server if the charge spell comes 8 tiles away from targeted monster. It has no problem to execute it when its 7 tiles or less.
Im using:
Monster(cid):getTargetList()
getPath(startPos, endPos, obstacle) --custom function
It spirals out from startPos until it finds endPos. It will search maximum 10 tiles in one direction. (this means covers only 100 tiles. else it returns empty table). After finding endPos is will trace back to startPos using table indexes, so it will take the shortest path to StartPos. Return value is table with positions.
Monster(cid):teleportTo(position) --it teleports the monster trough shortest path until it reach destination position. Using AddEvent() with interval 300.
For each position i do: Tile(position):getBottomCreature() -- if it finds target it will deal damage to it.
I also add Condition HASTE on monster for the charing duration -- total duration is SUM of addEvent intervals
Any clue why 8+ tiles cause timeout?