thanks!
the problem is, that it should walk backwards to a set coordinate and kite a boss in a circle, while it should spam a dps macro. so when the boss gets into a range of 120, it should go backwards to the next waypoint coordinates.
basically:
1. have a waypoint file with some waypoints, or a table with coordinates, for example:
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>
2. if the aggroed boss comes closer than 120, move to next waypoint (with a greater than normal speed)
3. while keep spaming the dps macro (made with diyce, but that is besides the point i think.
i tried teleporting, but it was too erratic, and the char died from server error. basically the bot should kite the boss in a circle (set in the waypoint), untill it kills it.
i hope it is clearer now, and i hope somebody smarter than me can help. this is how it looks so far, but it is very alpha and nubish yet. and it doesn't work with teleport.
help
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>