Well I don't want to be a leecher, so I made two pretty handy dandy functions for srl. Unfortunately the place I am supposed to submit these isnt open to Registered users.
So I decided to place them where they will be tested and reviewed by people, so I chose here =]
Anyway please note, these are all my work, and I don't want them leeched or posted anywhere else w/o my permission. Thanks =]
This first function I don't even know if one existed. I looked but I didn't really see anything. (I didn't look that hard
). This function will return the number of Active players if any. It will return 0 if there is none and writeln that there are no more active users. I'm sure there is one out there but meh. I been learning about 'for' statements and this really put what I learned to the test.
SCAR Code:
{*******************************************************************************
function ActivePlayers: integer;
By: The[Cheese] and HyperSecret
Description: Finds out how many players are currently active. If none, then
returns zero and debugs 'All Players Inactive!'.
*******************************************************************************}
function ActivePlayers: integer;
var
i, HowManyActive: integer;
begin
HowManyActive := 0;
for i:=0 to High(Players) do
if (Players[i].active) then
Inc(HowManyActive)
else WriteLn('All Players Inactive!');
Result := HowManyActive;
WriteLn('There are ' + inttostr(HowManyActive) + ' players active.');
end;
This next one is a great little tool for mining scripts that bank. I'm almost positive there isn't one of these
. What this does is go through (using my handy dandy 'for' statements i've been learning) and check to see if a slot has an item. It will then mouse over to check if its a pick or not. If its not, then it will deposit all of that item. Basically it deposits everything but your picks.
SCAR Code:
{*******************************************************************************
procedure MinersDeposit;
By: The[Cheese]
Description: This aMaZiNg funtion will deposit everything but your picks. It
will deposit broken picks too.
*******************************************************************************}
procedure MinersDeposit;
var i: integer;
begin
for i := 1 to 28 do
begin
if(ExistsItem(i))then
begin
MMouseItem(i);
if(IsUpTextMultiCustom(['roken', 'Brok']))then
begin
GetMousePos(x, y);
Mouse(x, y, 1, 1, false);
wait(150 + Random(200));
ChooseOption('All');
wait(150 + Random(200));
end;
if not(IsUpTextMultiCustom(['pic', 'ick', 'pick', 'pickaxe', 'kaxe', 'axe'])) then
begin
GetMousePos(x, y);
Mouse(x, y, 1, 1, false);
wait(150 + Random(200));
ChooseOption('All');
wait(150 + Random(200));
end;
wait(500 + Random(250));
end;
end;
end;
Please tell me what you think, and post any errors. Thanks!
~[Cheese]