Needed something to use item on item, this could be used for item on object too. Takes two tPoints and selects it if mouseOverText is "Use" and if not it'll right click use and use it on tPoint #2 . Found it useful for bones on altar. Should work.
This can shorten length of code needed and it's simple but yet quite powerful.
About the 10th edit on this (improving it as I was testing, should of tested before posting but oh well)
Simba Code:
function tMouse.ActionOnAction(funcPoint, funcPoint2: TPoint; funcRange, funcTime: integer): boolean;
var
funcTimeout: tCountDown;
funcTooltip: string;
begin
moveMouse(funcPoint.x, funcPoint.y);
funcTimeout.setTime(random(1000, 1500));
repeat
funcTooltip:=mouse.getTooltip()
until (funcTooltip <> '') or (funcTimeout.isFinished());
if (funcTooltip = 'Use') then
clickMouse(normalRandom(funcPoint.x, funcPoint.y), normalRandom(funcPoint.x+funcRange, funcPoint.y+funcRange), 1)
else
begin
mouse.rightClickOption(funcPoint, 'Use');
end;
wait(funcTime);
clickMouse(normalRandom(funcPoint2.x, funcPoint2.y), normalRandom(funcPoint2.x+funcRange, funcPoint2.y+funcRange), 1);
result:=true;
end;
usage :
Simba Code:
mouse.ActionOnAction(point(x, y), point(x, y), range, funcTime);
example :
Simba Code:
procedure example;
var
point1, point2: TPoint;
begin
point1:=ogl.getModels(3432408932)[0].toPoint();
point2:=ogl.getModels(2868382833)[0].toPoint();
mouse.ActionOnAction(point1, point2, 5, random(750, 1000));
end;
example 2 :
Simba Code:
procedure example;
var
point1, point2: TPoint;
begin
point1:=Inventory.getItem(119085).toPoint();
point1:=ogl.getModels(423423)[0].toPoint();
mouse.ActionOnAction(point1, point2, 7, 300);
end;