PDA

View Full Version : No More Pickaxes Message



I Pick Axes
10-23-2006, 03:05 AM
Does anyone have something I could use to find the message that says my pickaxe is broken/lost/nonexistent?

Junior
10-23-2006, 04:01 AM
Does anyone have something I could use to find the message that says my pickaxe is broken/lost/nonexistent?

If you cant find a procedure like(witch i think there should be one),
Make your own procedure that finds it.
Use creatbitmapmaskfromtext;


Procedure FindPicaxeHead;
Begin
BMPNAMEHERE:= CreateBitmapMaskFromText('THE TEXT HERE', SmallChars);
Wait(1000+random(1000))
If (FindBitmapMaskTolerance(BMPNAMEHERE, x, y, 17, 410, 495, 452, 10, 85)) Then
Begin
Writeln('Your pickaxe is broken/lost/nonexistent')
Wait(1000+random(1000))
//Procedure you want it to do it it is lost.
End;
End;


Im not sure if you knew this or not but what i ment by the 'text here' is that it says on the bottom of runescape when you dont have a pic. It should you something like, "You do not have a pic from the right level to use" or something like that.


I just made that off the top of my head, im not sure if thats what your looking for or if it would work or not. You can also make it boolean if you wanted to. I dont know if this is really going to help you or if there already is a procedure out there like this.

~jR

Junior
10-23-2006, 04:12 AM
FindPick; should work.

Pyro
10-23-2006, 04:32 AM
if(inchat('message'))then pickgone:=true

Or whatever but inchat reads the last chat message.

WT-Fakawi
10-23-2006, 05:46 AM
check FindPick; in mining.scar. I think its even commented...

I Pick Axes
10-23-2006, 08:31 PM
I can't use InChat. They changed it some while back to be a popup message thing complete with a ClickToContinue.

I can't call a FindBitmap every time I hit an ore, it's expensive and I probably can't do it right anyways.

If I'm making out of chars, it's not SmallChars, but I think the NPC talk ones. But I can't really do that well.

I think I found the thing inside FindPick. Thank you.

WT-Fakawi
10-24-2006, 05:53 AM
This is the piece of code you are looking for, from findPick

if (GetColor(472,380)=0)and(GetColor(482,383)=0)then // "you need a pickaxe to mine this rock"



{************************************************* ******************************
function FindPick: Boolean;
By: Stupid3ooo/WT-Fakawi
Description: Finds and Attaches Pickhead. ONLY WORKS PROPERLY WHEN WIELDED
************************************************** *****************************}
function FindPick: Boolean;
var
c,XH,YH,BR:integer;
ReequipPick : Boolean;
begin
GameTab(4);
Result:=True;
if(FindBitmapSpiralTolerance(PickHandle,x,y,550,20 0,745,465,30))or
(GetColor(472,380)=0)and(GetColor(482,383)=0)then // "you need a pickaxe to mine this rock"
begin
// PerfectNorth;
GameTab(5);
Wait(1000);
if (GetColor(604,300)=65536) and (GetColor(601,298)=65536) then
begin
NoPick:=True;
writeln('Broken Pickaxe. NoPick:=True;');
GameTab(4);
Result:=False;
BR:=1+Random(5);
case BR of
1: begin TypeSend('arg'); end;
2: begin TypeSend('aarg'); end;
3: begin TypeSend('arghh'); end;
4: begin TypeSend('dam'); end;
5: begin TypeSend('sjee.'); end;
end;
Exit;
end;
GameTab(4);

Wait(2000+random(100));
if(FindBitmapSpiralTolerance(Ore,x,y,559,210,735,4 60,25))then
begin
Mouse(x,y,5,5,false);
ChooseOption(x, y, 'Drop');
end;

repeat
if not(Loggedin) then exit;
c:=c+1;
x := random(510) + 5;
y := random(330) + 5;
if(FindColorSpiral(x, y, hc1, 3, 3, 515, 338))or
(FindColorSpiral(x, y, hc2, 3, 3, 515, 338))or
(FindColorSpiral(x, y, hc3, 3, 3, 515, 338))or
(FindColorSpiral(x, y, hc4, 3, 3, 515, 338))or
(FindColorSpiral(x, y, hc5, 3, 3, 515, 338))then
begin
MMouse(x,y,2,2);
if IsUpText('Take') then begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, true);
end;
Flag;
wait(1000+random(100));
end else
if(PickUpItems)then
ItemGrab;
until((FindBitmapSpiralTolerance(PickHead,x,y,550, 200,745,465,50)) or (c>=10) );
if not (FindBitmapSpiralTolerance(PickHead,x,y,550,200,74 5,465,50)) then
begin
NoPick:=True;
Result:=False;
Exit;
end;

writeln('Found Head');
GameTab(5);
Wait(250);

if FindBitmapSpiralTolerance(PickHandle,XH,YH,560,280 ,615,322,50) then
begin
writeln('Found Handle');
Mouse(XH,YH,0,0,True); // remove the handle, if any.
ReequipPick := True;
end;

Wait(250);
GameTab(4);
Wait(250);

if(FindItemBmpTol(PickHead,50))and(FindItemBmpTol( PickHandle,50))then
begin
ClickItemBmpTol(PickHead,50,true);
wait(1000);
ClickItemBmpTol(PickHandle,50,true);
PickAxeAttached:=PickAxeAttached+1;
writeln('Attached Head & Handle');
NoPick:=False;
Result:=True;
if ((EquipPick) or (ReequipPick)) then
begin
wait(3000);
ClickItemColor(hc1,True);
end;
end;
end;
end;

I Pick Axes
10-24-2006, 10:27 PM
Oh, okay. I was using that after you told me to look in FindPick. Thanks.