SRL Archive - OSR Help

Withdraw all method doesn't work?


Syntax

2012-06-09 05:16:31

I thought I'd try to do it myself without using srl includes in simba. I thought this would work but it doesn't for some reason(detects ore).

Program Withdraw all;
{.include SRL\SRL.simba}

Var Pureessence, X, Y: integer;


begin
SetupSRL;
Pureessence := DTMFromString('m6wAAAHic42ZgYOBjQAABIGYGYnYoWxKIpYFYBsrmB2JBIOaCqpeEyskCsQQQiwAxDxCzAXFBdjaQZCISEw8YScBIAADEIgLM');
If findDTM(Pureessence, X, Y, MSX1, MSY1, MSX2, MSY2) then
Begin
Writeln('Found Pure Essence');
MMouse(x, y, 7, 7);
If IsUpText('ess') Then
Mouse(x, y, 0, 0, False);
WaitOption('with all', 500);


end;
FreeDTM(Pureessence);
end.

riwu

2012-06-09 06:20:13

u mean it detects ore instead of pure ess? that means ur DTM is poorly made. Set more sub points around the edge (black outline) of the essence to make it more accurate.
Also u forget a begin and end, and always use waituptext!
Edited with correct standards:
Program Withdrawall;   // no space for title!
{.include SRL\SRL.simba}

Var
PureEssence, X, Y: integer; //for global vars, always use camel cap


begin
SetupSRL;
PureEssence := DTMFromString('m6wAAAHic42ZgYOBjQAABIGYGYnYoWxKIpYFYBsrmB2JBIOaCqpeEyskCsQQQiwAxDxCzAXFBdjaQZCISEw8YScBIAADEIgLM');
If findDTM(PureEssence, X, Y, MSX1, MSY1, MSX2, MSY2) then
begin //for key words (which simba will bold them) always use lowercase
Writeln('Found Pure Essence');
MMouse(x, y, 7, 7);
If WaitUpText('ess',1000) Then
begin
Mouse(x, y, 0, 0, False);
WaitOption('with all', 500); //with all??? it doesnt detect part by part,
end; //try something like "draw All" (forget the actual text, and its case sensitive)
end;
FreeDTM(Pureessence);
end.

Syntax

2012-06-09 06:23:03

From: riwu
u mean it detects ore instead of pure ess? that means ur DTM is poorly made. Set more sub points around the edge (black outline) of the essence to make it more accurate.
Also u forget a begin and end, and always use waituptext!
Edited with correct standards:
Program Withdrawall;   // no space for title!
{.include SRL\SRL.simba}

Var
PureEssence, X, Y: integer; //for global vars, always use camel cap


begin
SetupSRL;
PureEssence := DTMFromString('m6wAAAHic42ZgYOBjQAABIGYGYnYoWxKIpYFYBsrmB2JBIOaCqpeEyskCsQQQiwAxDxCzAXFBdjaQZCISEw8YScBIAADEIgLM');
If findDTM(PureEssence, X, Y, MSX1, MSY1, MSX2, MSY2) then
begin //for key words (which simba will bold them) always use lowercase
Writeln('Found Pure Essence');
MMouse(x, y, 7, 7);
If WaitUpText('ess',1000) Then
begin
Mouse(x, y, 0, 0, False);
WaitOption('with all', 500); //with all??? it doesnt detect part by part,
end; //try something like "draw All" (forget the actual text, and its case sensitive)
end;
FreeDTM(Pureessence);
end.


I tried changing some of the things around before you suggested but i haven't got it to work yet.. Really annoying.

Heres a video of it happening:
http://www.youtube.com/watch?v=MtJq9hkyegU&feature=youtu.be

Syntax

2012-06-09 07:01:27

I need it to be like this so it only withdraws essence.

riwu

2012-06-09 07:06:05

Yeah from the vid the only problem lies with ur UpText, change it to "All".
For strings u always have to be extremely specified, the exact part of a text with correct case must be entered.

weeps

2012-06-09 07:06:10

Shouldnt

WaitOption('with all', 500);

be

WaitOption('all', 500); ?

Syntax

2012-06-09 07:24:15

From: weeps
Shouldnt

WaitOption('with all', 500);

be

WaitOption('all', 500); ?


It will try to select: Withdraw-all
Withdraw-all but one
Withdraw-x
i tried every different variable i could think of to be specific on which one but it doesn't work.

riwu

2012-06-09 07:28:31

From: Blakebn2011
It will try to select: Withdraw-all
Withdraw-all but one
Withdraw-x
i tried every different variable i could think of to be specific on which one but it doesn't work.

