Sythe.Org Forums     Register     FAQ     Members List     Calendar     Mark Forums Read    
 
Sythe.Org Forums  
   Runescape Gold

Sythe.org — A Virtual Goods Trading Hub

Make real cash! buying and selling in-game items.

We have a no-scam policy.

You can make thousands playing your favourite games here at Sythe.org.

Just sign up an account and follow the rules!


Take me to

Runescape Markets

Other Game Markets

Support Center

Register an Account

Close
Having a problem with detecting bitmaps
Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 12-19-2009, 04:10 AM
Newcomer
 
Join Date: Dec 2009
Posts: 1
Default Having a problem with detecting bitmaps

I'm really new at this, and I've read a bunch of tuts on how to do this, but I still have problems with detecting the proper image. Sometimes the mouse moves but never the correct spot, and other times it doesn't move at all, depending on what code I have tried.

I'm using scar 3.22, and here is my most recent code.

Code:
program New;
// Declare variables.
// Declaring vampegg bmp, mouse x and mouse y var
var
vampegg: Integer;
x, y: Integer;

procedure loadbmps;
begin
// The bitmap of the vampire egg in code
vampegg := BitmapFromString(26, 29, 'beNrV1bENgzAQBVBmoKdhg' +
       'YgBkFJSRvQZIGNkC1Zgy5z0pa/T9/kMCU2s3xDjp+NsSNf99XitK3' +
       'OVgzyXxfKj8x4Grz3m2XKQ4lpSCEFoa98fobyGy33bbK3Fl4dfms8' +
       'YgqCogbpP06m2S9+kdaYlYI0qa2tqSWFsmmgJmBQW7kKihYgPNEa0' +
       '2ziWmghhbcKWGilbJTsoheExcUJwA0DTCIZnPtwFajy9Na2WsjBp2' +
       'ikNIKlSA3VQQ5eahVHjneWnjD0XKtFs2KxfLvEHrElBY4TC9oVUTb' +
       'NhU1IAv4o8/95JKGg+Asqsp0LNBqZkFV+o0KlRHmQIhk5O1cwwZ/8' +
       'Hr3K+HB9kOG+H');
end;

procedure moveclick;
begin
if(findbitmap(vampegg,x,y))then
begin
movemouse(x, y)
wait(200)
clickmouse(x, y, true)   //True = left click; False = right click
end;
end;

begin
loadbmps;
moveclick;
FreeBitmap(vampegg);
end.
Right now it is very simplified, and later I'm going make it repeat every few seconds and refresh the browser, but not until I can figure this out. I'm sure it is something really simple but I don't know. If anybody else knows, that would be a great help. Thanks!

-------------------------------------------------------------------------
Edit* Okay I found out what was wrong. I think the bitmap string was too long. I found another tut at http://www.villavu.com/forum/showthread.php?t=49089 that explained to use a smaller part of the image which helped out a lot.

Last edited by kk0425 : 12-20-2009 at 05:32 PM. Reason: Found solution
Reply With Quote
  #2  
Old 12-30-2009, 03:34 AM
yahretzkee's Avatar
Member
 
Join Date: Jul 2008
Posts: 49
Send a message via MSN to yahretzkee
Default Re: Having a problem with detecting bitmaps

Try this:
Code:
program New;


var
vampegg,x,y: Integer;

procedure LoadBMPs;
begin

vampegg := BitmapFromString(26, 29, 'beNrV1bENgzAQBVBmoKdhg' +
       'YgBkFJSRvQZIGNkC1Zgy5z0pa/T9/kMCU2s3xDjp+NsSNf99XitK3' +
       'OVgzyXxfKj8x4Grz3m2XKQ4lpSCEFoa98fobyGy33bbK3Fl4dfms8' +
       'YgqCogbpP06m2S9+kdaYlYI0qa2tqSWFsmmgJmBQW7kKihYgPNEa0' +
       '2ziWmghhbcKWGilbJTsoheExcUJwA0DTCIZnPtwFajy9Na2WsjBp2' +
       'ikNIKlSA3VQQ5eahVHjneWnjD0XKtFs2KxfLvEHrElBY4TC9oVUTb' +
       'NhU1IAv4o8/95JKGg+Asqsp0LNBqZkFV+o0KlRHmQIhk5O1cwwZ/8' +
       'Hr3K+HB9kOG+H');
end;

procedure MoveClick;
begin
     if Findbitmap(vampegg,x,y) then
     begin
          Mouse(x,y,3,3);
     end;
end;

begin
     LoadBMPs;
     MoveClick;
end.
Reply With Quote
Reply



Cheap RS Gold Store  Runescape Gold

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

All times are GMT +1. The time now is 11:43 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.6.1