how do i convert MMPoints to MSPoints usingthen usingSCAR Code:RAaSTPAExSCAR Code:MMTOMS
how do i convert MMPoints to MSPoints usingthen usingSCAR Code:RAaSTPAExSCAR Code:MMTOMS
Do you have some sort of a object finding function that returns a TPA?
Scripts: Varrock Smither! | Fight Caves Runner! | Kebab Buyer! | L.A.M.E. (Outdated)
Tutorials: SRL user-defined procedures | JaGex UID files | Printing your scripts
Applications: StartUp Notepad | SCAR Assistant
Misc: FREE Delphi 7 v2 | Official SRL Graphics
yes, but doesn't this work :Code:RAaSTPAEx(TPA, 6, 9); For I := 0 To HIGH(TPA) DO MMToMS(TPA[I]);
.. well, could I see it?
Scripts: Varrock Smither! | Fight Caves Runner! | Kebab Buyer! | L.A.M.E. (Outdated)
Tutorials: SRL user-defined procedures | JaGex UID files | Printing your scripts
Applications: StartUp Notepad | SCAR Assistant
Misc: FREE Delphi 7 v2 | Official SRL Graphics
um its not complete but ill tell u the general idea i search for colors in mm then do RAaSTPAEx and then like the edit above then move mouse over these points
EDIT :> NVM I won't be using this but i got this procedurebut it moves mouse in mm can u tell me y?Code:Procedure Mining; Var TPA: TPointArray; I: Integer; x, y: Integer; Begin FindColorsPie(TPA, 4608851, 20, 0, 360, 0, 30, MMX1, MMY1, MMX2, MMY2, MMCX, MMCY); RAaSTPAEx(TPA, 6, 9); For I := 0 To HIGH(TPA) DO Begin MMToMS(TPA[I]); MMouse(TPA[I].x, TPA[I].Y, 6, 6); GetMousePos(x, y); If IsUptext('ine') Then Mouse(x - 5, y - 5, 5, 5, True); End; End;
Last edited by hackncrack1; 08-09-2009 at 12:22 AM.
MMToMS is a TPoint data type, Hence one must be assigned to it, try this:
SCAR Code:Procedure Mining;
Var
TPA: TPointArray;
I: Integer;
x, y: Integer;
Tp : TPoint;
Begin
FindColorsPie(TPA, 4608851, 20, 0, 360, 0, 30, MMX1, MMY1, MMX2, MMY2, MMCX, MMCY);
RAaSTPAEx(TPA, 6, 9);
For I := 0 To HIGH(TPA) DO
Begin
TP := MMToMS(TPA[i]);
MMouse(TP.x, TP.Y, 6, 6);
GetMousePos(x, y);
If IsUptext('ine') Then
Mouse(x - 5, y - 5, 5, 5, True);
End;
End;
Hope that resolved your question. Apologies for not being able to help you, but I was on my mobile![]()
Ah, sorry, though I'd implement it in your function.
Anyway, made something that does what you want, take a look:
SCAR Code:{.include SRL/SRL.scar}
// WhatDot can be 'npc', 'cape','item', 'player' or 'friend'.
function FindObjectThroughMM(WhatDot, ObjectUpText: string): Boolean;
var
TPA: TPointArray;
P: TPoint;
I, Hi: Integer;
begin
Result := False;
if (not LoggedIn) then exit;
TPA := GetMiniMapDots(WhatDot);
Hi := High(TPA);
for I := 0 to Hi do
begin
P := MMToMS(TPA[I]);
MMouse(P.X, P.Y, 5, 5);
if WaitUptext(ObjectUpText, 375) then
begin
Result := True;
GetMousePos(P.X, P.Y);
Mouse(P.X, P.Y, 0, 0, True);
Exit;
end;
end;
end;
begin
end.
Haven't tested this, but it should work.
Enjoy
E: BAH, why do I get ninja'd every time ..?
I'm too slow. =__=
Still, Naum -- you should use GetMiniMapDots instead.
Last edited by EvilChicken!; 08-09-2009 at 12:49 AM.
Scripts: Varrock Smither! | Fight Caves Runner! | Kebab Buyer! | L.A.M.E. (Outdated)
Tutorials: SRL user-defined procedures | JaGex UID files | Printing your scripts
Applications: StartUp Notepad | SCAR Assistant
Misc: FREE Delphi 7 v2 | Official SRL Graphics
Naum it worked thank you Evil chicken i appreciate ur help but i was looking for a rock ur function wouldn't help me but thanks all the same=)
why doesnt the mouse even move?:SSCAR Code:Procedure Mining;
Var
TPA: TPointArray;
ATPA: T2DPOintARRAY;
i:integer;
TP, NP : TPoint;
Begin
FindColorsPie(TPA, 4608851, 20, 0, 360, 0, 30, MMX1, MMY1, MMX2, MMY2, MMCX, MMCY);
ATPA := TPATOATPA(TPA, 4);
FOR I := 0 To High(ATPA) DO
Begin
TP := MiddleTPA(ATPA[I]);
NP:= MMToMS(Point(TP.x, TP.y));
MMouse(NP.x, NP.y , 0, 0);
IF IsUptext('ine') then
Writeln(' Rock Found');
Wait(1000);
End;
End;
Try cutting out the middle man of 'TP'
SCAR Code:Procedure Mining;
Var
TPA: TPointArray;
ATPA: T2DPOintARRAY;
i:integer;
NP : TPoint;
Begin
FindColorsPie(TPA, 4608851, 20, 0, 360, 0, 30, MMX1, MMY1, MMX2, MMY2, MMCX, MMCY);
ATPA := TPATOATPA(TPA, 4);
FOR I := 0 To High(ATPA) DO
Begin
NP:= MMToMS(MiddleTPA(ATPA[I]));
MMouse(NP.x, NP.y , 0, 0);
IF IsUptext('ine') then
Writeln(' Rock Found');
Wait(1000);
End;
End;
If that won't work then come on msn.
There are currently 1 users browsing this thread. (0 members and 1 guests)