• Log in or sign up for an account here: https://www.sythe.org/login

KoC script making

dienoob32

Newcomer
Joined
Aug 12, 2008
Sythe Gold
0
Messages
3
sorry for my bad english i got excuse of not speaking it properly


well this is the begin of my script , i've used tutorial so credits arent to me

im gonna add over 100+ bmps and i was wondering if som1 knew how to
make it easier to do the procedure usebitmap





//still working on it atm so its not this bad ! i did some of the job well i try



Code:
         program BitmapExample6;

var
g1,g2,s1,s2: Integer;//bitmaps
x,y: Integer;

procedure LoadBmps;
begin
                         g1 := BitmapFromString(50, 59, 'beNrtXT2IZcUSnsV1FQURDAz8u' +
       'cFLhA0020CNhAUjkQdiNqDCaKLIBqO4omCwgSuCySgIF00VBBFFMD' +
       'MYNBYNFhx0QcUVFA0MNnnNNK9p+qdOdf11953b0Tqee053dVX393V' +
       'VV+3sbNu2bdu2ufbf4wY8cMMNN9xxxx38D911112c37755puEZ77+' +
       '+mvaF92rOB2G5blarW699VZOV5O+Sc0R0G49bkidsdRP1U8jn3zww' +
       'QfzCa2J0T0c/vM///edited removed some uselesstexthere

                          g2 := BitmapFromString(28, 19, 'BeNrtXT2IZcUSnsV1FQURDAz8u' +
       'cFLhA0020CNhAUjkQdiNqDCaKLIBqO4omCwgSuCySgIF00VBBFFMD' +
       'MYNBYNFhx0QcUV              


end;

procedure UseBitmap;

      begin        
if(FindBitmapIn(g1,x,y,191, 109,489, 293)) then 
 begin
      
           sendkeys('g')  //sendkeys('g1,org2g3g4 corresponding on which 1 it found

                  end;
                      end;

procedure FreeBmps;
begin
  FreeBitmap(g1);//freebitmap g1 org2...etcagain:S
end;


begin
 LoadBmps;

  UseBitmap;

       FreeBmps;


end.
 
Make an array of responses, and of bitmaps, load the bitmaps into the array, then search for each one in a row, and use the corresponding response.

Example:

Code:
program New;
Var
  ArrayString : Array of string;  //Declares ArrayString as an array of strings.
  ArrayInteger : Array of integer;  //Declares ArrayInteger as an array of integers.
  
procedure LoadBmps;
begin
     ArrayInteger[0] := BitmapFromString(298, 179, 'beNrtXT2IZcUSnsV1FQURDAz8u' +
       'cFLhA0020CNhAUjkQdiNqDCaKLIBqO4omCwgSuCySgIF00VBBFFMD' +
       'MYNBYNFhx0QcUVFA0MNnnNNK9p+qdOdf11953b0Tqee053dVX393V' +
       'VV+3sbNu2bdu2ufbf4wY8cMMNN9xxxx38D911112c37755puEZ77+' +
       '+mvaF92rOB2G5blarW699VZOV5O+Sc0R0G49bkidsdRP1U8jn3zww' +
       'QfzCa2J0T0c/vM/');
       //Sets the first slot in ArrayInteger to this bitmap.
     ArrayInteger[1] := BitmapFromString(298, 179, 'beNrtXT2IZcUSnsV1FQURDAz8u' +
       'cFLhA0020CNhAUjkQdiNqDCaKLIBqO4omCwgSuCySgIF00VBBFFMD' +
       'MYNBYNFhx0QcUVFA0MNnnNNK9p+qdOdf11953b0Tqee053dVX393V' +
       'VV+3sbNu2bdu2ufbf4wY8cMMNN9xxxx38D911112c37755puEZ77+' +
       '+mvaF92rOB2G5blarW699VZOV5O+Sc0R0G49bkidsdRP1U8jn3zww' +
       'QfzCa2J0T0c/vM/');
       //Sets the second slot in ArrayInteger to this bitmap.
end;

Procedure FindBmps;
Var
  I, X, Y : Integer;
Begin
  For I := 0 To High(ArrayInteger) Do   //Loops through every slot of ArrayInteger.
  Begin
    if FindBitmapIn(ArrayInteger[I], x, y, 191, 109,489, 293) then  //If it finds it
      SendKeys(ArrayString[I]); //It types the string held in whatever slot of ArrayString corresponds to the bitmap.
  End;
End;

Procedure FreeBmps;
Var
  I : Integer;
Begin
  For I := 0 To High(ArrayInteger) Do
    FreeBitmap(ArrayInteger[I]);  //Loops through every slot in ArrayInteger and frees the bitmap held there.
End;

begin
  SetArrayLength(ArrayString, 2); //Sets the length of the array to 2 slots.
  SetArrayLength(ArrayInteger, 2); //See above.
  ArrayString := ['s', 'd']; //Sets the first slot to S, and the second to D. If it finds the first bitmap, it types S
  //The second types D, and so on, for whatever you put in.
  LoadBmps;
  FindBmps;
  FreeBmps;
end.

Hope this helps, if you need any help, don't hesitate to ask!

~Sandstorm
 
Runescape Gamblingrunescape gambling
Back
Top