SCAR Code:
program Skinner;
{
##### ## ## ###
###### /#### ##### ###
/# / / ##### ##### # ##
/ / / # ## # ## ## ##
/ / # # ## ##
## ## # # /## ### /### ######## /### ## /###
## ## # # / ### ###/ #### / ######## / ### / ## / #### /
## ## # # / ### ## ###/ ## / ###/ ## ## ###/
## ## # # ## ### ## ## ## ## ## ## ####
## ## # ## ######## ## ## ## ## ## ## ###
# ## # ## ####### ## ## ## ## ## ## ###
/ # ## ## ## ## ## ## ## ## ###
/##/ # ## #### / ## ## ## ## /# ## /### ##
/ ##### ## ######/ ### ### ## ####/ ## ### / / #### /
/ # ## ##### ### ### ## ### ## ##/ ###/
# #
##
####### /
/ ### #/ #
/ ## ## ###
## # ## #
### ##
## ### ## /## ### ### /### ### /### /## ### /###
### ### ## / ### ### ###/ #### / ###/ #### / / ### ###/ #### /
### ### ##/ / ## ## ###/ ## ###/ / ### ## ###/
### /## ## / ## ## ## ## ## ## ### ##
#/ /## ## / ## ## ## ## ## ######## ##
#/ ## ## ## ## ## ## ## ## ####### ##
# / ###### ## ## ## ## ## ## ##
/## / ## ### ## ## ## ## ## #### / ##
/ ########/ ## ### / ### / ### ### ### ### ######/ ###
/ # ##### ## ##/ ##/ ### ### ### ### ##### ###
# #
####
}
{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/Fighting.scar}
var {counters}
toll, logd, bankd, xet, killd, KillingAttempts, hidecolor, CColors: integer;
var {Colors}
CowColor: array[1..4] of integer;
const cowpatience = 20000;
const MissedColor = 16728128;
const HitColor = 192;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := ''; {3-4 letters of your name}
Players[0].Skill := 'strength'; {Fight Mode}
Players[0].Active := True; {Use player?}
Players[0].integer2 := 10;
end;
{======================================================================
Colors
=======================================================================}
procedure CowColors;
begin
CowColor[1] := 3620687;
CowColor[2] := 6975347;
CowColor[3] := 1843500;
CowColor[4] := 4941444;
hidecolor := 11185588;
end;
Function InFightAt(x, y: Integer):Boolean;
var
dx, dy: Integer;
begin
if ( FindColor(dx, dy, GreenStatusColor, x - 20, y - 10, x + 20, y + 10) or
FindColor(dx, dy, RedStatusColor, x - 20, y - 10, x + 20, y + 10) or
FindColor(dx, dy, MissedColor, x - 20, y - 10, x + 20, y + 10) or
FindColor(dx, dy, HitColor, x - 20, y - 10, x + 20, y + 10) ) then
Result:=True;
end;
{======================================================================
Checks Hp Level
=======================================================================}
function DangerRange: boolean;
begin
if (GetHp <= (4 + Random(3))) then
begin
runawaydirection('W');
wait(2500 + random(2000));
Result := True
end;
end;
{======================================================================
Get Combat Level
=======================================================================}
function getcombatlevelb: integer;
var
Curtab, i: integer;
Cmblvl: string;
begin
CurTab := getcurrenttab;
gametab(1);
Cmblvl := GetTextAtEx(671, 230, 100, StatChars, False, True, 0, 5, -1, 2, True, tr_Digits);
if (Trim(Cmblvl) = '') then
for i := 1 to 5 do
begin
Cmblvl := GetTextAtEx(671 + i, 230, 100, StatChars, False, True, 0, 5, -1, 2, True, tr_Digits);
if (Trim(Cmblvl) <> '') then Exit;
end;
if (not (Trim(Cmblvl) = '')) then
result := StrToInt(Trim(Cmblvl));
wait(500 + random(200));
gametab(Curtab);
end;
{======================================================================
Player Report
=======================================================================}
procedure PlayerReport;
var i: integer;
begin
for I := 0 to HowManyPlayers - 1 do
begin
WriteLn(Players[i].Name + ' = ' + booltostr(Players[i].Active));
WriteLn('Att ' + inttostr(Players[i].level[1]) + ', Str ' + inttostr(Players[i].level[2]) + ', Def ' + inttostr(Players[i].level[3]));
WriteLn('Cmb ' + inttostr(Players[i].integer1) + ', Hps ' + inttostr(Players[i].level[8]) + ', Pry ' + inttostr(Players[i].level[5]));
WriteLn('Worked For: ' + IntToStr(Players[i].Worked) + ' min, Killed : ' + IntToStr(Players[i].Killed) + ', Loc: ' + Players[i].loc);
WriteLn('Banked: ' + IntToStr(Players[i].Banked) + ' loads');
WriteLn('');
Writeln('================================================================');
end
end;
{======================================================================
Progress Report
=======================================================================}
procedure ProgressReport;
begin
writeln('');
WriteLn('================================================================');
WriteLn('| Me_ntals Killer |');
Writeln('================================================================');
Writeln(' Worked For ' + TimeRunning);
Writeln(' Logged In ' + InttoStr(logd));
Writeln(' Banked ' + InttoStr(bankd));
writeln(' Kills ' + InttoStr(killd));
Writeln('================================================================');
end;
{======================================================================
Introduction
=======================================================================}
procedure Introd;
begin
repeat
wait(250);
cleardebug;
xet:= xet -1;
writeln(' Me_ntals Skinner');
writeln('');
writeln(' Loading please wait');
writeln(' '+inttostr(xet));
until(xet = 0)
cleardebug;
if (xet = 0) then
writeln(' Here We ago');
writeln(' ~Mentals Skinner~');
end;
{======================================================================
Set Combat
=======================================================================}
procedure Combattype;
begin
if Players[CurrentPlayer].Skill = 'attack' then SetFightMode(1);
if Players[CurrentPlayer].Skill = 'strength' then SetFightMode(2);
if Players[CurrentPlayer].Skill = 'defence' then SetFightMode(4);
end;
{======================================================================
Attack Cows
=======================================================================}
function SlaughterCow: boolean;
begin
KillingAttempts := KillingAttempts +1
for CColors := 1 to 4 do
begin
if findcolorspiral(x, y, CowColor[CColors] , msx1, msy1, msx2, msy2)then
begin
mmouse(x, y, 3, 3);
wait(100+Random(100));
if IsUpTextMulti('tta','ow','ck C') and
not(InFightAt(x, y)) then
begin
mouse(x, y, 0, 0, true);
if (InChatMulti('alr', 'und ',' att')) then
begin
Result:=True;
Exit;
end;
if (InChatMulti('ome', 'one ',' ing')) then
begin
Result:=False;
Exit;
end else
begin
Result := True;
KillingAttempts := 0;
killd := killd + 1;
toll := toll + 1;
end;
if (KillingAttempts >= 100) then
begin
WriteLn('Too Busy World');
terminatescript;
end;
end;
end;
end;
end;
{======================================================================
Waits While Attacking Cows
=======================================================================}
Procedure patience;
var cowwait : integer;
begin
marktime(cowwait);
repeat
wait(1000+random(1000));
if (((TimeFromMark(cowwait) > ((cowpatience/2)+random((cowpatience/2))))) or (DangerRange = True)) then exit;
until (not(InFight));
end;
{======================================================================
Collects Hide
=======================================================================}
procedure CollectHide;
begin
writeln('woo')
writeln('woo')
writeln('woo')
end;
{======================================================================
Walks To bank
=======================================================================}
procedure ToBank;
begin
if (RadialWalkEx(x, y, MMCX, MMCY, 1732439, 10, 0, 360, 40)) then Mouse(x, y, 5, 5, true);
flag;
if (RadialWalkEx(x, y, MMCX, MMCY, 234, 10, 355, 5, 25)) then Mouse(x, y, 5, 5, true);
flag;
if (FindSymbol(x, y, 'tree')) then Mouse(x, y, 5, 5, true);
flag;
end;
{======================================================================
Banks Hide
=======================================================================}
procedure BankHides;
var bx, by: integer;
begin
if (FindColorTolerance(bx, by, hidecolor, MIX1, MIY1, MIX2, MIY2, 10)) then
begin
Mouse(x, y, 1, 1, false);
Wait(100 + Random(100));
ChooseOption(x, y, 'All');
bankd := bankd + 1;
CloseBank;
end;
end;
{======================================================================
Finds and Opens the Bank
=======================================================================}
procedure OpenAccount;
var BBooth, BBooth2, tolran: Integer;
begin
BBooth := BitmapFromString(116, 1, 'z78DAADCD310E84301003C02F' +
'11B2D8DE3224D9FF3FE940A01388205D712EA6B2EC883D2C4CC05' +
'50F773756667060A3415765144A31AFBE68A1631D48AEA803C58A' +
'76B33310374313A7A79E34330D9C95399F4260BEC9EDD9066AFB5' +
'F06BAFC6B57255EE4C050A39E96A4A08B508EBF59506DDF9DCCD8' +
'01D39B47676043B7F9D411D65F059AD59F3C961364E55F7E00CCD' +
'E9B3F');
BBooth2 := BitmapFromString(13, 1, 'z78DA3335333132B2302582347' +
'204626CA4AB9133108249007EAC107C');
repeat
if (findbitmaptolerancein(BBooth, x, y, msx1, msy1, msx2, msy2, tolran)) or
(findbitmaptolerancein(BBooth2, x, y, msx1, msy1, msx2, msy2, tolran)) then
begin
MMouse(x, y, 3, 3)
Wait(100 + Random(100));
tolran := tolran + 3;
if (isuptextmulti('ooth', 'ank', 'nk bo')) then
begin
mouse(x, y, 4, 4, false)
wait(100 + Random(100));
clickoption('uick', 1);
freebitmap(BBooth);
freebitmap(BBooth2);
wait(100 + Random(100));
BankHides;
end;
end;
until ((tolran >= 150) or (not (loggedin)))
if (tolran >= 150) then
begin
Players[currentplayer].loc := 'Bank Problem'
toll := players[currentplayer].integer2
end;
end;
{======================================================================
Walks to Field
=======================================================================}
procedure ToField;
begin
RadialRoadWalk(findfallyRoadColor, 230, 195, 60, 1, 1);
flag;
RadialRoadWalk(findfallyRoadColor, 195, 170, 50, 1, 1);
flag;
RadialRoadWalk(findfallyRoadColor, 190, 170, 60, 1, 1);
flag;
if (FindSymbol(x, y, 'tree')) then Mouse(x, y, 5, 5, true);
flag;
if (RadialWalkEx(x, y, MMCX, MMCY, 234, 10, 115, 90, 60)) then Mouse(x, y, 5, 5, true);
flag;
end;
{======================================================================
Determines Where we are
=======================================================================}
function WereAtBank: Boolean;
begin
if FindSymbol(x, y, 'bank') then
begin
mouse(x, y, 0, 0, true);
flag;
Players[currentplayer].loc := 'bank';
result := true
end;
end;
function WereAtCows: Boolean;
begin
if findcolortolerance(x, y, 1732439, mmx1, mmy1, mmx2, mmy2, 50) then
begin
Players[currentplayer].loc := 'field';
result := true
WriteLn('were at cows')
end;
end;
{======================================================================
Setup's
=======================================================================}
procedure SetupScript;
begin
DeclarePlayers;
CowColors;
ClearDebug;
ClearReport;
CColors := 0;
toll := 0;
bankd := 0;
killd := 0;
logd := 0;
Introd;
wait(1000);
ActivateClient;
end;
procedure SetupPlayer;
begin
logd := logd + 1;
HighestAngle;
CombatType;
SetChat('on', 1);
SetChat('friends', 2);
SetChat('off', 3);
MakeCompass('N');
end;
{======================================================================
Main Loop
=======================================================================}
begin
SetupSRL;
xet:=10;
SetupScript;
loginplayer;
repeat
if (not (LoggedIn)) then loginplayer;
SetupPlayer
repeat
if (WereAtBank = true) then Tofield;
if (WereAtCows = true) then
begin
repeat
if (SlaughterCow) then
begin
patience;
if (DangerRange = True) then break;
CollectHide;
end;
until ((InvFull))
end;
ToBank;
OpenAccount;
ToField;
until (toll >= Players[CurrentPlayer].integer2)
if (toll >= Players[CurrentPlayer].integer2) then
begin
GetAllLevels;
Players[currentplayer].integer1 := getcombatlevelb;
ProgressReport;
PlayerReport;
SRLRandomsReport;
LogOut;
NextPlayer(True);
toll := 0;
SetupPlayer;
end;
until False;
end.