Code:
program CrystalBowCounter;
procedure BowCount;
var count: integer;
var randstore: integer;
var x, y: integer;
var flag: boolean;
begin
repeat
flag := true;
count :=0
randstore := RandomRange(230, 245);
while (flag) do
begin
if (FindColorTolerance(x, y, 7517833, 232, 121, 324, 219, 7)) then
begin
count := count+1;
writeln('Arrows shot: ' +inttostr(count)); //For testing purposes
wait(1200);
end;
if (count = randstore) then
begin
writeln('Time to switch bows!');
//flag := true;
end;
if (IsTextInAreaEx(5, 343, 514, 475, x, y, 'Your crystal bow has degraded'{place holder, I dont really have the real string}, 0, ChatChars, False, False, 0, 0, -1) and flag) then
begin
writeln('Bow has degraded');
flag = false;
end;
wait(300);
end;
until(false)
end;
begin
BowCount;
end.
A quick explanation:
This code will count the number of arrows shot via the color of the arrow every time the arrow is shot. Then it will alert me every time around 230-245 arrows have been shot so I can swap my crystal bows in order to maintain one of them in 10/10 condition.
It's very basic (my first script haha) so I dont expect much...
I can't test this because I don't really have a crystal bow. (In fact, I'm writing this code so I can get the most out of my bow when I do get one) The color I put in was from a msb special, which has a similar glow like the crystal bow arrows. This also explains why I didnt use bitmapping, since I dont have a image of the crystal bow arrow, and google didnt either 
I eventually plan to expand the code to include playing a sound and/or automatically switching bows, then switching back when the bow degrades.
Sorry for being such a newbie =P
Thanks!
EDIT:
I have rewritten my script to make it a little more flexible.
However, I have a few more questions:
Code:
if (IsTextInAreaEx(5, 343, 514, 475, x, y, 'Your crystal bow has degraded', 0, ChatChars, False, False, 0, 0, -1) and flag) then
What do I put in place for ChatChars? I got this from the F1 help. I get a compile error when I try to run this.
Also, what is the sign for "opposite" or "not"? (In C++ it is the ! sign). For example:
would run only when the flag was false. I've tried using the ! sign, but the compiler does not recognize it =/