SRL Archive - OSR Help

Help me with my bot program =S!


mrpickle

2010-05-25 16:33:30

http://tinyurl.com/MrPickleAttemptMakeMacro
(FaceBook account needed to run).

There are probably lots of people searching for bots for the above site. Removed all keywords.

* Working version :)… kinda.

Steps:
1. Start Script @ program main page with all opening stuff closed.
2. Target your browser, make as much of screen visible as possible.
3. Press Run.


Problems:
1. I get out of range error if I replace line 241 with the one above… and ungreen everything between line 247 and 236. All the values seems to be working.


2. Script inefficiencies.




TestingFacebookAccount: [email]personaltest@hotmail.co.uk[/email]
Pass: abc123

ShowerThoughts

2010-05-25 16:42:30

Add a wait(milliseconds); ?

mrpickle

2010-05-25 17:00:40

It doesn't even detect the colour. I have the WaitforBitmap function. That works, tried it in other scripts too.


If I use wait here. It still wont detect bitmap.

ShowerThoughts

2010-05-25 17:08:28

Can't acces facebook, I don't have an account.
Can't help you on this one mate… I can only say:
You sure you are picking your client well?
Are you searching in the bounds of the game.
Do they have some anti method.
Do they shift pixels?
Tolerance?

Good luck!

mrpickle

2010-05-25 17:37:17

ok, Added a free sample account that can be used :).

not sure about pixel change,client in bounds of game. client is firefox, tolerance didn't work.

Sex

2010-05-25 18:01:50

You could condense SelectSquads into like 20 lines or something :P.

mrpickle

2010-05-25 19:31:16

Lol yeah… I should

Frement

2010-05-26 00:17:55

From: mrpickle
Lol yeah… I should


Have you tried FindBitmapDeformed or whatever it is, or DTM's?

mrpickle

2010-05-26 15:32:41

Used DTMs in other scripts. not this one.
Never used findbitmap deformed searching :).


Also. Noticed the color does change in the game… That;s probably why my find bitmaps failed.


Edit: Found it!

{*******************************************************************************
function FindDeformed(var Xoff, Yoff: Integer; BMP, a, b, c, d: Integer): Boolean;
By: WT-Fakawi
Description: Finds Bitmap in Box a,b,c,d. Returns coords in ObjX and ObjY.
Uses Deformed Bitmap. FindDeformed will gradually lower Tol and reduce Accuracy.
Functon can cause severe Lag when using bitmaps bigger then 16 pixels. Works but Lags.
Useful for MM-clicking. For ObjectFinding use FindObjectDeformed.
*******************************************************************************}
function FindDeformed(var Xoff, Yoff: Integer; BMP, a, b, c, d: Integer):

mrpickle

2010-05-26 16:32:54

Everything works now :)… and the color detection have always worked. The problem that prevented the script from doing anything was that I set x and y as local varaibles throughout the script. That prevented me from actually reusing the same values outside that specific function / procedure.


lol my fail variable declaration xD, set global instad of local. Whoot! everything works.
now.. about efficient programming xD.