Hello Scripuo Community,
do you know the Problem?
you want to walk in a specific amount of Tiles and must look at Charposition calulcate tiles or give a static Position?
Why cant this be a variable?
Today i want to show you a small Solution:
--########################################
--@Name MoveTiles
--@Author Crome696
--@Purpose Move in looking direction or reversed direction
--@ReleaseDate 08\01\11
--@Version 1.0
--@TestedClient 7.0.16.1
--@TestShard Osi\Osiclone
--########################################
function MoveTiles(tmpTiles,tmprev,tolerance,timeout)
dir = UO.CharDir + 1
rev = {5,6,7,8,1,2,3,4}
if(tmprev==true)then tmpdir = rev[dir] else tmpdir = dir end
mpath = {}
mpath[1] = {(UO.CharPosX ),(UO.CharPosY - tmpTiles)}
mpath[2] = {(UO.CharPosX + tmpTiles),(UO.CharPosY - tmpTiles)}
mpath[3] = {(UO.CharPosX + tmpTiles),(UO.CharPosY)}
mpath[4] = {(UO.CharPosX + tmpTiles),(UO.CharPosY + tmpTiles)}
mpath[5] = {(UO.CharPosX ),(UO.CharPosY + tmpTiles)}
mpath[6] = {(UO.CharPosX - tmpTiles),(UO.CharPosY + tmpTiles)}
mpath[7] = {(UO.CharPosX - tmpTiles),(UO.CharPosY - tmpTiles)}
mpath[8] = {(UO.CharPosX - tmpTiles),(UO.CharPosY - tmpTiles)}
UO.Move(mpath[tmpdir][1],mpath[tmpdir][2],tolerance,timeout)
end
This function will move your Char in specific Tiles forward or reversed.

[/URL]
Example:
MoveTiles(1,false,0,0)
You are Looking in Chardirection "0" then it will move 1 Tile in direction 0 without a timeout and 0 tiles tolerance
MoveTiles(1,true,0,0)
Now reversing is enabled so it will move 1 tile in Chardirection 4 (Opposite of 0, view Picture)
if you set tolerance > 1 it will be done with moving if Char is within the tolerance range to wanted Tile Range.
If you set timeout >1 Moving is finished when it reached time > timeout seconds.
Usage:
In some of my Scripts i need to runaway from target. Like you need to heal or lure Monsters away. So you can use this function to move away.
Other Usage is maybe in Tilebased Skilling Scripts. you now dont need to look on your Charposition and calculate 8 tiles just use:
MoveTiles(8,true,0,0)
Hope it will be Useful for you guys,too.
Kind regards
Crome