Boreas
2006-12-08 15:03:42
Here's what I'm trying to do:
(manually) Login to RS, open up a bank, open a scar, drag crosshairs to rs, and open dtm editor (rs can now timeout, its not needed)
Then open another scar with the following script and drag crosshairs to picture in dtm editor of first scar. Then run the script.
The script should then (as it is configured now):
STEP 1: Look at the second bank slot, reading the pixels left to right and top to bottom like a book (besides where the numbers are), and when the color is 65536, it clicks that pixel.
STEP 2: Then save the dtm as b4iron4, and do dtmtotext and new.
Then repeat these steps for b4coal in the first bankslot.
Step 2 is fine, but in step 1 its clicking colors besides 65536. I added a wait an it got a little better, but it has to be only 65536. This is what I am having trouble with. The only thing I can think of is that color gets distorted from one scar to the next, I am hoping this is not the case because there's nothing I can do about it. Any ideas?
(If you look at the script and see clickmouse and no srl and no randomness and post about it, you are an idiot for not reading the post to see that it isn't needed.)
How can I make it only click 65536?
EDIT: I guess I could make it look at the scroll thing on the right and check the text and delete, but that would probably cause even more problems, so I just want it to click only 65536 the first time.
(manually) Login to RS, open up a bank, open a scar, drag crosshairs to rs, and open dtm editor (rs can now timeout, its not needed)
Then open another scar with the following script and drag crosshairs to picture in dtm editor of first scar. Then run the script.
The script should then (as it is configured now):
STEP 1: Look at the second bank slot, reading the pixels left to right and top to bottom like a book (besides where the numbers are), and when the color is 65536, it clicks that pixel.
STEP 2: Then save the dtm as b4iron4, and do dtmtotext and new.
Then repeat these steps for b4coal in the first bankslot.
Step 2 is fine, but in step 1 its clicking colors besides 65536. I added a wait an it got a little better, but it has to be only 65536. This is what I am having trouble with. The only thing I can think of is that color gets distorted from one scar to the next, I am hoping this is not the case because there's nothing I can do about it. Any ideas?
(If you look at the script and see clickmouse and no srl and no randomness and post about it, you are an idiot for not reading the post to see that it isn't needed.)
program B4DTMMaker;
const howmanyitem=2; // how many items
var
ItemName:array [0..(howmanyitem-1)]of string;
ItemPos:array [0..(howmanyitem-1)]of integer;
procedure DeclareItems;
begin
ItemName[0]:='iron4';
ItemPos[0]:=2;
ItemName[1]:='coal4';
ItemPos[1]:=1;
end;
type
BSlot = record
row,column,
x1,x2,y1,y2,
ItemNumber,ItemAmount:integer;
ItemName:string;
end;
var
BankSlot: array [1..48] of BSlot;
procedure LoadBankSlotArray;
var i:integer;
begin
for i:= 1 to 48 do
begin
BankSlot[i].row:=((i-1)/8)+1;
BankSlot[i].column:=((i+7)mod 8)+1;
BankSlot[i].x1:=79+((Bankslot[i].column-1)*47);
Bankslot[i].y1:=62+((Bankslot[i].row-1)*38);
BankSlot[i].x2:=Bankslot[i].x1+31;
BankSlot[i].y2:=Bankslot[i].y1+31;
Bankslot[i].y1:= Bankslot[i].y1+10;
end;
end;
procedure makedtm(pos:integer);
var x,y:integer;
begin
y:= BankSlot[pos].y1;
repeat
x:= BankSlot[pos].x1;
repeat
if (getcolor(x,y)=65536) then
begin
movemouse(x,y);
wait(200);
//if (getcolor(21,-42)=65536) then
if (getcolor(x,y)=65536) then
clickmouse(x,y,true);
end;
x:=x+1;
until (x=(BankSlot[pos].x2+1));
y:=y+1;
until (y=(BankSlot[pos].y2+1));
end;
procedure savedtm(name:string);
begin
clickmouse(7,-85,true); //file
wait(500);
clickmouse(23,-31 ,true);//save
wait(500);
Sendkeys('b4'+name+ chr(13));//filename
wait(500);
clickmouse(7,-85,true);//file
wait(500);
clickmouse(34, -12,true);//dtmtotext
wait(500);
clickmouse(7,-85,true);//file
wait(500);
clickmouse(12, -63,true);//new
wait(500);
end;
var i:integer;
begin
declareitems;
LoadBankSlotArray;
repeat
makedtm(itempos[i]);
savedtm(ItemName[i]);
i:=i+1;
until (i=(howmanyitem));
end.How can I make it only click 65536?
EDIT: I guess I could make it look at the scroll thing on the right and check the text and delete, but that would probably cause even more problems, so I just want it to click only 65536 the first time.