hey town look at this can u dbug for me? its a lot smaller i took a ton of shit out...
program cballSmelter;
{.include SRL/SRL.scar}
{.include SRL\SRL\Skill\Smithing.scar}
//************************************************************************//
const VersionNumber = '1.01';
//*************************** Variables and Constants *******************//
Var
WindowColor, WindowColor2, FurnaceCol, EnterAmount:integer;
BarExp: extended;
TextStar, N, rock, cactus, Ladder, furnacecheck, loadsdone:integer;
RespondTxt : array of string;
{****************************DO NOT TOUCH**************************************}
const{***********************DO NOT TOUCH**************************************}
RTLength = 179;{*************DO NOT TOUCH**************************************}
{****************************DO NOT TOUCH**************************************}
{*********************SET THESE CONSTANTS IF NEEDED****************************}
Const
Furnace = 0; //leave at zero for auto pick!
Bank = 0; //leave at zero for auto pick!
StartPlayer = 0; // Determines who will play first
Loads = 10; // Number of loads to do before switching players.
AmountFurnace = 2;//how many times you want to check for furnace before
//logging out and trying again.
//----------------------------------------------------------------------------//
procedure LoadBmpAndDTM;
begin
EnterAmount := BitmapFromString(44, 14, 'z78DADD964B0E802' +
'00C44AF8424445896C4FB5FC9051B9232503E25288B8969AA769E' +
'D81203397FC59D4A143D0D6AA427D8C2B59EEE27B396980681FD6' +
'42698986C7D7E874CEC0A750EFB990CF58D6E0EE9DEECBD46B010' +
'07985FCD6CC499AFC2F3938B4C1B952356A0069ED951FFAA38E00' +
'0BD300E9C527D87373868FB157380DF14FD17F2D97A0207B9DF89' +
'F8111C7AEB57E0A3CDA1B74F4EF555B1DFB13E7990AE9AECE804C' +
'E3B279B9BBFE2C099D4D586703B919EE97191BE832944F3');
TextStar := BitmapFromString(12, 11, 'z78DA73B27434B53074A2' +
'84747474B270244A0D312AE9421A0081850184A4A139469696E6A' +
'6F8751143D2D35FB47303B5C29C6A2424769049245900D09EAE6C' +
'');
rock := DTMFromString('78DA638C66626008604001D9EE8A609A11CA6' +
'70C05AAF14755737C6311AA9A58A01A6F026A12806A4250D59CDA' +
'5C8CAA261A530D86396140356104D4C463FA0BDD2E001D6C112D');
cactus := DTMFromString('78DA639CC1C4C050C280029CCBACC1342394C' +
'F3895083533816A0A08A89903545389AAE6F8C622543553885033' +
'1BA8A608BF1A00FF670F00');
ladder := DTMFromString('78DA636C64626098CE800242F539194480342' +
'310FF0702C63AA09A49986A18A06AC0740B116A5A816AA6115003' +
'72CF44026AEAB0BB19590D006E210DF7');
end;
//----------------------------------------------------------------------------//
Procedure DeclarePlayers;
begin
HowManyPlayers :=6; // Set Number of Players here.
NumberOfPlayers(HowManyPlayers); // Sets the Players Array Length;
CurrentPlayer:=StartPlayer; // CurrentPlayer = Array Index
Players[0].Name :='1108'; // your username
Players[0].Pass :='family'; // your password
Players[0].Nick :=''; // 3 or 4 letters from your username
Players[0].Loc :='Bank'; // location. put "Bank"
Players[0].Skill:='Smithing'; // skill to use if a lamp is found.
Players[0].Active:=True; // is the player active?
Players[0].String1:='cball'; // what type of bar to smelt.
Players[0].String3:='';// BANK PIN IF YOU HAVE ONE
Players[1].Name :='1108'; // your username
Players[1].Pass :='family'; // your password
Players[1].Nick :=''; // 3 or 4 letters from your username
Players[1].Loc :='Bank'; // location. put "Bank"
Players[1].Skill:='Smithing'; // skill to use if a lamp is found.
Players[1].Active:=True; // is the player active?
Players[1].String1:='cball'; // what type of bar to smelt.
Players[1].String3:='';// BANK PIN IF YOU HAVE ONE
Players[2].Name :='1108'; // your username
Players[2].Pass :='family'; // your password
Players[2].Nick :=''; // 3 or 4 letters from your username
Players[2].Loc :='Bank'; // location. put "Bank"
Players[2].Skill:='Smithing'; // skill to use if a lamp is found.
Players[2].Active:=True; // is the player active?
Players[2].String1:='cball'; // what type of bar to smelt.
Players[2].String3:='';// BANK PIN IF YOU HAVE ONE
Players[3].Name :='1108'; // your username
Players[3].Pass :='family'; // your password
Players[3].Nick :=''; // 3 or 4 letters from your username
Players[3].Loc :='Bank'; // location. put "Bank"
Players[3].Skill:='Smithing'; // skill to use if a lamp is found.
Players[3].Active:=True; // is the player active?
Players[3].String1:='cball'; // what type of bar to smelt.
Players[3].String3:='';// BANK PIN IF YOU HAVE ONE
Players[4].Name :='1108'; // your username
Players[4].Pass :='family'; // your password
Players[4].Nick :=''; // 3 or 4 letters from your username
Players[4].Loc :='Bank'; // location. put "Bank"
Players[4].Skill:='Smithing'; // skill to use if a lamp is found.
Players[4].Active:=True; // is the player active?
Players[4].String1:='cball'; // what type of bar to smelt.
Players[4].String3:='';// BANK PIN IF YOU HAVE ONE
Players[5].Name :='1108'; // your username
Players[5].Pass :='family'; // your password
Players[5].Nick :=''; // 3 or 4 letters from your username
Players[5].Loc :='Bank'; // location. put "Bank"
Players[5].Skill:='Smithing'; // skill to use if a lamp is found.
Players[5].Active:=True; // is the player active?
Players[5].String1:='cball'; // what type of bar to smelt.
Players[5].String3:='';// BANK PIN IF YOU HAVE ONE
writeln(inttostr(HowManyPlayers)+' Players');
end;
//----------------------------------------------------------------------------//
procedure WalkToFurnace4;
begin
MakeCompass('N');
Mouse(673,15,1,1,true);
WaitTillFlag;
Flag;
MakeCompass('W');
FurnaceCol:= GetSymbolColor(x,y,'Furnace');
if(findcolorspiraltolerance(x,y,1450881,MSX1,MSY1,MSX2,MSY2,2))then
begin
MMouse(x,y,3,3);
If(IsUpTextMulti('elt','urn','ace'))then
begin
Players[CurrentPlayer].loc:='Furnace';
end else
begin
Players[CurrentPlayer].loc:='Lost';
end;
end;
end;
//----------------------------------------------------------------------------//
procedure WalkToBank5;
begin
MakeCompass('W');
Mouse(588,51,2,2,true);
MakeCompass('W');
WaitTillFlag;
Flag;
end;
//----------------------------------------------------------------------------//
procedure LogAndRetry;
begin
Writeln('Couldnt find the furnace!'+chr(13)+'Coming back in about a minute.');
Mouse(650,483,2,2,true);
wait(100+random(23));
Mouse(648,375,2,2,true);
Wait(60000+random(6000));
LoginPlayer;
end;
//----------------------------------------------------------------------------//
function SmeltIt: Boolean;
begin
FurnaceCheck:=0;
repeat
begin
if(Players[CurrentPlayer].String1='cball') OR (Players[CurrentPlayer].String1='cball')then
begin
wait(50);
if(FindObj(x,y,'urn',1452174,4))then
begin
If(ExistsItem(28)) Then
begin
if(not(existsitem(28))) then
WalkToBank5;
If(IsUpText('eel')) Then
begin
repeat
MouseItem(28,true)
FindObj(x,y,'urn',1452174,4)
Mouse(x,y,3,3,true)
FindNormalRandoms;
MakeCompass('W');
Until(Not(IsUpText('eel')))
If(Not(IsUpText('eel'))) Then Result:= false
if(result=false) then
WalkToBank5;
end;
if(not(FindObj(x,y,'urn',1452174,4)))then
begin
Result:=false;
FurnaceCheck:=FurnaceCheck+1;
end;
If(FurnaceCheck=AmountFurnace) AND (Result=false)then
begin
LogAndRetry;
SmeltIt;
Exit;
end;
end;
end;
end;
//----------------------------------------------------------------------------//
procedure OpenMyBank;
Var
Tries: Integer;
BankOpen: Boolean;
Begin
WindowColor:=7829110;
WindowColor2:=7631222
Repeat
If(FindColorSpiralTolerance(x,y,WindowColor,5,5,512,334,2))or
(FindColorSpiralTolerance(x,y,WindowColor2,5,5,512,334,2))then
MMouse(x,y,2,2);
If(IsUpTextMulti('e Bank', 'Use Ba', 'ooth'))then
Begin
Mouse(x,y,2,2,false);
Wait(10+Random(50));
If(ChooseOption(x, y, 'uickly'))then
Begin
MarkTime(Mark);
Repeat
Wait(10+Random(5));
If(TimeFromMark(Mark) > 20000)then
Begin
Mouse(650,478,1,2,true);
wait(500);
Mouse(648,377,1,2,true);
End
Until(BankScreen)OR (PinScreen)
If(PinScreen)then
InPin(Players[CurrentPlayer].string3);
If(BankScreen)then
BankOpen:=true
End
End
Else
Begin
Wait(1);
Tries:= Tries + 1;
End;
Until(Tries >= 8) OR (BankOpen=true);
End;
//----------------------------------------------------------------------------//
procedure PlayerStats;
var Active: string;
var i: Integer;
begin
writeln('**********************************************');
writeln('Name : '+ Players[CurrentPlayer].Name);
writeln('Number : '+ inttostr(CurrentPlayer));
writeln('Mining Level : '+ inttostr(Players[CurrentPlayer].Level[15]));
writeln('Select Skill : '+ Players[CurrentPlayer].Skill);
writeln('Worked for : '+ inttostr(Players[CurrentPlayer].Worked)+' minutes.');
writeln('Banked : '+ inttostr(Players[CurrentPlayer].Banked) + ' times.');
if Players[CurrentPlayer].Active=True then Active:='True' else Active:='False';
writeln('Active : '+ Active);
writeln('Location : '+ Players[CurrentPlayer].loc);
writeln('**********************************************');
for i := 0 to HowManyPlayers-1 do
begin
if Players.Active=True then Active:='True' else Active:='False';
writeln( (inttostr(i))+' : '+Players.name+ ' = '+Active+'. - Lvl : '+inttostr(Players.Level[15])+
'. - B :'+inttostr(Players.Banked)+' Times.'+
' - : '+IntToStr(Players.Worked)+' mins.'+' - Loc: '+Players.loc);
end
writeln('**********************************************');
end;
//----------------------------------------------------------------------------//
procedure ProgressReport;
begin
begin
WriteLn(' ');
WriteLn('<============== -'+VersionNumber+'- Progress Report ===============>');
SRLRandomsReport;
Writeln(' ');
end;
PlayerStats;
end;
//----------------------------------------------------------------------------//
Procedure SetUp;
begin
SetupSRL;
SetupSRLSmithing;
ActivateClient;
DeclarePlayers;
If(not(LoggedIn))then LoginPlayer;
SetChat('On',1);
SetChat('Off',2);
SetChat('On',3);
FindNormalRandoms;
MakeCompass('W');
NickNameBMP:=CreateBitmapMaskFromText(Players[CurrentPlayer].Nick,UpChars);
GetAllLevels;
end;
//----------------------------------------------------------------------------//
Procedure WithdrawBmpAmmount(Bitmap, Amount : Integer); // Thanks to fawki
var
TimesChecked : Integer;
Begin
if(BankScreen)and(TimesChecked < 4)then
Begin
TimesChecked := TimesChecked+1;
if(FindBitMapToleranceIn(Bitmap, X, Y, 5, 5, 498, 323, 10))then
Begin
Wait(200+Random(300));
MMouse(X, Y, 8, 8);
wait(200);
Mouse(X, Y, 8, 8, False);
wait(200);
ClickOption('Withdraw X',1);
wait(1000);
Begin
Wait(400);
TypeSEnd(IntToStr(Amount));
Wait(400);
End;
End;
End;
End;
//----------------------------------------------------------------------------//
Procedure BarsInfo;
Begin
if(Players[CurrentPlayer].String1='cball') OR (Players[CurrentPlayer].String1='cball')then
BarExp:=25.5;
end;
//----------------------------------------------------------------------------//
procedure AmountOfOres;
begin
if(Players[CurrentPlayer].String1='cball') OR (Players[CurrentPlayer].String1='silver')then
begin
WithdrawBmpAmmount(SteelBar, 26);
end;
End;
//----------------------------------------------------------------------------//
procedure WithdrawifEmpty;
begin
if InvEmpty then
OpenMyBank;
FixBank;
AmountOfOres;
CloseBank;
end;
//----------------------------------------------------------------------------//
procedure WithdrawBars;
begin
OpenMyBank;
FixBank;
AmountOfOres;
LoadsDone:=LoadsDone+1;
end;
//----------------------------------------------------------------------------//
//----------------------------------MAIN LOOP---------------------------------//
//----------------------------------------------------------------------------//
begin
repeat
SetUp;
LoadMem;
LoadBmpAndDtm;
WalkToBank5;
WithdrawifEmpty;
Writeln(Players[CurrentPlayer].loc);
GameTab(4);
walktofurnace4;
SmeltIt;
WithdrawBars;
until(LoadsDone=Loads);
end.