bl3d3
04-21-2020, 06:40 PM
Hi, I've been trying to make a simple script on one of the pservers, but it wouldn't click on object. I made couple scripts on other pserver and was using TMSObjects functions to find and click on the object i need. Everything would work fine, finds an object, checks if the uptext is correct and then would click it. Now when I've tried to make a similar script on other server, using same functions. It finds the color, moves the mouse to the object, but would not click it and keeps on looking for the object, because the uptext didnt match I guess? I made a procedure to check if it can find a tree, but it does not.
program new;
{$i AeroLib/AeroLib.Simba}
var
YewTree: TMSObject;
Procedure FindTree;
var
pnt:tpoint;
begin
if (not YewTree.Find(10, MSCP, pnt)) then
wait(500);
writeln('cannot find tree');
exit;
if YewTree.Find(10, MSCP, pnt) then
writeln('tree found');
FastClick(mouse_left);
end;
begin
initAL;
YewTree.create('Yew', ['down Yew', 'Chop down Yew'], [createCol(5542796, 15, 0.20, 1.40)]);
FindTree;
end;
I checked the uptext color and its the same as other pserver. I checked client size on both servers when selecting client and when I try to select it, it selects the whole client with the whole top bar. So maybe thats why it cannot find the uptext?
28693
program new;
{$i AeroLib/AeroLib.Simba}
var
YewTree: TMSObject;
Procedure FindTree;
var
pnt:tpoint;
begin
if (not YewTree.Find(10, MSCP, pnt)) then
wait(500);
writeln('cannot find tree');
exit;
if YewTree.Find(10, MSCP, pnt) then
writeln('tree found');
FastClick(mouse_left);
end;
begin
initAL;
YewTree.create('Yew', ['down Yew', 'Chop down Yew'], [createCol(5542796, 15, 0.20, 1.40)]);
FindTree;
end;
I checked the uptext color and its the same as other pserver. I checked client size on both servers when selecting client and when I try to select it, it selects the whole client with the whole top bar. So maybe thats why it cannot find the uptext?
28693