So which one do u want it to use?
"All but" will always perform the all but one option,
"All Pure" will always perform the all option,
"-X" will always perform the withdraw x option.

strings are case sensitive, make sure u CAPS when necessary.

Syntax

2012-06-09 07:35:09

From: riwu
So which one do u want it to use?
"All but" will always perform the all but one option,
"All Pure" will always perform the all option,
"-X" will always perform the withdraw x option.

strings are case sensitive, make sure u CAPS when necessary.


Problem is I've done this, but it just stalls on the right click?
Thanks for the help though.

riwu

2012-06-09 07:48:36

WaitOption('All', 1500);
This doesn't work?

Syntax

2012-06-09 07:50:22

From: riwu
WaitOption('All', 1500);
This doesn't work?


Nope try yourself and see.

CephaXz

2012-06-09 07:54:48

You're playing private server?

riwu

2012-06-09 07:57:34

From: Blakebn2011
Nope try yourself and see.

Works perfectly for me?
try run this with bank opened:
program new;
{$i SRL/srl.simba}
begin
SetupSRL;
MouseBankSlot(1,mouse_Right);
WaitOption('All',1500);
end.

Syntax

2012-06-09 07:57:38

From: CephaXz
You're playing private server?


Definitely playing the real Runescape..

CephaXz

2012-06-09 08:04:09

As what riwu said. I personally don't like using so much DTM in a script, uses up a lot of resources. Instead, I used mousebankslot in my cosmic crafter script too. And don't use uptext, I had problem with withdrawing pure essence too last time when I created my essence withdrawing procedure.

Syntax

2012-06-09 08:21:02

From: CephaXz
As what riwu said. I personally don't like using so much DTM in a script, uses up a lot of resources. Instead, I used mousebankslot in my cosmic crafter script too. And don't use uptext, I had problem with withdrawing pure essence too last time when I created my essence withdrawing procedure.


I don't stop till I find the solution or a good reason why its impossible.

riwu

2012-06-09 08:53:03

From: Blakebn2011
I don't stop till I find the solution or a good reason why its impossible.

No one says its impossible; its just potentially unreliable. Have u not seen how jagex sometimes distort the essence boundaries? (making it look like a 8/10 full moon)–which will in turn break ur DTM as well.

You can try using bitmap though (with tolerance etc), iirc Flight uses bitmap to withdraw ess for his zmi script.

Gucci

2012-06-09 11:01:06

Well if you can't get it to work there is a SRL function: Withdraw(Row, Column, Amount);
Withdraw(0, 0, 0); this will click withdraw all on the very first item of that tab

Syntax

2012-06-09 11:15:55

Any suggestions why it ain't working :(

CephaXz

2012-06-09 11:54:12

I tried your DTM, it isn't even working. Its using no tolerance, so if the screen refreshes, you can no longer find your essence with the DTM. That's the downside of using DTM for withdrawing pure essence. Because it might also be looking for others runes that are in your bank even if the DTM has A LOT of points.

Uptext is not reliable all the time because sometimes the background color are mixed with the text, and made the item can't be found, and some text colors isn't working very well, that includes the orange color text of an item. Instead of MSX1 that stands for Main Screen, you can use MBX1 that stands for Main Bank.

I remade the DTM, removed the uptext. Now it works 100% for me. For waitoption, do WaitOption('ll', 2000);. But the best bet is not to use DTM, and use bank slot withdrawing function that works even more efficiently.

Just in case you want to see the code I used.

Program Withdrawall; // no space for title!
{$i srl/srl/misc/smart.simba}
{.include SRL\SRL.simba}

Var
PureEssence, X, Y: integer; //for global vars, always use camel cap


begin
Smart_Members := True;
Smart_Server := 10;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
PureEssence := DTMFromString('mAAEAAHiclck9CoNQFETh0Trg7iys4h+a8AQVRVNkT4GQQgzaRNyWp7AQooUD33Avc5HU4YMvRgzr/8IbPWZM+CFDigQGFQrc0eKx3iUC3OJIhTF6No3qPFcSBvJcV7F/ZbX/OPSRvVgnbbMAlWgXDw==');
If findDTM(PureEssence, X, Y, MSX1, MSY1, MSX2, MSY2) then
begin //for key words (which simba will bold them) always use lowercase
Writeln('Found Pure Essence');
Mouse(x, y, 7, 7, mouse_Right);
WaitOption('ll', 2500); //with all??? it doesnt detect part by part, //try something like "draw All" (forget the actual text, and its case sensitive)
end;
FreeDTM(Pureessence);
end.

Rich

2012-06-10 13:34:28

There's also SearchBank, and a few functions I made for the include which you could possibly use.