SRL Archive - OSR Help

It alches the seed?!


bas

2012-04-29 14:33:02

Hello!
I working on my DungFarmer.
I have a question.

It cleans herbs correcly,
Then alch them
Repeat until no herbs found
But then!
It need clicks the high alch for the last time and then it see it dont have any herbs left, so it click the seed to use on farm.
But instead of clicking the seed and put in patch, it alch the seed!

How can i make it so it will click the seed correcly instead of alching it??

Procedure:


Procedure HighAlchItem;
Begin
HighAlchDTM := DTMFromString('mggAAAHicY2NgYHBmYmDwBGJ/IA4C4lAoO4ERguOAOBGIo6H0xV0SYPzqdghDfzkrQ+Kp7wzrpvAysALNwoYZcWAIAABJeA4k');
GameTab(Tab_Magic);
wait(randomrange(400,500));
if FindDTM(HighAlchDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
Begin
GameTab(Tab_Magic);
wait(randomrange(100,150));

MMouse(X, Y + 3, 0, 0);
If WaitUptextMulti(['High', 'Alchemy'], 500) Then
Begin

Writeln ('Found High Alch spell')
ClickMouse2(true);

wait(randomrange(150,200));



end;
end;
end;

The seed procedure:

Procedure ClickMagebane;
Begin
MagebaneDTM := DTMFromString('mQwAAAHicY2ZgYHBnZmBwBmIXII5gZGCIBOJQIC7LqmLorZvE0FXdz8AKVAfDjEgYCAD+RgaB');
GameTab(Tab_Inv);
if FindDTM(MagebaneDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
Begin
wait(randomrange(500,600));
MMouse(X, Y + 3, 0, 0);
wait(randomrange(350,400));
ClickMouse2(true);
Writeln ('Found seed, Time to farm!')

wait(randomrange(300, 350));

FreeDTM(MagebaneDTM);
end;
end;

Loop:


repeat
HighAlchItem;
wait(randomrange(400,500));
AlchingTheHerbs;
GameTab(Tab_Inv);

until (not FindDTM(CleanHerbDTM, x, y, MIX1, MIY1, MIX2, MIY2));
FreeDTM(HighAlchDTM);
FreeDTM(CleanHerbDTM);
AntiBan;
GameTab(Tab_Inv);

Joe

2012-04-29 14:34:29

You don't have your seeds stuff in here

bas

2012-04-29 14:35:45

From: JOEbot
You don't have your seeds stuff in here


What do you mean?
EDIT: added seed procedure

Jokester

2012-04-29 14:39:36

You could have it right click the seed and find the 'use' then continue using that.

Joe

2012-04-29 14:41:18

Procedure HighAlchItem;
Begin
HighAlchDTM := DTMFromString('mggAAAHicY2NgYHBmYmDwBGJ/IA4C4lAoO4ERguOAOBGIo6H0xV0SYPzqdghDfzkrQ+Kp7wzrpvAysALNwoYZcWAIAABJeA4k');
GameTab(Tab_Magic);
wait(randomrange(400,500));
if FindDTM(HighAlchDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
Begin
GameTab(Tab_Magic);
wait(randomrange(100,150));

MMouse(X, Y + 3, 0, 0);
If WaitUptextMulti(['High', 'Alchemy'], 500) Then
Begin

Writeln ('Found High Alch spell')
ClickMouse2(true);

wait(randomrange(150,200));



end;
end;
Gametab(Tab_inv); // This will cancel the alchemy spell if its still clicked on
end;

bas

2012-04-29 14:41:29

From: Jokester
You could have it right click the seed and find the 'use' then continue using that.


Great! i forget about that.
Thanks, will try

Edit:

I tried:

Wait(RandomRange(200,300));
ChooseOptionMulti(['Use']);

It dont seems to work. Am i using the correct Option??

bas

2012-04-29 14:49:17

From: JOEbot
Procedure HighAlchItem;
Begin
HighAlchDTM := DTMFromString('mggAAAHicY2NgYHBmYmDwBGJ/IA4C4lAoO4ERguOAOBGIo6H0xV0SYPzqdghDfzkrQ+Kp7wzrpvAysALNwoYZcWAIAABJeA4k');
GameTab(Tab_Magic);
wait(randomrange(400,500));
if FindDTM(HighAlchDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
Begin
GameTab(Tab_Magic);
wait(randomrange(100,150));

MMouse(X, Y + 3, 0, 0);
If WaitUptextMulti(['High', 'Alchemy'], 500) Then
Begin

Writeln ('Found High Alch spell')
ClickMouse2(true);

wait(randomrange(150,200));



end;
end;
Gametab(Tab_inv); // This will cancel the alchemy spell if its still clicked on
end;


Ok thanks, will try that since the right click mutli "Use" wont work for me. Guess i did it wrong :P

Edit: Dont work, still alches. guess i gotta use the right click.
Was i right on that how to use correcly?? (other post)

Fixed :)

J J

2012-04-29 15:28:29

WaitOptionMulti(['se ', 'Use'], 250);
Waits a maximum of 250 ms for the option Use to appear.

Basicly merges the Wait and ChooseOption.

You can make sure that it chooses the option, and otherwise you can use a failsafe.
begin
WriteLn('We are trying to choose the option "Use"');
if WaitOptionMulti(['se ', 'Use'], 250) then
begin
*blablabla*
end else
begin
*failsafehere*
end;
end;

Jokester

2012-04-29 15:33:01

Make sure nothing else has "se" in it when you right click or it will most likely screw up.