SRL Archive - Help

Procedure Incompletion


Deadly Serious

2012-01-03 23:39:19

Whenever I run it, it just clicks the alter twice and doesn't empty the pouches.





Procedure Crafting;
Var
x,y: integer;
begin
if not loggedin then exit;
FindNormalRandoms;
Antiban;
DidRedClick;

begin
If FindObjCustom(x, y, ['Craft', 'Rune'], [8617345, 8354173], 3) then
begin
Writeln('Crafted Astrals')
Getmousepos(x, y)

Case random(11) of
0..8: mouse(x,y, 5, 5, True);
9..10: begin;
Mouse(x, y, 5, 5, False)
Waitoption('raft', 3000);
Wait(3500+Random(1000));
end;
end;
end;
end;
end;

Procedure crafting2; // Having trouble with it recognizing/ completing the pouches procedure.

Var
LargeDTM, MedDTM, x,y: integer;


begin //pouches
MedDTM := DTMFromString('mwQAAAHic42RgYHBkYmDwBGIHILYCYksodgFib6jcc6C6W0B8HYhvA/EzIH4LxB+h9FMgDvK2B5JMBDBhwEgEhgMAV8sLaA==');
if FindDTM(MedDTM,x, y, 1, 1, 200, 200) then
Mouse(x, y, 5, 5, False);
Waitoption('empty', 2000);
begin
LargeDTM := DTMFromString('mwQAAAHic42RgYMhmYmDIA+JSIM4B4gQgTgHiZCBOAuJyIH4BVHcLiJ8B8ScgfgnEt4H4CRB/AOL3QOztagUkmQhgwoCRCAwHAFSIDNo=');
if FindDTM(LargeDTM,x, y, 1, 1, 200, 200) then
Mouse(x, y, 5, 5, False); //pouches
Waitoption('empty', 3000);
begin
If FindObjCustom(x, y, ['Craft', 'Rune'], [8617345, 8354173], 3) then
begin
Writeln('Crafted Astrals');
Getmousepos(x, y);
Case random(11) of
0..8: mouse(x,y, 5, 5, True);
9..10: begin
Mouse(x, y, 5, 5, False);
Waitoption('raft', 3000);
end;
end;
FreeDTM(MedDTM);
FreeDTM(LargeDTM);

end;
end;
end;
end;






begin
SetupSRL;
Declareplayers;
ObjSetup;
Crafting;
Crafting2;
end.

wantonman

2012-01-04 00:48:36

im not sure y… did you know runescape updates there colors slightly each log in??? you should be sure the color arrays are all loaded before asking questions….

if u dont have it already… ACA is a good tool

http://villavu.com/forum/showthread.php?t=26944













as far as you code goes it looks complete, well im not sure as im a novice but i think maybe it would be good not to over stretch…



Procedure crafting2; // Having trouble with it recognizing/ completing this procedure.

Var
x,y: integer;


begin
If FindObjCustom(x, y, ['fill'], [3884878], 5) then
begin
Mouse(x, y, 5, 5, False);
Waitoption('empty', 2000);
end;
If FindObjCustom(x, y, ['fill'], [2502194], 5) then
begin
Mouse(x, y, 5, 5, False);
Waitoption('empty', 3000);
end;
If FindObjCustom(x, y, ['Craft', 'Rune'], [8354173], 6) then
begin
Writeln('Crafted Astrals')
Getmousepos(x, y)
Case random(11) of
0..8: mouse(x,y, 5, 5, True);
9..10: begin;
Mouse(x, y, 5, 5, False)
Waitoption('raft', 3000);

end;
end;
end;
end;




maybe by ending your chunks before going overboard may help a bit as understanding?

Deadly Serious

2012-01-04 01:25:45

I took your advice and I took your code but it still wasn't functional. I changed the findcustomobj to DTM but it still doesn't find the pouches.

Justin

2012-01-04 02:38:46

When you made your DTM's did you add a colour tolerance to the first point?

Deadly Serious

2012-01-04 15:47:31

I've fixed it :D