SRL Archive - SRL Archives

function chooseFletch(Mode: Integer;howm:string) : Boolean;


timmyboy

2006-04-27 17:38:23

This chooses the kind of bow you want to fletch, short or long.
For mode, put 1 or 2. 1 is for long, 2 is for short. And for howm, it's how many bows you want to fletch. Example:

chooseFletch(1,27); (This would fletch 27 long bows.)

Returns true if it fletched or not.
Any suggestions or questions plase post here.

{******************************************************************************
function chooseFletch(Mode, Howm: Integer) : Boolean;
By: Timmyboy
Description: Chooses the kind of bow you want to fletch, short or long.
For 'mode' put either 1 or 2. 1 is for long bow, 2 is for short bow. For 'howm' put the number of bows you want to fletch.
*******************************************************************************}
function chooseFletch(Mode, Howm: Integer) : Boolean;
var
x, y, wordw, ques: Integer;
begin
wordw := BitmapFromString(15, 13, 'z78DA3330A007B0C04112A38B785' +
'90B12CDB1A099C98353D682C4F8A2967B686D322D6287F290A45D' +
'0C522B7E2DF0C688058966520B0000C98ADCA9');
ques := BitmapFromString(4, 12, 'z78DA3330C00E2C304803BC2A2' +
'911274FC48008B751EE5A00BAD23661');
case mode of
1:
begin
if (FindBitmap(ques,x,y)) then
begin
wait(1000+random(300));
mouse(x+20+random(12),y+30+random(30),1,1,false);
wait(500+random(700));
clickoption('X',3);
wait(1000+random(200));
typesend(inttostr(howm)+chr(13));
Result := True;
FreeBitmap(ques);
Wait(250);
end;
end;
2:
begin
if (FindBitmap(wordw,x,y)) then
begin
wait(1000+random(300));
mouse(x+20+random(12),y+30+random(30),1,1,false);
wait(500+random(700));
clickoption('X',3);
wait(1000+random(200));
typesend(inttostr(howm)+chr(13));
Result := True;
FreeBitmap(wordw);
Wait(250);
end;
end;
end;
end;

The Prince of Randomness?

2006-04-27 18:28:56

Hmm interesting.
Very good
how about chiecking if its gained a level than continueing to fletch?

Sdcit

2006-04-27 18:38:52

1. Remember to free the bitmap

2. why is howmany a string?


good job

phantombmx

2006-04-27 19:32:38

yes, change howm to an integer then do inttostr(howm)

WhiteShadow

2006-04-27 19:39:07

I suggest making it a procedure. It'll be more leet that way.

timmyboy

2006-04-27 20:16:06

From: WhiteShadow
I suggest making it a procedure. It'll be more leet that way.
Why? I made it a function so that you could check to see if true or false.

Btw, I changed 'howm' to a Integer, good now?:p

Expect more fletching procedures to come from me:)

timmyboy

2006-10-23 09:03:08

Edited this a bit too. I can't login to runescape for some reason to test this, so if anyone can, i'd be happy. I'll test it as soon as customer support gets back to me…in a couple of years.:duh: