![Smile :)](./images/smilies/icon_e_smile.gif)
can i make the char to walk backwards between 2 waypoints?
if yes, how?
can i implement this into player:moveto()?
thanks!
Code: Select all
keyboardHold( settings.hotkeys.MOVE_BACKWARD.key);
yrest(3000);
keyboardRelease( settings.hotkeys.MOVE_BACKWARD.key)
That's what I did to solve my gate healing issue. You want the healer to be standing at max range so mages and 'through-wall' skills can't hit you.lisa wrote:If it is purely between 2 locations and no others and you know there won't any other variables to affect it then you could just walk backwards a set amount of time. You would need to make sure to face the direction you want first and then do it and the time to walk backwards would require testing to get it right.Code: Select all
keyboardHold( settings.hotkeys.MOVE_BACKWARD.key); yrest(3000); keyboardRelease( settings.hotkeys.MOVE_BACKWARD.key)
Code: Select all
repeat
keyboardPress(settings.hotkeys.MOVE_BACKWARD.key)
player:update()
until distance(player, gateTarget) > 250
Code: Select all
keyboardHold( settings.hotkeys.MOVE_BACKWARD.key);
repeat
player:updateXYZ()
yrest(1)
until distance(player, gateTarget) > 250
keyboardRelease( settings.hotkeys.MOVE_BACKWARD.key)
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<!-- # 1 --><waypoint x="-30482" z="1229" y="-478"> </waypoint>
<!-- # 2 --><waypoint x="-30656" z="1267" y="-471"> </waypoint>
<!-- # 3 --><waypoint x="-30697" z="1394" y="-452"> </waypoint>
<!-- # 4 --><waypoint x="-30605" z="1504" y="-445"> </waypoint>
<!-- # 5 --><waypoint x="-30492" z="1480" y="-446"> </waypoint>
<!-- # 6 --><waypoint x="-30402" z="1387" y="-455"> </waypoint>
<!-- # 7 --><waypoint x="-30399" z="1233" y="-475"> </waypoint>
</waypoints>
Code: Select all
<?xml version="1.0" encoding="utf-8"?><waypoints>
<onLoad>
changeProfileOption("TARGET_LEVELDIF_BELOW", 10)
changeProfileOption("TARGET_LEVELDIF_ABOVE", 1)
teleport_SetStepPause(100)
waypointnumber = 7
index = waypointnumber
function gotonextWP(index)
if index == 0 then
teleport(-30482,1229,-478)
lookatTarget(-30399,1233,-475)
end
if index == 1 then
teleport(-30656,1267,-471)
lookatTarget(-30482,1229,-478)
end
if index == 2 then
teleport(-30697,1394,-452)
lookatTarget(-30656,1267,-471)
end
if index == 3 then
teleport(-30605,1504,-445)
lookatTarget(-30697,1394,-452)
end
if index == 4 then
teleport(-30492,1480,-446)
lookatTarget(-30605,1504,-445)
end
if index == 5 then
teleport(-30402,1387,-455)
lookatTarget(-30492,1480,-446)
end
if index == 6 then
teleport(-30399,1233,-475)
lookatTarget(-30402,1387,-455)
end
end
function lookatTarget(X,Z,Y)
local angle = math.atan2(Z - player.Z, X - player.X);
local yangle = math.atan2(Y - player.Y, ((X - player.X)^2 + (Z - player.Z)^2)^.5 );
player:faceDirection(angle, yangle);
camera:setRotation(angle);
end
function getaway()
printf(math.fmod(index,waypointnumber))
gotonextWP(math.fmod(index,waypointnumber))
index = index+1
end
-- do this indefinitely
while (true) do
if CountMobs(1, 120) then
RoMScript("KillSequence()") -- this also takes care of the targetting of the boss so it won't target adds
getaway()
yrest(100)
end
end
</onLoad>
</waypoints>
Users browsing this forum: Google [Bot] and 1 guest