SRL Archive - SRL Archives

Function OtherPlayer : Boolean;


Ruroken

2007-06-30 15:24:09

I wrote this for an upcoming script. Use it if you like! :)

{*******************************************************************************
FunctionOtherPlayer : Boolean;
By: Ruroken
Description: Checks if there are any other human players on your MM.
*******************************************************************************}

Enjoy, I haven't done extensive testing but whatever :p

And as always…I love feedback :D

Bobarkinator

2007-06-30 16:45:31

You could use this I'm assuming so you wouldn't have to call a responder? Maybe, or so you could resort to hardcore autoing?

Ruroken

2007-06-30 17:03:15

Something like that :p

neG

2007-06-30 22:16:51

Doesnt Fakawi have something similar in his Ratz script?
Or maybe im just on crack, either way.
Nice work :)

Boreas

2007-06-30 23:44:55

Yea I wrote FindAllBitmapsIn, and with a lil bmp (or can be done with DTMs), you got CountMMPlayers.

Good job. Why do you have the extra Result := False;?

SKy Scripter

2007-07-01 00:00:53

lol Easy count Players XD
Havent tested this though ;)

function CountPlayers : Integer;
var
P : TPointArray;
E : Extended;
begin
FindColorsTolerance( P, 16711422, MMX1, MMY1, MMX2, MMY2, 0);
E := GetArrayLength( P ) / 7;
if (E <> Trunc( E )) then
E := E+1; // make sure you cover those pixels that only show half of the player dot
Result := Trunc( E );
end;

Pentti

2007-07-01 04:08:18

Nice, but you dont need that if(bla=##)and(bla=##) or (bla=##)and(bla=##)..
Function OtherPlayer : Boolean;
var
OtherCharacter : Integer;
begin
OtherCharacter := DTMFromString('78DA63AC656260C8664001FFFEFD03D38C503' +
'E631D916A7250D5BC79F306554D2DA61A0C73406A7251D53C7AF4' +
'08D32E3435478F1E45510300CBBB1639');
Result := FindDTM(OtherCharacter, TempX, TempY, 647, 82, 649, 84)
FreeDTM(OtherCharacter);
end;
Anyways, something like that would be useful. Like if you used autotalk, first you would make it check if there are other players near by you.

Santa_Clause

2007-07-01 05:45:18

I guess this could be used to find a free fight…

Ruroken

2007-07-01 11:14:24

@ Boreas: I don't know, thanks for pointing it out.

@ Sky: Nice, i like yours.

rkroxpunk

2007-07-01 13:26:32

un-named made one for fighting already. lol u could use this for a script in the wild :P.

Ruroken

2007-07-02 21:06:50

>.>

Why has everyone made one :p

n3ss3s

2007-07-06 07:11:17

Could someone tell me WHY ARENT PEOPLE USING COUNTCOLOR!?

btw(I have made one like 2 months ago :))

function NotAlone:boolean;
begin
if(CountColor(16711422,MMX1,MMY1,MMX2,MMY2)>1)then
result:=true;
end;

I used that for autotalking, because I dont want my scripts to chat alone or for jagex :D
if Jagex would log the text you talk alone, they could just google them and BOOOM! Find out what script they are using recognizing the arrays and text = BAN!

SKy Scripter

2007-07-08 02:39:13

Could someone tell me WHY ARENT PEOPLE USING COUNTCOLOR!?

lol, what are you talking about i use it all the time..