target mob and use item with casttime
Posted: Wed Jul 08, 2015 11:53 am
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.
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.
Code: Select all
__WPL:setForcedWaypointType("TRAVEL");
player:cast("ROGUE_HIDE")
repeat
local mob = player:target_Object(108232);
until mob
inventory:useItem(201558);
yrest(5000);
__WPL:setForcedWaypointType();
player:rest(5);
inventory:update();
if(inventory:itemTotalCount(201558) > 1) then
__WPL:setWaypointIndex(__WPL:findWaypointTag("a"));
else
__WPL:setWaypointIndex(__WPL:findWaypointTag("b"));
end