Since some folks have expressed interest in trying this bot for themselves, I decided to share the source code and binary đ
Itâs not perfect, but you can tweak the source code (for example, changing how long rp_thread::sleep() is called, and where), and probably get some better performance. If youâre up for a challenge, you can also try to improve the code that decides on the next move! (if you do, itâd be great if you shared the changes!).
Anyway, here is the zip file. [ autoblitz-export.zip ]
The binaries are in the export directory. You will be asked for a âhWndâ (window handle), which can be found using the program âSpyxxâ which comes with visual studio.
Archived comments 159
New comments are closed.
Thank you very much!
Thx really appreciated
How do i get this to work, what programmes do i need
You're the man - much appreciated!
If you get errors trying to run the binary, you might need to install "Microsoft Visual C++ 2008 SP1 Redistributable Package (x86)" -- a google search brings up the download page from Microsoft.
for those who're confused with Spyxx, you may use NewSpy instead. ;)
works a treat and have beaten all my friends already
can someone send me a compiled version of this please ?
What do I identify the Handle to attach to the bot? Anybody help?
Hello, managed to get it to attach. It shows all the correct colours of the grid on the app, but it doesn't move the gems?
Mannn I think I got the wrong handle. So many handles... Lol...
The handle is Bejeweled Blitz under the Frame Tab of Bejeweled Blitz IE Window.
You must make some positioning of the grid to correct the allignment, but after getting the correct allignment the program doesn't shift the gems for me :(
I use firefox much better than IE i found the handle using winspector spy and it works no propblems after using the handle.
Works fine now thanks y'all!
i dont know what to do when it says hwnd.
care to explain to me ? :)
hwnd is the windows handle created when you visit a certain site.
Ive loaded the handle and when i run the bot, nothing happens, am i missing something !!!!!
All those who run this, could you explain how
same here, when i load the handle nothing happens and program says : "cursor is inside window ... waiting"
what am i doing wrong?
you have to move the mouse cursor out of the game window other wise it pauses the auto game playing feature.
oK FIGURED IT OUT, AWSOME, MANY THX
download a programme called winspector
Drag the curser over the facebook bejeweled window, and copy the windows handle into the autobot.
jeps, i use winspector too, loaded handle,
moved cursor out of game box,
but the porgram keeps flashing " -current game board-"
and stones don't move. I'm probably still doing something wrong.
Great job anyway!
works like a charm, thanks!
hi i have no idea how to get this blit download to work....i want to beat my mates at the game as im crap. can you help me set it in motion.
Verrrrry nice!!! Great work, thanks!
ok have the handle entered and also double checked it with winspector. its reading the jewels and i can see activity in the autoblitz, when i put the cusor in the game its saying cursor inside the window.......waiting. so i have taken the cursor out but nothing is happening.
what am i doing wrong???
In winspector, were it says "click and drag to select a window" and release it in winspector a tree will open, NOW YOU SHOULD SEE IN THE WINSWPECTOR WINDOW THE HIGHLITED PAGE CALLED MOZILLA WINDOW CLASS, OR WINDOWS EXPLORER CLASS, YOU MUST WRITE THE FIRST 8 DIGITS INTO THE HWND, THEN PRESS ENTER, DONT LEAVE YOUR CURSER IN THE MAIN BEJEWELED PAGE, YOU MUST MOVE THE CURSER OUTSIDE THE WINDOW FOR IT TO WORK
MINIMIZE THE BOT WINDOW AND ALSO THE WINSPWECTOR WINDOW......happy jeweling, any problems, i will post a screeny
sometimes it keeps getting stuck caustic !!!!! any suggestions
it should only get stuck once in a while. basically you can just leave it running and after the 1 minute times out, it starts the next game automatically. it would be nice to fix this bug, but i probably won't get around to it for a while
Works fine but could be better, it gets stuck a lot here.I tweaked rp_thread::sleep() to go a bit faster.
But in most of the games it gets stuck on certain moves, and it needs a little help.
Anyway got a max score of 97,000 out of it, till now.
it doesn't beat human, but it should :)
Someone already tweaked this or changed some codes?
I had made some changes between when I got a 250k score and when I released the source code. I forgot what the changes were!... The fun is for you to tweak it and improve it :)
you say that it should start the next game automatically. In my case i see the "play again" button flashing, but the bot doesn't push it.
Maybe that's also why he gets stuck so much in the game here, he sees the move but doesn't make it sometimes.
Am i doing something wrong?
Allright i thought so :), i'll try to find it myself.
Nice job anyway, thanks.
186k, getting closer!
I have got a 196k with no tweaks so far
if you could make the bot give priority to special stones an multiplyers, scores probably would go much higher than they do now.
I'm new to all this so how do you run this and get it working, i have downloaded ms visual cc+ 2008 and winspector but still am confused, any help would be appreciated, i am a complete novice.
It would be easy to prioritize the multipliers/specials, just the trick is how to detect them. The technique using now, where it averages the color, isn't able to do it. Would need to expand this to be more clever.
249,900 !
Haha, thats with no tweaks . :)
249k nice! almost 250 :) (when you get 250k, it says that's the highest award you can get). Maybe if you leave it running while you're gone/asleep..
thats what i done yesterday.
i went to family's house, and i came back with tht score, i dont know how to thank you.
wot da fuk iz a window handle and how do i get it??
guys a lot of people seem to be having a similar problem so help us out :)
handle is loaded and the bot says âcursor is inside window ⌠waitingâ so I move the cursor outside the window and now the bot keeps flashing " - current game board - " and stones donât move.
what m i doing wrong?
I had this problem too, but now I use firefox and it works
- start firefox, goto the bejeweled game
- start autoblitz
- start the winspector
from winspector , drag the red crosshair target thing onto the bejeweled part of the webpage
In winspector you wil see a bunch of firefox-icons with numbers and text appear .
One of these has a grey background
Type that one's number (eg 0012b4c1 ) in the autoblitz and press enter . The game will start :)
hi Krazy horse i have followed you tips and drap dropped etc... the number i type in was from mozillauiwindowclass 000204a0 then i click start on bejewelled and the it changes to
wwwwwwwwwwwwwwwb
bbbbbbbbbbbbbbbw
gggggggggggggggw
and so on this is on the current game board but nothing happens and the game comes to an end. i must be doing something wrong......does this app defo work on facebook bejewelled?
please help
finally i have got it working, hahahah how cool is that. so far i have scored over 100,000
cheers for this.
Glad to see you got it working
My current high score is 241,700
Im working on changing a few things.
Ive noticed it goes for 3s and bypasses the "special stones" when theres clearly 4 or even 5, trying to change it so when that happens, it auto goes for the highest....
Will let you all know when i finished
Once again thx caustik
You da man
rESPECT
Petatje your a fukin star!!
Thank you so much!
Your the only person who knowz how to EXPLAIN!
My bot was kinda stupid in the first few games, I could have played much better than it! LOL
Thanks though! :D :D :D :D
why is the bot soo stupid? takes years to think and move the gems! and i only get like 3000 points
we programmers have a name for that, -- user error, patnemsi
pity it doesn't treat the multiplier stones with priority
Ok ive edited some stuff and heres my current score:
[IMG]http://i4.photobucket.com/albums/y134/Dragonorf/bejeweled.jpg[/IMG]
Am still having trouble with it pausing every once in a while, when its sorted i'll let you know caustik
lol
take the IMG tags of the front and back
can I have a compiled version of this ? :)
for those who have the problem, that bot keeps flashing "current game board", i had it too, when i tried the bot on firefox. But when i tried it on internet explorer it worked fine for some reason.
203k now :)
ok im new at all of this. can anyone help me with getting the autoblitz export to work. i cant seem to get it to do anything. all i can do is open or try to read text documents.
thanks ahead of time.
- start firefox, goto the bejeweled game
- start autoblitz
- start the winspector
from winspector , drag the red crosshair target thing onto the bejeweled part of the webpage
In winspector you wil see a bunch of firefox-icons with numbers and text appear .
One of these has a grey background
Type that oneâs number (eg 0012b4c1 ) in the autoblitz and press enter . The game will start
Help me pls....i kinda confuse on how to do it. Currently My pc running on vista....pls help me.
Jopa i cant even get it to work on ie but work fine on ffox......... top score so far is 189,000 although im having to assit it during the game on activating the gems........ does anyone have an updated version!
its mint though. all my mates are going loopy as im whooping the butts
thanks again
how do you get autoblitz to run? all i can do is open or read it? again im new at this.
hey
I am trying to compile using the MakeFile but got the error.
makefile : fatal error U1036: syntax error : too many names to left of '=' Stop.
You're best off ignoring the Makefile and just stick with the project files. Come to think of it, I should not have included them in the zip.
It works great but always hitting 150K only :(
So far i only know how to run the program - Caustik any updated scripts to share? Thanks mate
anybody know how to use it with newspy? as my winspector doesnt open at all after installing.
how do i get this zip file, would love to wipe the smiles of some peoples faces when i get ahead of them lmao
Ok I am really banging my head against a wall here.... Where is a fully working Tutorial for this programe? Some people have written bits and piceses but not in depth look into how this all works! I have been here now for 7 hours (yeah laugh it up) and no matter what I do I cannot get it to run, I have tried a heap of diff things and I still cant even get the handle??? I guess the only way for us NON Programers are going to find out is by asking a friendly programer who would love to help!!
Thank you in advance to the Friendly Programer that would love to assit us NON Programers :)
Forgrt the last message lol
Ummmm the only prob I have now is (cursor is inside the window...waiting) But Ummmm there is no cursur when I start the game ??? What have I done wrong I seen someone above said they had the same problem and fixed it but never mentioned how they got it running ?
Please help thanks :)
try to READ the posts , I made a little manual on april 16 , 2:25pm
leave you email visable on the here and ill sit down and talk you through it step by step. its not that tough and once you read through my instructions you will have it running in mmmmmmmmhhhhh about 2mins flat. oh and tell what O/S (operating system) your using.
chapee.
SPIFFY
leave you email visable on the here and ill sit down and talk you through it step by step. its not that tough and once you read through my instructions you will have it running in mmmmmmmmhhhhh about 2mins flat. oh and tell what O/S (operating system) your using.
chapee.
still dont get it.
sorry for being stupid here.
im stuck even at the first step.
i have the winspector. but many people says open the autoblitz bot. but where is it and how???????
wheres the autoblitz bot located under?
sorry to be a pain, but wot do u do once u have clicked on ur link above,
ive clicked on the link above now wot do i do can someone help me please
everytime i put handle in it comes up with aload of 0000s and says autoblitz has stopped working
How did you go about tweaking the program?
ive downloaded visual c ++ and everything was ok then downloaded winspector now i cant do anything with my laptop its got a mind of its own think ive done something really wrong as had to come on pc to write this, please can someone help me, thank you
hi, wot did u do as i have the same problem just get all the letters nothings happening
ive done it wooo hoooo lol, thanx to all the posts on here i got it in the end thanx again
Hi all,
got it working with winspector spy. Works like a charm. Couple of things i've noticed which might help people.
1/ On My Machine, I cannot run winsppector with autoblitz running. Get the window handle first, close winspector and open autoblitz.
2/ Ensure the facebook page is maximised and that the side scroll bar is fully at the top of the page.
3/ If Bejewelled gets locked up (it happens sometimes) do not reload the facebook page! Simply right click on the gameboard and choose rewind) this way you don't have to discover and enter the new window handle.
Hope thes may help some. Thanks for a great app!! (192K so far :-)
Keep in mind that you can use autoblitz as a copilot. You can play like normal, and move the mouse cursor off the window whenever you need help. If you do this just right, you can make smarter choices then the bot, while still keeping the action constantly going, which is likely to get you a higher score. For example, you can step into the game whenever there is a chance to get the bonus pieces, since the bot doesn't know how to recognize them. This is how I managed to break the 250k barrier.. :)
just broke the 300,000 points barrier
wow. awesome
I download autoblitz-export.zip to my Desktop. I click on autoblitz-export.zip but nothing happens. How do I open autoblitz-export.zip?
Also, I accidently dragged the 'Internet' into the 'Recycling Bin'. I really like reading the Internets and don't wish to delete it for everyone when I empty the 'Recycling Bin'. I really need to empty it soon, because my son says if leave thing in it that's where virus come from. Similar to how you leave garage in the kitchen and it starts to smell. My son is very smart, and in the top 10 of his class.
Thanks.
zip files can only be EXTRACTED using programmes such as WinRAR.
OK, you determine the value based on the average color value - however as near as I can tell, it isn't able to differentiate between a hypergem and a white gem, or between a regular and a blast gem of the same color, correct?
I would think (I could be wrong, haven't looked at the gem assets yet) - wouldn't it would be easier to look for an RGB value that is unique to that gem within a block - if it's there, it's that color. (I am, of course, assuming that there is at least one unique value per gem - if not, then I guess it would be back to tweaking your averaging algorithm).
Krazy Horse, can you update on what tweaks you've made?
So far, I haven't broken 250k...yet :) (244k is my closest)
The unique color per block technique sounds like it could work. Animations may or may not be a problem, only way to find out for sure is to try it :)
How do I open Autoblitz bot?
Works a treat, 176k so far. shhhh dont tell the gf, she just things im awesome at this game, many thanks.
I am installing this but for some reason only the bottom 2 gems keep getting swapped?
Seems like I am the only one with this issue everything else is working properly I believe.
JJ - nah, it's not you - it happens to me as well, and is especially pronounced on the reddish/orangeish background screens with white, orange and yellow gems. This tool figures out what gem is in a space based on the average color value of the pixels within each square and I think what happens is that the two values on the reddish backgrounds are too close together so it thinks they're a match. I'm trying to figure out a way to put in a counter so if it makes the same move twice or three times in a row, it abandons it and starts looking for another match. However, not being a professional (or even an amateur) coder, it's not going easy :)
Usually if I can't find an immediate swap that'll snap it out, I'll just restart the game.
How do i get Spyxx?, can i get a download link or something?
Where can i download NewSpy?
Where can i download NewSpy og Spyxx?
THis is infuriating me, I have opened Autoblitz and got the hwnd number with spyxx and then i go autoblitz and then enter the code and then go to the game hit play go back to autoblitz and enter and it just says all this crap liek Current Game Board, and it does nothing, later i went and entered the code without hiting play first , what am i doin wrong this is annoying i just want some better points, i only got up to 65,400
Hi i have done everything but only two gems move in the center of the screen and in the autoblitz screen I get the colours in a colum repeated eg. wrb*** not horizontaly as on your video could you please help?
enter the hwnd number AND hit ENTER, THEN go back to the game and click Play - it doesn't hurt anything. Keep autoblitz in the back ground, the mouse out of the play area.
I keep getting the following error when trying to run the binary.
"C:\Documents and Settings\Administrator\Desktop\autoblitz-export\export\cygwin-vs60\release-static\bin
The application has failed to start because the application configuration is incorrect. Reinstalling the application may fix the problem"
I have installed the MS Visual C++ 2008 SP1 package and UnZipped the file twice but still no joy. Anyone have any ideas? Thanks.
MS Visual C++ does not seem to be needed I eventualy got autoblitz to work using winspector however it only seemed to work after I changed the resolution to 800 x 600.
You probably just needed to switch to 32bit color on your desktop.
the bot doesnt work it just keep clicking the same gems
please help
ive got 226,900 took along time to get it sorted but so worth it lol, thanx again people,
hi, i use winspector too it does work like a charm, but have to open winspector last as cant do nothing with my pc while its on,
same, i've done everything right, but when it comes to the game play, it just keeps switching two gems in the middle of the screen, and doing nothing else. it also doesn't start a new game after the first is finished...
any help would be massively appreciated
Hi I downloaded the winspector tool and keep entering the HWND number in the file i found within the export--> release folder but nothing seems to be happening ...
I have tried to press enter then press enter on the bejeweled game and also did it the opposite way, what am i doing wrong any help would be much appriciated thanks.
http://img100.imageshack.us/img100/7496/432500.jpg
GoodGame
if anyone needs a complete Image walkthrough, or a video walkthrough i'll be glad to provide one.
Yes please that would be great need one so bad
k working on it
http://vimeo.com/4458352
I beleive the video is still converting, went to the link it says "Starting We are about to convert this video"
yea it takes awhile for vimeo to convert free member videos
Blueberry, thank you for making this so clear, I realized what i was doing wrong which was not writing in the correct Hwrn number....as I was not able to locate it properly because I was not using the red target box to locate the correct precise window...anyway thank you for all your efforts.
does it work on window vista?
I would imagine - I'm running Win7 beta and it works just fine
I tested if you can run multiple games at once, with multiple autoblitz. It works! I had 4 of them open all at once. It's pretty entertaining to leave them running, and you multiply your chances at a high score!
can anyone help me with my query above?
it doesnt work now?
Excellent application, i like it when people comment their code. Good job Caustik, I'm going to have a meddle with it and see if i can contribute to this already superb little toy.
Firstly, I just wanted to say a big ty to Caustik because this is AWESOME and everyone else who has posted software names etc...
Also, I was wondering if anyone had any changes in the code that have made a big difference? Any help muchly appreciated.
Is it me, or does the recent blitz changes made the app perform poorly (strugglng to get over 100K now :-(
there haven't been any changes, Doldy
oh unless you mean the blitz game itself..dunno about that :P
autoblitz to connect but its just clicking 2 or 3 gems and thats it no matches zero points any help please i have tried IE and Firefox
bwheeler - make sure you're in 32bit color for your desktop settings
i am 32bit and still the same problem just clicks 2 or 3 gems and doesn't start a new game when it ends
wots the hwnd ? where do i type the digits??
please help me lol ... i got winspecter on but dnt under stand what the autoblitz thing is??? :o/
please wud u help me i hav winspector on but dnt under stand i drag the red cross but what afta that email jennniewaugh@hotmail.co.uk please x
Caustik any chance you could write a tweaked script for the new bejeweled score screen. As it is now, the bot won't restart a 2nd (and subsequent) games because there is a score spread now (which i assume messes with where it used to click for new game)
Thanks for the bot, I sometimes have a problem of it thinking that orange is yellow and visa versa. I also have to manually start most of the games. It has autostarted like 5 times.
186k and rising.
in the new bewjewled application this bot doesn't restart. changes required
caustik - can re-write a program to restart game itself after the game ends?
157k is the highest ive gotten
I hope everyone realizes that the changes made to Bejeweled Blitz that have broken the auto-restart part of the bot(specifically the point chart at the end of the game) are most likely being used to track bot usage like this one. I would not be surprised if the point tracking data is/will be analyzed for unusal, non-human like patterns (like too many matches too fast, sustained large speed bonuses among others).
While I may admittedly be a little paranoid, I have stopped using the bot to ensure nothing happens to my account.
Comon, it's not like they can ban you from Facebook for that.... can they?
Thanks for your great work.
Do we have any newer update for this code? Like giving power gem and multiplier higher priority .
dc i doubt they would go around throwing a ban hammer. at the worst they would take you off popcap games but not facebook itself. also, the bot preforms worse than the best humans (not to take anything awya from the bot, as it works amazing) so it wouldnt make sense for them to ban
Wow @ the comments here.
Mr. caustic, have you tried using FindWindow to automatically find the window handle?
I wrote a bot for Bejeweled Blitz myself - it can score over 300,000 points. Check the YouTube link (click my nickname) if you're interested.
cybershadow your bot sounds a lot like mine, did you base it off my code?
Okay, thanks to Caustik for making this superb little bot!
Want to have some serious fun though???
If you run the unlimited game timer + this bot it is just fun to watch...nevermind the massive points!
Go to Facebookgamehacks.com and get the Bejeweled Blitz hack. Watch the video to see how to start it (quite simple though).
Then use Winspecter to get the HWND from the app. Then run autoblitz!
CyberShadow, your bot looks really cool, nice work!
This was really just a one day project for me, so I probably won't be updating it anytime soon.
Looks like there's a fair number of other bots and cheating programs out there for this game, if you're really interested in cheating go check those out. This one was really just for fun.
No, I developed it completely independently :) You can check my Facebook page where I posted my progress (the first version got me over 150K, and I kept improving it). I've seen a few other bots, but none of them would calculate more than one move in advance, and thus still weren't able to beat any records. And I know you can cheat dirtily and get absurd points if you mess with the flash file and HTML page, but that wasn't my goal :D
CyberShadow, I saw your source code listed, but I seriously have no programming knowledge! I downloaded Delphi 6 hoping I could just copy and past the source code, but that does not work.
How do I turn your source code into something usable? Any chance of sending me a complete file? My email is Ethanarmond@gmail.com.
BTW, I am really just fascinated with it, while my friends have no idea I'm cheating I take my score with a grain of salt, it's not really me!
The reason I only released the source code is because it's likely that the compiled program won't run as-is on other computers. A difference such as another Flash version could cause the program to break entirely, and I don't really have the time to debug it on everyone's computer. I released the source code for people who have the knowledge to tweak and play with it.
Also, that source code file is complete and doesn't require any external libraries, so it should compile fine. I don't know what you meant by "it doesn't work"... To get you started, you shouldn't try to replace the contents of a new VCL project's unit with the source code, but rather try opening the .dpr file by double-clicking it and compiling that.
Hi CyberShadow, your program is nice. Caustic, your program is genius and I was able to get it running very well. Thanks for your hard work. I have a question: I am wondering what program you can use to check coordinates in reference to bejeweled blitz? I simply want to change coordinates to the new "play again" button. Thanks, and I hope you do not mind me asking a question to CyberShadow.
Cybershadow: I am having an issue with your bot. The one problem I am having is with the colors. The program does not seem to detect the game running because it cannot detect the color values defined on line 59:
if (Scanlines[Y]^[X] and $FFFFFF=$6b83b5) and (Scanlines[Y]^[X+1] and $FFFFFF=$6176ac)
I am wondering what these colors correspond to on your system? Do they correspond to the upper-left and lower-right corners of the game screen? Is it supposed to work when the game is at the start game portion, running portion, ending portion, or anytime? (if it was the last one, I would guess that the colors correspond to the very narrow bluish type border, which might make sense because that is the only thing that really stays constant throughout all phases of the game). I think they changed the colors or they are different from mine. Could you pinpoint what these colors correspond to?
Thanks guys!
do you know what a cursor is, take the mouse off the window you retard
Hmm... Are you running in 32-bit color and is Flash set to render the graphics in "High" quality? It's trying to find these two pixels on the frame: http://dump.thecybershadow.net/24483a300334cb916e7ed001d73820d4/lockon.png . I suspected that there might be subtle differences in pixel values across machines, but I didn't test that myself.
i have tried everything to get the bot to work and all i get are the initials for the colours and currant game board can you help plz
CyberShadow, thanks for the link to your site and code. I know you have many people wanting you to tell them how to make it work. I am one of those, I have so far downloaded, compiled and attempted to bug check it, the area I am failing on is mouse movement, the app see the game board and the correct colors but it wont do any moves, I see no errors even when I run the code in debug. I used Turbo Delphi 2006 with .net v1.1. Im not asking you to fix it I just need help/pointers as I am not a coder, Im an Engineer ! lol
thanks
John
ps. caustik your bot got me to 180k thanks :)
The bot doesn't do anything until you tell it to start playing. I was hoping that the following line of code in the main loop to be self-explanatory enough:
if (GetKeyState(VK_MBUTTON)0) then
So, hold down your middle mouse button (preferably not over the actual play area).
P.S. I made a userscript which adds a toolbar with some buttons to play with, check out the link on my nickname. Also, I think we should move discussions related to my stuff over to the YouTube comments or something, I'm not sure mr. Caustik appreciates me taking over his blog comments like this :)
Oops, the blog software ate a part of that line of code (because it had "less than" and "greater than" symbols), but that doesn't change the gist of it.
CyberShadow...one word, awesome.
Simple Question: Is there a version that will work on Mac??
I run it on my Vista fine :) But just wondering if there is a version for mac, or how to get it working on my macbook pro??
Thanks in advance :))
I don't think there are any bots for macs, but if you just want to ramp up your high score, check out my homepage for a UserScript.
Awesome indeed!
Thankyou thankyou thankyou.
what do we do with the zip files?
how do i get the program going on facebook???
Any possibility of making changes necessary for the program to work with the new version of bejewelled blitz?
probably not..at least not for a while. looks like it'd be enough work that it's not really worth spending the time on it right now