ok, now i'm trying to work out bitmaps, this is what i'm trying to do…
i want to click the mouse at the location that i already requested, and when the mouse flag goes away, it will click again. my script so far, that i hoped for this to work…
program silkbuyer;
///////////////////////////////////////////////////////////////////////////
///this will buy silk and bank them, improvements can be PMed to me on
///villavu.com/forums made by: ub3r l<1ll3r
///////////////////////////////////////////////////////////////////////////
///in al-kharid bank, go to the most northern bankbooth that is available
///put your money in first bank slot
///Put nothing in the last slot
{.Include SRL\SRL.scar}
{version info:
V1:very unstable[unreleased]
V1.9:a lot more stable with double clicking[unreleased]
V1.95: tested and being released}
var
flagg:integer;
N:string;
///////////////SETUP////////////////////////////
Const
bankcolors = 6745329;/// bank symbol color
silkcolors = 9448626;///silk color symbol
man = 12491685;/// color of the seller's pants
cabab = 11392491;///color of the cabab symbol at the bank
sword = 1786975;///sword shop's ladder
////////Thats all folks!////////////////////////////
procedure Setup;
Begin
flagg := BitmapFromString(33, 33, 'z78DAEDD4B10980300044D195' +
'1262B28092FD47522B41440BAB83F726B8DFDC9C00642987BEB55' +
'66BEEFEE48A6B7F66C57D7F5AC5F3FE9C8AB7FD0915DFFBF33FEA' +
'B48E3ECAA242850A152A540000FCB7035B5DE8B2');
end;
procedure movesilk;
begin
Face(N)
wait(1000)
if (findcolortolerance(x,y,cabab,628,19,703,53,3)) then
Mouse(x,y,1,1,True)
repeat
wait(2000)
until(FindbitmaptoleranceIn(flagg,x,y,578,9,723,146,9)=False)
Face(N)
if (findcolortolerance (x,y,sword,659,19,702,35,3)) then
Mouse(x,y,1,1,true)else
repeat
wait(2000)
until(FindbitmaptoleranceIn(flagg,x,y,578,9,723,146,9)=False)
if (findcolortolerance(x,y,silkcolors,597,26,709,118,8)) then
Mouse(x,y,1,1,True)else
repeat
wait(2000)
until(FindbitmaptoleranceIn(flagg,x,y,578,9,723,146,9)=False)
end;
procedure buy;
begin
repeat
if (findcolortolerance(x,y,man,4,4,514,337,8)) then
Mouse(x,y,0,0,True)
Mouse(x,y,0,0,True)
wait(3000)
MMouse(224,444,1,0)
wait(800)
Mouse(224,444,1,0,True)
Mouse(224,444,1,0,True)
wait(1000)
MMouse(270,395,1,0)
wait(800)
Mouse(270,395,1,0,True)
Mouse(270,395,1,0,True)
wait(1000)
MMouse(203,448,1,0)
wait(800)
Mouse(203,448,1,0,True)
Mouse(203,448,1,0,True)
wait(1000)
MMouse(280,446,1,0)
Mouse(280,446,1,0,True)
Mouse(280,446,1,0,True)
wait(2000)
MMouse(238,432,1,0)
Mouse(238,432,1,0,True)
Mouse(238,432,1,0,True)
wait(1000)
MMouse(217,445,1,0)
Mouse(217,445,1,0,True)
wait(1000)
MMouse(290,447,1,0)
Mouse(290,447,1,0,True)
Mouse(290,447,1,0,True)
wait(2000)
Until(findcolortolerance(x,y,8625060,703,434,724,454,8))
end;
procedure goback;
begin
Face(N)
wait(1000)
if (findcolortolerance(x,y,sword,594,114,616,139,3)) then
repeat
wait(2000)
until(FindbitmaptoleranceIn(flagg,x,y,578,9,723,146,9)=False)
if (findcolortolerance (x,y,cabab,578,96,611,135,3)) then
repeat
wait(2000)
until(FindbitmaptoleranceIn(flagg,x,y,578,9,723,146,9)=False)
if (findcolortolerance(x,y,bankcolors,609,116,653,148,3)) then
repeat
wait(2000)
until(FindbitmaptoleranceIn(flagg,x,y,578,9,723,146,9)=False)
if (findcolortolerance(x,y,bankcolors,602,57,656,115,8)) then
Mouse(x,y,1,1,True)
repeat
wait(2000)
until(FindbitmaptoleranceIn(flagg,x,y,578,9,723,146,9)=False)
OpenBank;
wait(3000)
Deposit(5,6,2)
wait(5000)
end;
Begin
SetupSRL;
Setup;
repeat
movesilk;
buy;
goback;
Until(false)
End.