Bonfield
2007-01-23 18:12:27
Bonfield - SRL Member Application Form
Bonfield
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
Delphi, Scar, PHP
Other Communitys
Sythe, Cruels, Eliteswitch mod
How Long have You Played Runescape
5 years
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
——————————————————
Bonfield
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
Delphi, Scar, PHP
Other Communitys
Sythe, Cruels, Eliteswitch mod
How Long have You Played Runescape
5 years
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
program smelter;
{.include SRL/SRL.scar}
{.include SRL/SRL/extended/xbank.scar}
{.include SRL/SRL/extended/xsymbol.scar}
{.include SRL/SRL/Skill/Smithing.scar}
//Auto color from wizzups powerminer... i moded it. thanks wizzup
//~~~~~im not responsible if you get banned~~~~~
// ~~~~SETUP~~~~
//==============================================================================
Const furnace = 1528765; //orange part of furnace
StartPlayer = 0; // Determines who will play first
VersionNumber = 'V.1.5';
AutoColor = True; // True for autocolor...recommended.
time2 = false; //if you want start time true, if not then false
stime = 10; // 1-12am 1-12 respectivly, 1-12pm 13-24 respectivly
MSpeed = 8; //speed of the mouse...higher number slower speed, lower number higher speed
BMouse = true; //BenMouse...true or false
MySRLID = ''; // Must be a string!
MySRLPassword = ''; // Must be a string!
//==============================================================================
var
color:integer;
quest:integer;
barsmade:integer;
barmade:integer;
bar:integer;
Loads:integer;
BAmount:integer;
Barcolor:integer;
xp:integer;
BarMask:Integer;
// ~~~~set players below~~~~
//==============================================================================
Procedure DeclarePlayers;
begin
HowManyPlayers :=2; // Set Number of Players here.
NumberOfPlayers(HowManyPlayers); // Sets the Players Array Length;
CurrentPlayer:= StartPlayer; // CurrentPlayer = Array Index
Players[0].Name :='';//username
Players[0].Pass :=''; //password
Players[0].Nick :=''; //3-4 consecutive letters of your user name(NOT First letter)
Players[0].String1 :=''; //type of bar bronze,iron,steel,mith,addy,rune,gold,silver
Players[0].Skill :='smithing'; //skill to choose when you get a genie
Players[0].integer2:=10; //how many loads
Players[0].Active :=True; //are you going to use this player
Players[1].Name :='';//username
Players[1].Pass :=''; //password
Players[1].Nick :=''; //3-4 consecutive letters of your user name(NOT First letter)
Players[1].String1 :=''; //type of bar bronze,iron,steel,mith,addy,rune,gold,silver
Players[1].Skill :='smithing'; //skill to choose when you get a genie
Players[1].integer2:=10; //how many loads
Players[1].Active :=True; //are you going to use this player
end;
// dont change below if you dont know what your doing
//=============================================================================
Const
BronzeColor = 2902109;
IronColor = 6119013;
SilverColor = 11971242;
SteelColor = 9013650;
GoldColor = 1880792;
MithrilColor = 7491150;
AdamantColor = 5400146;
RuniteColor = 8023891;
procedure Time;
Var
Hour, Mins, Sec, MSec: Word;
begin
if (time2=true) then
repeat
DecodeTime(Now, Hour, Mins, Sec, MSec);
wait(1000);
until Hour>(stime-1);
wait(1000);
if (time2=false) then exit;
end;
Procedure AfterLogin;
begin
MakeCompass('w');
FTWait(3+ random(2));
MakeCompass('w');
SetChat('on',1);
SetChat('on',1);
SetChat('on',2);
SetChat('on',2);
SetChat('off',3);
SetChat('off',3);
HighestAngle;
end;
Procedure AutoRespond;//Credits to Charmz for this
Var Responce: String;
RandomReply: Integer;
begin
If(InChat('smithing')) or (InChat('smith')) or (InChat('s')) and (InChat('lvl')) or (InChat('lev')) or (InChat('level'))then
Begin
Responce:= IntToStr(GetSkillLevel('smithing'));
TypeSend(Responce);
GameTab(4);
End;
If(InChat('hi')) or (InChat('hello')) or (InChat('hey'))then
Begin
RandomReply:= random(7)+1;
Case RandomReply of
1 : Responce:= ('sup');
2 : Responce:= ('yo');
3 : Responce:= ('whats up everyone');
4 : Responce:= ('whats up');
5 : Responce:= ('allo allo');
6 : Responce:= ('wat up');
7 : Responce:= ('y0o');
8 : Responce:= ('what is up');
End;
TypeSend(Responce);
End;
If(InChat(Players[CurrentPlayer].Name)) or (InChat(Players[CurrentPlayer].Nick))then
Begin
RandomReply:= Random(7)+1;
Case RandomReply of
1 : Responce:= ('what');
2 : Responce:= ('yes');
3 : Responce:= ('what do you want');
4 : Responce:= ('me?');
5 : Responce:= ('Yah?');
6 : Responce:= ('who?');
7 : Responce:= ('wha?');
8 : Responce:= ('?');
End;
TypeSend(Responce);
End;
End;
Procedure BarAmount;
Begin
Case LowerCase(Players[CurrentPlayer].String1) Of
'bronze' : BAmount:=14;
'iron' : BAmount:=28;
'steel' : BAmount:=9;
'silver' : BAmount:=28;
'gold' : BAmount:=28;
'mith' : BAmount:=5;
'addy' : BAmount:=4;
'rune' : BAmount:=3;
End;
End;
Procedure SetColor;
Begin
Case LowerCase(Players[CurrentPlayer].String1) Of
'bronze' : BarColor:=BronzeColor;
'iron' : BarColor:=IronColor;
'steel' : BarColor:=SteelColor;
'silver' : BarColor:=SilverColor;
'gold' : BarColor:=GoldColor;
'mith' : BarColor:=MithrilColor;
'addy' : BarColor:=AdamantColor;
'rune' : BarColor:=RuniteColor;
End;
End;
Procedure Bitmaps;
Begin
Case LowerCase(Players[CurrentPlayer].String1) Of
'bronze' : Bar:=BronzeBar;
'iron' : Bar:=IronBar;
'steel' : Bar:=SteelBar;
'silver' : Bar:=SilverBar;
'gold' : Bar:=GoldBar;
'mith' : Bar:=MithrilBar;
'addy' : Bar:=AdamantBar;
'rune' : Bar:=RuniteBar;
End;
End;
Procedure AutoGetBarColors;
Begin
WriteLn('AutoColor:');
If FindColor(X, Y, BarColor, MCX1, MCY1, MCX2, MCY2) Then
BarColor := GetColor(X, Y);
WriteLn(Players[CurrentPlayer].String1+' color = '+IntToStr(BarColor));
End;
Function FindT:boolean;
Begin
repeat
if not LoggedIn then Exit;
wait(100+random(200));
Until (FindText(x, y, 'Enter amount:', UpChars, MCX1, MCY1, MCX2, MCY2)=true);
result:=true
End;
Function BarCount:boolean;
Begin
if (CountItemBmpTol(Bar,10)=BAmount) then
result:= true
end;
Function Door:boolean;
begin
if (FindColorTolerance(x,y,1394524,5,263,515,338,5) or
FindColorTolerance(x,y,603212,5,263,515,338,5) or
FindColorTolerance(x,y,2256012,5,263,515,338,5))then
MMouse(x,y,2,2);
if (IsUpTextMulti('lose','los','ose')) then
Result := True;
end;
procedure OpenDoor;
var cx,cy:integer;
begin
Status('finding door...');
MarkTime(mark);
Lowestangle;
Wait(100+random(50));
begin
if (Door) then
Writeln('door is open');
end;
if not (Door) then
repeat
if (IsUpText('Door')) then
FTWait(1);
if (IsUpText('Open')) then
Mouse(cx,cy,2,2,false);
ChooseOption(x,y,'Open');
begin
Flag;
repeat
Wait(100);
until (Door) or (TimeFromMark(mark)> 5000);
end;
Until (Door) or (TimeFromMark(mark)> 5000);
end;
procedure MyOpenBank;
begin
Status('Opening bank...');
if not (BankScreen) then
Lowestangle;
MarkTime(mark);
repeat
if (FindColorTolerance(x,y,8618883,2,70,515,178,5) or
FindColorTolerance(x,y,9079691,2,70,515,178,5))then
Wait(250);
MMouse(x,y,2,2);
Wait(250);
if (IsUpText('Bank booth')=true) then
Wait(250);
Mouse(x,y,2,2,false);
if (ChooseOption(x,y,'quickly')) then
begin
Flag;
wait(250);
InPin('5034'); //put your pin between ''
repeat
Wait(100);
until (BankScreen);
end;
until (BankScreen) or (TimeFromMark(mark)> 60000);
if TimeFromMark(Mark)> 60000 then Logout;
end;
Procedure WBronze;
begin
BankMouse(1, false);
ClickOption('X', 1);
Findt;
TypeSend('14');
BankMouse(2,false);
ClickOption('X', 1);
Findt;
TypeSend('14');
end;
Procedure WAll;
begin
BankMouse(1,false);
ClickOption('All',1);
end;
Procedure WSteel;
begin
BankMouse(1,false);
ClickOption('X',1);
Findt;
TypeSend('9');
BankMouse(2,false);
ClickOption('All',1);
end;
Procedure WMith;
begin
BankMouse(1,false);
ClickOption('X',1);
Findt;
TypeSend('5');
BankMouse(2,false);
ClickOption('All',1);
end;
Procedure WAddy;
begin
BankMouse(1,false);
ClickOption('X',1);
Findt;
TypeSend('4');
BankMouse(2,false);
ClickOption('All',1);
end;
Procedure WRune;
begin
BankMouse(1,false);
ClickOption('X',1);
Findt;
TypeSend('3');
BankMouse(2,false);
ClickOption('All',1);
end;
Procedure WithdrawOres;
var act:integer;
begin
Status('Withdrawing ores...');
Case LowerCase(Players[CurrentPlayer].String1) Of
'bronze' : act:=1;
'iron' : act:=2;
'steel' : act:=3;
'silver' : act:=2;
'gold' : act:=2;
'mith' : act:=4;
'addy' : act:=5;
'rune' : act:=6;
End;
Begin
If act=2 then WAll;
If act=1 then WBronze;
If act=3 then WSteel;
If act=4 then WMith;
If act=5 then WAddy;
If act=6 then WRune;
End;
End;
Procedure Antirandoms2;
begin
Findnormalrandoms;
FindTalk;
DwarfItem;
end;
Procedure ToBank;
begin
status('Going to bank...');
Antirandoms2;
keydown(17);
Mouse(600,95,2,2,true);
keyup(17);
Antirandoms2;
FFlag(5);
FindSymbol(x,y,'bank');
keydown(17);
Mouse(x,y,2,2,true);
keyup(17);
LowestAngle;
Antirandoms2;
Flag;
Loads:=Loads+1
ReportVars[0] := ReportVars[0]+ 1;
Players[CurrentPlayer].Integer1:=Players[CurrentPlayer].Integer1+1
Players[currentplayer].Loc:='bank'
end;
Procedure Antirandoms;
Begin
Findnormalrandoms;
FindTalk;
DwarfItem;
if(FindFight)then
begin
RunAwayDirection('S');
wait(8000+random(500));
runback;
end;
AutoRespond;
end;
Function Amount:boolean;
begin
if (FindText(x,y,'Enter amount:',UpChars,MCX1,MCY1,MCX2,MCY2)=true) then
result:=true
end;
Procedure Furn;
begin
Repeat
antirandoms;
if (FindColorRightTol(x,y,BarColor,15, 378, 494, 437,8)) then
MMouse(x-10,y,2,2);
wait(250);
if (IsUpText('melt 1')=true) then
Wait(250);
Mouse(x-10,y,2,2,false);
if (ChooseOption(x,y,'melt X')) then
begin
Flag;
FTWait(1);
repeat
Wait(100);
until (Amount);
end;
until (Amount);
TypeSend(inttostr(BAmount+1));
repeat
if not LoggedIn then Exit;
wait(1000+random(500));
antirandoms;
until (BarCount=true) or FindText(x, y, 'You have run out of',+
smallchars, MCX1, MCY1, MCX2, MCY2);
if (BarCount=true) then writeln('Found Bars');
If (FindText(x, y, 'You have run out of', smallchars, MCX1, MCY1, MCX2,+
MCY2)) then Writeln('Found Text')
end;
Procedure FindFurnace;
begin
antirandoms;
Status('Finding furnace...');
if (invfull=false) then
begin
writeln('Can''t Find Ores');
end
else
begin
Antirandoms;
repeat
if not LoggedIn then Exit;
FindMSColorTol(x,y,furnace,5);
wait(50+random(10));
MMouse(x,y,0,0);
wait(20+random(10));
until IsUpTextMulti('melt','me','lt');
begin
Mouse(x,y,0,0,true);
writeln('Found Furnace');
FTWait(2+random(1));
AntiRandoms;
end;
end;
end;
procedure whereami;
begin
quest := BitmapFromString(15, 5, 'z78DA9D90510A80201005AFB4' +
'A6D6FAB9E6DEFF4A060FEAC5524408F3213A3C46921CC7BC4B37E' +
'696347B5535DBBDF85A8781B85F4A1EE71B6FD26E7F255D273A41' +
'D8D8CF4EE6BB99B7FDE3F7CDB1093673196E023E9963672E139BB' +
'093374F7355666D');
Color:= 14312782;
if(FindMMSymbol(quest)=true) then
Players[currentplayer].Loc:='bank'
else
Players[currentplayer].Loc:='furn'
end;
procedure BankOrFurn;
begin
if ((Players[currentplayer].Loc)='bank') then
writeln('In Bank')
else
writeln('In Furnace')
end;
Procedure Bankbars;
begin
BankOrFurn;
antirandoms2;
invCount;
if (not (invcount=28)) then
begin
Status('Banking...');
MyOpenBank;
depositall;
fixbank;
Withdrawores;
end;
Players[CurrentPlayer].Banked:=Players[CurrentPlayer].Banked+1;
end;
Procedure ToFurn1;
begin
Mouse(686, 110, 2, 2, true);
FFlag(2);
FindSymbol(x, y, 'furnace');
Mouse(x, y + 10, 1, 1, true);
end;
Procedure ToFurn2;
begin
Mouse(674, 112, 2, 2, true);
FFlag(2);
Mouse(695, 99, 2 , 2, true);
FFlag(2);
FindSymbol(x, y, 'furnace');
Mouse(x, y + 10, 1, 1, true);
end;
Procedure ToFurnace;
begin
Status('Going to furnace...');
HighestAngle;
begin
case random(2) of
0: tofurn1;
1: tofurn2;
end;
antirandoms2;
FFlag(3);
writeln('In Furnace');
Players[currentplayer].Loc:='furn'
end;
end;
Procedure Rand;
begin
if (FindNormalRandoms=true) then
begin
findfurnace;
Status('Smelting...');
Furn;
begin
MakeCompass('w');
opendoor;
end;
end;
end;
Procedure Report;
Begin
Case LowerCase(Players[CurrentPlayer].String1) Of
'bronze' : ReportVars[10]:= ReportVars[10]+ 14;
'iron' : ReportVars[11]:= ReportVars[11]+ CountItemBmpTol(Bar,10);
'silver' : ReportVars[12]:= ReportVars[12]+ 28;
'steel' : ReportVars[13]:= ReportVars[13]+ 9;
'gold' : ReportVars[14]:= ReportVars[14]+ 28;
'mith' : ReportVars[15]:= ReportVars[15]+ 5;
'addy' : ReportVars[16]:= ReportVars[16]+ 4;
'rune' : ReportVars[17]:= ReportVars[17]+ 3;
End;
End;
Function Exp:integer;
Begin
Case LowerCase(Players[CurrentPlayer].String1) Of
'bronze' : xp:=91;
'iron' : xp:=12 * CountItemBmpTol(Bar,10);
'steel' : xp:=157;
'silver' : xp:=387;
'gold' : xp:=630;
'mith' : xp:=150;
'addy' : xp:=280;
'rune' : xp:=255;
End;
Begin
Result := xp;
Players[CurrentPlayer].Integer3:=Players[CurrentPlayer].Integer3 + xp;
Begin
ReportVars[3]:= ReportVars[3] + xp;
End;
End;
End;
procedure InFurnace;
begin
if (invfull=false) then
begin
Status('going to bank...');
opendoor;
end
else
begin
Status('Smelting...');
wait(200 + random (200));
Furn;
Rand;
Exp;
Report;
end;
MakeCompass('w');
Opendoor;
end;
procedure PlayerStats;
var Active: string;
var i: Integer;
begin
for i := 0 to HowManyPlayers-1 do
begin
if Players[i].Active=True then Active:='True' else Active:='False';
writeln( (inttostr(i+1))+' : '+Players[i].name+ '= '+Active+
'- Lvl: '+inttostr(Players[i].level[16])+' Loads done: '+
inttostr(Players[i].integer1)+ ' Loc: '+Players[i].loc);
end
end;
Function totalbars:integer;
begin
Case LowerCase(Players[CurrentPlayer].String1) Of
'bronze' : barsmade:=14;
'iron' : barsmade:=CountItemBmpTol(Bar,10);
'steel' : barsmade:=9;
'silver' : barsmade:=28;
'gold' : barsmade:=28;
'mith' : barsmade:=5;
'addy' : barsmade:=4
'rune' : barsmade:=3;
End;
Begin
Result := barsmade;
end;
begin
ReportVars[1] := ReportVars[1] + CountItemBmpTol(Bar,10);
BarMade:= Players[CurrentPlayer].Integer1 * BarsMade;
end;
end;
procedure ProgressReport;
begin
ClearDebug;
begin
WriteLn('<=========Progress for Smelter-'+VersionNumber+'-=========>');
Writeln(' ');
writeln('**********************************************');
writeln('Name : '+ Players[CurrentPlayer].Name);
writeln('Number : '+ inttostr(CurrentPlayer+1));
writeln('Smithing Level : '+ inttostr(Players[CurrentPlayer].Level[16]));
writeln('Done : ' + inttostr(Players[CurrentPlayer].Integer1)+' loads');
writeln('Made : ' +inttostr(barmade)+' '+(Players[CurrentPlayer].String1)+' bars');
writeln('Worked for : '+ TimeRunning);
writeln('Banked : '+ inttostr(Players[CurrentPlayer].Banked) + ' times.');
writeln('Gained Approx : '+inttostr(Players[CurrentPlayer].Integer3)+ ' exp.')
writeln('Location : '+ Players[CurrentPlayer].loc);
writeln('**********************************************');
end;
PlayerStats;
SRLRandomsReport;
end;
Procedure ClearVars;
Var
I : Integer;
Begin
For I := 1 To 19 Do
ReportVars[I] := 0;
End;
Procedure Intro;
begin
WriteLn(' __ ');
WriteLn(' __ __ (_ \');
WriteLn(' \ \/ /___ __ _ _ __ \/ ___ ');
WriteLn(' \ // __/ _` | `_ \ / __| ');
WriteLn(' / \ (_| (_| | | | | \__ \');
WriteLn(' /_/\_\___\__,_|_| |_| |___/');
Wait(1000);
WriteLn(' __ _ _ ');
WriteLn(' / _\ ___ _ __(_)_ __ | |_ ___ ');
WriteLn(' \ \ / __| ''__| | ''_ \| __/ __|');
WriteLn(' _\ \ (__| | | | |_) | |_\__ \ ');
WriteLn(' \__/\___|_| |_| .__/ \__|___/');
WriteLn(' |_| ');
Wait(1000);
WriteLn(' Brings You:');
Wait(1000);
WriteLn(' AK Smelter '+versionnumber+'');
WriteLn('')
Wait(1000);
WriteLn('Please post all Progress reports at');
WriteLn('http://www.villu-reborn.com/showthread.php?t=4915')
end;
Procedure EndReport;
begin
cleardebug;
begin
WriteLn('<=====End Progress for Smelter '+VersionNumber+'=====>');
WriteLn('Ran For: '+ timerunning)
WriteLn('Finished: '+inttostr(Loads)+' loads')
WriteLn('Made a total of: '+inttostr(barsmade)+' '+Players[CurrentPlayer].String1+' bars')
WriteLn(inttostr(HowManyPlayers)+' players played')
end;
PlayerStats;
end;
procedure Setup;
begin
SetupSRL;
ScriptID := '30';
SRLID := MySRLID;
SRLPassword := MySRLPassword;
SetUpSRLReport;
ClearDebug;
Intro;
LoadSmithingBitMaps;
ClearVars;
ReportVars[2] := 1;
MouseSpeed := (MSpeed);
BenMouse := (BMouse);
Time;
DeclarePlayers;
LoginPlayer;
Bitmaps;
SetColor;
BarAmount;
AfterLogin;
WhereAmI;
end;
////////////////////////////////Main Loop\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
begin
Setup;
repeat
if Players[CurrentPlayer].loc='furn' then
begin
MakeCompass('w')
FindFurnace;
If AutoColor Then AutoGetBarColors;
InFurnace;
ToBank;
TotalBars;
ProgressReport;
end;
if Players[CurrentPlayer].Loc='bank' then
begin
MakeCompass('w')
BankBars;
ToFurnace;
GetSkillLevel('smithing');
Players[CurrentPlayer].Level[16] :=GetSkillLevel('smithing');
TotalBars;
ProgressReport;
end;
if ((LoggedIn) and (Players[CurrentPlayer].Integer1=(Players[CurrentPlayer].Integer2))) then
begin
repeat
Wait(1000);
until(not(LoggedIn));
NextPlayer(False);
Players[CurrentPlayer].Integer1:=0
MakeCompass('w')
Whereami;
end;
If Not LoggedIn Then
Begin
NextPlayer(False);
MakeCompass('w');
SetColor;
BarAmount;
End;
until(False);
TotalBars;
EndReport;
end.
——————————————————