SRL Archive - First Scripts

HELP(again ;P)


drawboy11

2012-02-12 17:18:54

How do I count other players on the screen(other people) I want my mining script to switch worlds if more than 3 are mining at my spot aha, thanks in advance!

mika

2012-02-12 17:20:30

try the minimap include. its something like count mmdots or something.

x[Warrior]x3500

2012-02-12 17:20:50

umm create a TPA of the white color on the MM, then according to the size of the tpa, it will determine how many ppl are around u?

PatDuffy

2012-02-12 17:21:58

I believe there is a function for this in minimap…give me a sec to look for it

E: This should work.
(*
CountDots
~~~~~~~~~

.. code-block:: pascal

function CountDots(WhatDot: String): integer;

Counts the occurance of WhatDot on the MiniMap. See `GetMiniMapDots` in
for more information.


.. note::

by Nava2

Example:

.. code-block:: pascal

WriteLn(ToStr(CountDots('yellow')) + ' NPCs present on Minimap.');

*)
function CountDots(WhatDot: String): integer;
begin
Result := Length(GetMinimapDots(WhatDot));
end;

drawboy11

2012-02-12 19:02:13

From: PatDuffy
I believe there is a function for this in minimap…give me a sec to look for it

E: This should work.
(*
CountDots
~~~~~~~~~

.. code-block:: pascal

function CountDots(WhatDot: String): integer;

Counts the occurance of WhatDot on the MiniMap. See `GetMiniMapDots` in
for more information.


.. note::

by Nava2

Example:

.. code-block:: pascal

WriteLn(ToStr(CountDots('yellow')) + ' NPCs present on Minimap.');

*)
function CountDots(WhatDot: String): integer;
begin
Result := Length(GetMinimapDots(WhatDot));
end;


Thankyou very much(:

Sin

2012-02-12 19:09:53

If you're wondering what to do,
if CountDots('players') > 3 then
hop;