SRL Archive - OSR Help

Need testing for this close squeal of fortune proc.


Sawyer

2013-03-21 22:20:15

Procedure CloseSqueal;
var
x, y, squealDTM, SquealBitmap:integer;
begin
SquealDTM := DTMFromString('mwQAAAHic42RgYOhnguBeIJ4KxB1APAWIO6E0iO/LyMDgBsTBjBC2N5TtBsVBQPxthy3DipnTGEzVlRmi/bwZ8uKiGWwMdRkObFrLsH/jWgYXK1MGLqB9hDAjERgOAK3TFB0=');
SquealBitmap := BitmapFromString(21, 20, 'meJyNlEtME1EUhl2oAcVXIyYuVKRaNYIvCtUyLY4FaUun2CmVzrQUylCBKQItFWl9IIIvCGoapbTgGxOlIWoh8QEJ0o2CxARWRjcu3bpxYSLxH4b4CGpMvtzMzPn/c+45M3dMVX3OE/Gi+hcitPs57Y5Rlf0GTgDXInhCVUQFuHsUdxdozEHGEzVV9ztbptjARLFvzOIdMx55rHd0z6egVCDfHtSV3kFaIX/53V/tjH/ccTQyEHsZ6ukP9US7Iv1dkYcC4QciodnbgSejdj5o4p8gCds0WFQ/VNX+vqT5nbluuPdObM1aYlWy5R8kr81GEn1pL1UZY7wCsDtbP5ir7x3zt0Ngddz8QfE8IGhoPKctbs21Bi31UbXek8+2YSVyHXzN8ZUSm94Y9LRGTt6Pu/3ddrYNWLl2puNxnt2PEATVfKNcWbgnmzVWdqm1btjJwgCRx1W4apFcoTxb1Rlrmv7GP5jWmVsQOtz7lhn5TPBhhbIVAlell6SO62xh9F7g7LE2DOPV5Fsv2hy1SRJTqqxhf14jfXXcNTljuPaGvPLq0OjXjKbB5BQGIQjYkhoNfYo0R2DXsR0YPlKp9T6zhVu+kpKs5mTSUqA4NaIdnyHjM7K6gWVJdOJCDUIQQAYxSXeg9wP0WRMXwRyytXUFlG1pogHdrV9jkaxgtnmfw6t69mVjWQjPYUcIFwVGG8Sw03V9aJzh+9CCytCgOUgvSRI0AF4YUVfqup0RmtzAXBZDWCEjtF7Rjs3j3eETUhsCRI4BUexznblT+ejTZk8MtcBGZ/f2M1GJvBwhCNSkUceeR1H0jiTw5lojWZr6TMX+JYkqaKBEBkwJG05YtA+WZJVraUqOYE9UQZal4WF0BoZ+jE5O1qbvVEAsVvwbEKSlZ+7YyxH6S6juaRtsufHeH/5QcXooU5m7YIE0YbGQ5M8sVkCwJyun2H2rLDBcdmYYpflL0zg1zubXKsqXtotIlcmlMnmqLFO65Sebts5dpO8myEM+3/WPcAn2qr7ylrnTWuQZPVhyS0k1Kw2n/wzVnGcPm/inEOPIYPOinfXH/x/Uwoofy2/2wMR8EJqP68IUdj6bSvjmMQSc+t8Rflw4C2wgLsKdHIcRIxIzwG6uicH+HVCh6UQ=');
If FindDTM(SquealDTM, x, y, 1, 51, 759, 500, 30) then
begin
MMouse(x, y, 3, 3);
if WaitUptext('elect', 300) then
ClickMouse2(Mouse_Left);
end else
writeln('Did not find Squeal of Fortune DTM');
If FindBitmapToleranceIn(SquealBitmap, x, y, 1, 51, 759, 500, 30) then
begin
MMouse(x, y, 3, 3);
if WaitUptext('elect', 300) then
ClickMouse2(Mouse_Left);
end;
FreeDTM(SquealDTM);
FreeBitmap(SquealBitmap);
end;
Please inform me of the results. if it works, It should be pretty reliable.

Element17

2013-03-21 22:37:34

Wrong section, but looks good. Where is the DTM?

Sawyer

2013-03-21 22:38:50

The DTM is there, and this has worked for me a few times in a row now. It doesn't find the DTM though. It uses the Bitmap mostly.

Ian

2013-03-21 22:39:19

Doesn't FindNormalRandoms close it?

Sawyer

2013-03-21 22:40:12

No, it doesn't. I believe it is broken, so I just made this for anyone looking for a temp fix.

Ian

2013-03-21 22:48:02

From: Sawyer
No, it doesn't. I believe it is broken, so I just made this for anyone looking for a temp fix.


Ok, I know it used to, if you get it working you could probably ask for your fix to be pushed to SRL

Sawyer

2013-03-21 22:49:50

I'm not sure my code is up to the SRL Standards for that :p

Ashaman88

2013-03-21 22:58:35

If it works great. Just be careful - since it searches the whole client for it, there is a higher chance of false positives. That's why I added the second check with the detection method. It was frustrating trying to figure out what was causing my mouse to go crazy at lrc back in the day

Element17

2013-03-21 23:39:48

From: Sawyer
The DTM is there, and this has worked for me a few times in a row now. It doesn't find the DTM though. It uses the Bitmap mostly.


I meant what did you make a dtm of? The x button or what?

The Mayor

2013-03-21 23:49:12

From: Element17
I meant what did you make a dtm of? The x button or what?


Looks like it. If you click anywhere else it opens up the spinning wheel.

Sawyer

2013-03-22 09:18:43

Yes, the DTM is the x button. The bitmap works better though.