I'm getting really frustrated here, I want to traget a mob, use an an item on it which have a casttime and then I want to fight.
This is last version of many different I tried, but every time I attack the mob or dont move to it.
It would be great if someone could help me.
__WPL:setForcedWaypointType("TRAVEL");
player:cast("ROGUE_HIDE")
repeat
local mob = player:target_Object(108232);
until mob
inventory:useItem(201558);
repeat
yrest (1000) --or maybe player:rest(1)
player:update()
until not player.Casting
__WPL:setForcedWaypointType();
inventory:update();
if(inventory:itemTotalCount(201558) > 1) then
__WPL:setWaypointIndex(__WPL:findWaypointTag("a"));
else
__WPL:setWaypointIndex(__WPL:findWaypointTag("b"));
end
Note: player:target_Object will attack the mob. To target something without attacking it you have to use player:target(address). This means you have to find it first then target it, eg.