kingstun
2009-02-06 18:44:55
<!– BEGIN TEMPLATE: formanswers –>
kingstun - SRL Member Application Form
kingstun
What is the meaning to life?
I don't know. I am still young. I will learn from experience.
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
Java,PHP,HTML,VB.NET,VB6,C#
Other Communitys
RsBot,Hackerzlogicx
How Long have You Played Runescape
4 years
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
I am very new to scar scripting. Please do forgive me though, I am a fast learner. This is first banking script and there bound to be simple errors. Even though I'm a new at Scar Scripting, I can make wonderful Scripts such as this one.
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
——————————————————
<!– END TEMPLATE: formanswers –>
kingstun - SRL Member Application Form
kingstun
What is the meaning to life?
I don't know. I am still young. I will learn from experience.
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
Java,PHP,HTML,VB.NET,VB6,C#
Other Communitys
RsBot,Hackerzlogicx
How Long have You Played Runescape
4 years
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
I am very new to scar scripting. Please do forgive me though, I am a fast learner. This is first banking script and there bound to be simple errors. Even though I'm a new at Scar Scripting, I can make wonderful Scripts such as this one.
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
//---------------------------------------------------------------\\
// Draynor Willow Cutter N Banker v1.1 BETA \\
// Created by Kingstun \\
// This script is meant to be on SRL-Forums! \\
// This will script will become private if its found other sites!\\
//---------------------------------------------------------------\\
// Requirements \\
// 1.SRL Stats \\
// 2.SRL Rev #31 \\
// 3.Scar 3.15b \\
// 4.Woodcutting level higher than 30 \\
// 5.Combat level higher than 20 \\
// \\
// \\
//---------------------------------------------------------------\\
// SETUP \\
// \\
// 1.Start in Draynor Bank (Booth Closer to Wilows). \\
// 2.Have an axe equipped or in the inventory! \\
// 3.Log out from RuneScape \\
// 4.Start the Script \\
// \\
//---------------------------------------------------------------\\
// CREDITS \\
// Torrent of Flames- Great Tut on finobjTPA \\
// Tootoot222- Helped Me Fix alot of the Procedures \\
// Killerdou-Fixed the Tree Cutting Proceure \\
// Bumblee Bee-Thanks to His Walk to willow Func \\
// Pixelate- His Auto Responder \\
// \\
// If your name was not metioned here and \\
// you think you want desrved be metioned pm me! \\
// --------------------------------------------------------------\\
// FUNCTIONS \\
// 1.Draynor Willow Cutter 5.All Axes Supported \\
// 2.Fast Tree Finding 6.Broken Axe Finder \\
// 3.Anti-Ban 7.AutoResponder \\
// 4.Anti-Random 8.Multiplayer \\
// \\
//---------------------------------------------------------------\\
// VERSION HISTORY \\
// \\
// | Version | Desciption \\
// |--------------|------------------- \\
// | V1 | Intial Release \\
// |--------------|------------------- \\
// | V1.1 | Fixed Many Bugs \\
// | | \\
// \\
// \\
// \\
// \\
// \\
// \\
//---------------------------------------------------------------\\
// NOTES \\
// \\
// Post all progies! \\
// Report all bugs! \\
//---------------------------------------------------------------\\
// Please post all proggies or no updates! \\
// You may not copy this and claim it as your own work! \\
// The Sciprt Is Very fast! \\
// \\
//---------------------------------------------------------------\\
program WillowKiller;
{.include SRL/SRL/Misc/SMART.Scar}
{.include SRL/SRL.Scar}
{.include srl/srl/skill/woodcutting.scar}
var
x, y, BankDTM, Logs, Loads, Fish, nap, wclvl, logsbanked, BrokenAxe, BrokenAxes, cblvl, Responds, logsdropped, OriginalWcLvl, CurrentWcLvl, LevelUps, ExpGained :Integer;
ExpGain :Extended;
//Read the stuff on the right then fill out this!\\
const
World = 35; //World to login into Using SMART
LoadsToDo = 39; //How many loads before switching characters
SRLStatsID = ''; //Your SRL Stats ID
SRLStatsPass = ''; //Your SRL Stats Password
HowLongToSleep = 15; //How many minutes to sleep
Smart = True; //Using SMART isa MUST!!
Signed= True; //Want to use a Signed client in SMART? (Keep as False for safer autoing!!)
Responder = True; //Want use the responder?
Skill = 'Woodcutting'; //Choose a skill to level up from the lamp random (Skill must be perfectly spelled with the first letter as a capital)
procedure DeclarePlayers;
begin
HowManyPlayers := 1; //Change this to number players you got
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; // Enter your Username here
Players[0].Pass := ''; // Enter your password here
Players[0].Nick := ''; // Enter 3 - 4 letters from your username here
Players[0].Active := True;
{
Players[1].Name := '';
Players[1].Pass := '';
Players[1].Nick := '';
Players[1].Active := True;
Players[2].Name := '';
Players[2].Pass := '';
Players[2].Nick := '';
Players[2].Active := True;
}
end;
//-------------------------------DO NOT TOUCH ANYTHING BELOW THIS!----------------------------\\
procedure AntiBannage;
begin
case Random(30) of
0 : MMouse(0, 0, 700, 500);
1 : begin
Hoverskill('Woodcutting', false);
wait(3500 + Random(1000));
Hoverskill('Mining', false);
end;
2 : BoredHuman;
3 : RandomMovement;
4 : PickupMouse;
5 : begin
GameTab(random(10));
wait(3500 + Random(1000));
GameTab(4);
end;
end;
end;
procedure BrokenAxeDTM;
begin
BrokenAxe := DTMFromString('78DA636C616260E0636440061D697C601A26C' +
'AD80354C38FAA06260B57D30754C34D404D2F508D080135CD4035' +
'5C04D4D400D5A8E05703008C0604B4');
end;
//Very Important Do Not Touch-Script Wont Cut Trees\\
function FindObjTPAKing(var x, y: integer; colors : array of integer; tol, cts, ObjWidth, ObjHeight, minCount :Integer; UpText: tstringarray): Boolean;
var
I, j, tcts: Integer;
myPoint: TPoint;
Points, TempPoints: TPointArray;
aPoints: T2DPointArray;
s: string;
begin
tcts := GetColorToleranceSpeed;
SetLength(Points, 0);
if CTS * 9 mod 3 <> 0 then
CTS := 1;
ColorToleranceSpeed(cts);
For I := 0 to High(colors) do //Loop through the colors array
begin
FindColorsSpiralTolerance(x, y, TempPoints, Colors[I], MSX1, MSY1, MSX2, MSY2, Tol);//Check for the current color
Points := CombineTPA(Points, TempPoints); //Add the different results together
end;
aPoints := TPAtoATPAEx(Points, ObjWidth, ObjHeight);
SetLength(Points, 0);
for I := 0 to Length(aPoints) - 1 do
begin
if Length(aPoints[I]) < minCount then
Continue;
myPoint := MiddleTPA(aPoints[I]);
MMouse(myPoint.X, myPoint.Y, 0, 0);
Wait(100 + Random(50));
ColorToleranceSpeed(1);
s := rs_getuptext;
for j := 0 to high(uptext) do
if pos(uptext[j], s) <> 0 then
begin
x := myPoint.X;
y := myPoint.Y;
Result := True;
ColorToleranceSpeed(tcts);
Exit;
end;
ColorToleranceSpeed(cts);
end;
ColorToleranceSpeed(tcts);
end;
{*******************************************************************************
procedure NextPlayer2(Active: Boolean);
By: Dankness and modified by Ron and by Raymond and Tootoot222
Description: Logs in the next player.
Boolean: True - Current player is ok. False - Current player is false.
Doesn't go into an infinate loop when all players are false
*******************************************************************************}
procedure NextPlayer2(Active: Boolean);
begin
if RandomPlayer then
RandomNextPlayer(Active)
else
begin
WriteLn('NextPlayer2(Active: ' + BoolToStr(Active)+ ');');
Players[CurrentPlayer].Active := Active;
Logout;
PlayerCurTime := (GetSystemTime div 1000);
Players[CurrentPlayer].Worked := Players[CurrentPlayer].Worked +
((PlayerCurTime - PlayerStartTime) / 60);
if(AllPlayersInactive) then
Exit;
CurrentPlayer := (CurrentPlayer + 1) mod Length(Players);
while Players[CurrentPlayer].Active = False do
CurrentPlayer := (CurrentPlayer + 1) mod Length(Players);
SRL_Logs := SRL_Logs + 1;
LoginPlayer;
end;
end;
//Anti-Random\\
procedure AntiRandoms;
begin
FindNormalRandoms;
If(FindFight) Then
begin
SetRun(True);
RunAway('N', True, 1, 15000 + random(5000));
end;
if (FindEnt(x, y, True)) then
begin
Mouse(MMCX + 3, MMCY - 4, 3, 3, true);
wait(1000);
repeat
wait(100+random(100));
FindNormalRandoms;
until not (FindEnt(x, y, True))
end;
LampSkill := skill;
end;
//DTMS\\
procedure LoadTheDTM;
begin
AntiRandoms;
AntiBannage;
Logs := DTMFromString('78DA63E4636460D8C68001FE0331238806024' +
'61E206B2DBA0A462412484B00595B09A8E105B2F61350C30464ED' +
'23A006C4DA825F0D00CBD5099D');
BrokenAxe := DTMFromString('78DA636C616260E0636440061D697C601A26C' +
'AD80354C38FAA06260B57D30754C34D404D2F508D080135CD4035' +
'5C04D4D400D5A8E05703008C0604B4');
BankDTM := DTMFromString('78DA63AC616260A8604001D70FB2836946289' +
'F11A4A61855CDCCC99AA86A9A806AAA50D5ACD8B80CD39C5A0276' +
'9501D594A1AA61646444510300A6510B6E');
Fish := DTMFromString('78DA63EC676260F0644001B2A5FF198C80342' +
'310FF0702C60940358EA86AF8D8B8C1342394CF3805D31C798FC7' +
'A86ABA895003728F0FAA9AB54B57A2A80100FF6A0EB7');
end;
//Auto-Responder (Pixelate)\\
procedure Responses;
var
text: string;
begin
if not LoggedIn then Exit;
if(Responder)then
begin
if(not GetLastChatText(text))then
begin
//Writeln('Error while getting chat text. No-one is talking?');
end else
begin
//Writeln('Chat text: ' + text);
if(InChat('bot') and InChat(Players[CurrentPlayer].Nick))then
begin
case Random(4) of
0: TypeSend('Me?');
1: TypeSend('I''m not a bot!');
2: TypeSend('Your a newb');
3: TypeSend('Huh?');
end;
Responds := Responds +1;
end;
if(text = 'wc lvls?') or (text = 'woodcut lvls?') or (text = 'wc?') or (text = 'woocutting levels?')then
begin
SayCurrentLevels('Woodcutting');
end;
end;
end;
if(Responder)then
begin
case Random(40) of
0: TypeSend('Runescape rox');
1: TypeSend('Im watching tv and playing rs at the same time');
2: Typesend('woodcut lvls?');
3: Typesend('I got my wc lvl to' + IntToStr(CurrentWcLvl) + '.');
4: Typesend('Hi!');
5: Typesend('attck,str,def lvls?');
6: Typesend('Old runescape was better than this.....');
7: Typesend('Wcing is boring')
end;
end;
end;
//BrokenAxe Finder\\
Procedure IsAxeBroken;
begin
if FindDTM(BrokenAxe, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
BrokenAxes := BrokenAxes +1;
Writeln('The axe was broken.The script will change players!');
LogOut;
NextPlayer2(False);
Exit;
FreeDTM(BrokenAxe);
end;
end;
procedure proggy;
begin
ClearDebug;
Writeln('***************Draynor Willow Cutter N Banker v1****************')
Writeln('|The script has been running for ' + TimeRunning + '. ');
Writeln('|Logs dropped: ' + IntToStr(LogsDropped) + '');
Writeln('|Starting Wc Lvl: ' + InttoStr(OriginalWcLvl) +'');
Writeln('|Current Wc Lvl: ' + IntToStr(CurrentWcLvl) + '');
Writeln('|Axes Broken:' + InttoStr(BrokenAxes) + '');
Writeln('|' + IntToStr(Loads) + ' loads done so far!');
Writeln('*************************************************');
end;
///Tree Finder\\
procedure WillowCutter;
var
A : Integer;
begin
MakeCompass('N');
if (not LoggedIn) then
Exit;
MouseSpeed := RandomRange(13, 16);
if FindObjTPA(x, y, 4876128, 30, 2, 15, 25, 10, ['illo', 'illow', 'llow']) then
begin
repeat
FindObjTPA(x, y, 1452838, 30, 2, 15, 25, 10, ['illo', 'illow', 'llow'])
Wait(100 + Random(300));
MMouse(x, y, 2, 2);
begin
Wait(100 + Random(200));
GetMousePos(x, y);
FindEnt(x, y, True);
Wait(100 + Random(200));
case Random(2) of
0 : begin
Mouse(x, y, 4, 4, False);
Wait(100 + Random(200));
ChooseOption('hop');
WriteLn('Chopping Tree Using R Click.');
GetMousePos(x, y);
end;
1 : begin
Mouse(x, y, 4, 4, True);
WriteLn('Chopping Tree Using L Click.');
GetMousePos(x, y);
end;
end
Wait(2000 + Random(400));
FindObjTPA(x, y, 2372909, 30, 2, 15, 25, 10, ['illo', 'illow', 'llow'])
MMouse(x, y, 2, 2);
FindObjTPA(x, y, 6193521, 30, 2, 15, 25, 10, ['illo', 'illow', 'llow'])
AntiRandoms;
AntiBannage;
if not (LoggedIn) then
NextPlayer2(False);
LoginPlayer;
end;
until Invfull or not FindObjTPA(x, y, 3755332, 30, 2, 15, 25, 10, ['illo', 'illow', 'llow']);
if Invfull then
begin
AntiRandoms;
end;
while (not FindObjTPA(x, y, 3234376, 30, 2, 15, 25, 10, ['illo', 'illow', 'llow'])) do
repeat
MakeCompass('S');
Wait(3000 + Random(1500));
if (not FindObjTPA(x, y, 2378043, 30, 2, 15, 25, 10, ['illo', 'illow', 'llow'])) then
MakeCompass('N');
Wait(3000 + Random(1500));
if (not FindObjTPA(x, y, 2372909, 30, 2, 15, 25, 10, ['illo', 'illow', 'llow'])) then
Inc(A);
until FindObjTPA(x, y, 3234376, 30, 2, 15, 25, 10, ['illo', 'illow', 'llow']) or (A = 4);
if (A = 4) then
begin
Writeln('Trees werent found switching players!');
Proggy;
NextPlayer2(False);
LoginPlayer;
end;
end;
end;
procedure sleepp;
begin
if(not(LoggedIn)) then
Exit;
if(TimeFromMark(nap) > HowLongToSleep * 60000) then
begin
logout;
sleep(15 * 60000 + random(15 * 60000));
loginplayer;
Marktime(nap);
end;
end;
function WalkToWillows: Boolean;
var
Bank1Angle: Extended;
x, y, i: Integer;
begin
MakeCompass('N');
AntiRandoms;
LoadTheDTM;
wait(500+random(250));
begin
repeat
inc(i);
if FindDTMRotated(Fish, X, Y, MMX1, MMY1, MMX2, MMY2, -pi, pi, 0.1,
Bank1Angle) then
begin
Mouse(x - 4, y, 2, 4, true);
Flag;
Writeln('Walked to Willows!!');
AntiRandoms;
Result := True;
Exit;
end;
until (result) or (I >= 5);
if not (result) then
if FindSymbol(x, y, 'fish') then
begin
mouse(x , y, 2, 2, true);
FFlag(2);
Writeln('Walked to Willows!');
Result := True;
end
else
begin
Result := False;
Writeln('Could Not Find Willows! Switching Players!');
if not (Result) then
begin
Players[CurrentPlayer].Active := False;
LogOut;
NextPlayer(Players[CurrentPlayer].Active);
if (PlayersActive) = 0 then
begin
NextPlayer2(False);
end;
end;
end;
FreeDTM(Fish);
end;
end;
function WalkToBank: Boolean;
var
Bank1Angle: Extended;
x, y, i: Integer;
begin
MakeCompass('N');
AntiRandoms;
LoadTheDTM;
wait(500+random(250));
begin
repeat
inc(i);
if FindDTMRotated(BankDTM, X, Y, MMX1, MMY1, MMX2, MMY2, -pi, pi, 0.1,
Bank1Angle) then
begin
Mouse(x - 4, y, 2, 4, true);
Flag;
Writeln('Walked to Bank!');
AntiRandoms;
Result := True;
Exit;
end;
until (result) or (I >= 5);
if not (result) then
if FindSymbol(x, y, 'bank') then
begin
mouse(x , y, 2, 2, true);
FFlag(2);
Writeln('Walked to Bank!');
Result := True;
end
else
begin
Result := False;
Writeln('Could Not Find Bank! Switching Players!');
if not (Result) then
begin
Players[CurrentPlayer].Active := False;
LogOut;
NextPlayer(Players[CurrentPlayer].Active);
if (PlayersActive) = 0 then
begin
NextPlayer2(False);
end;
end;
end;
FreeDTM(BankDTM);
end;
end;
function Banking: Boolean;
begin
begin
AntiRandoms;
MakeCompass('S');
begin
Wait(350 + Random(500));
Writeln('Banking Load');
OpenBankfast('db');
Flag;
wait(500 + random(500));
if (BankScreen) or (PinScreen) then
begin
if (PinScreen) then
begin
InPin(IntToStr(Players[CurrentPlayer].Integers[1]));
Wait(600 + Random(100));
end;
if (BankScreen) then
begin
Deposit(2, 28, true);
end;
begin
CloseBank;
Wait(250 + random(150));
MakeCompass('S');
AntiRandoms;
LogsBanked := logsbanked + 28;
Loads := Loads + 1;
Result := True;
Players[CurrentPlayer].Integers[10] := Players[CurrentPlayer].Integers[10]
+ 1;
Players[CurrentPlayer].Integers[11] := Players[CurrentPlayer].Integers[11]
+ 1;
wait(600 + Random(100));
end;
end;
end;
end;
end;
procedure GetCBLevel;
begin
GameTab(1);
cblvl := GetCombatLevel;
if(cblvl<19) then
begin
writeln('Your combat level is less than 20!Please get your combat to 20+ before you use this script!');
Logout;
NextPlayer2(False);
Exit;
end;
end;
procedure GetOriginalWcLevel;
begin
GameTab(2);
OriginalWcLvl := GetSkillLevel('Woodcutting');
if(wclvl<29) then
begin
writeln('Your woodcutting level is not high enough to chop willows. Get it up to 30 then you can use this script.');
Logout;
NextPlayer2(False);
Exit;
end;
end;
procedure GetCurrentWcLevel;
begin
GameTab(2);
CurrentWcLvl := GetSkillLevel('Woodcutting');
end;
Procedure HowManyLevelsGained;
begin
GetCurrentWcLevel;
LevelUps := CurrentWcLvl - OriginalWcLvl;
ExpGain := LogsDropped * 67.5;
ExpGained := Round(ExpGain);
end;
procedure FinalProggy;
begin
proggy;
Writeln('|You have leveled up ' + IntToStr(LevelUps) + ' |');
end;
procedure SmartStart;
begin
SmartSetupEx(World, false, Signed, false);
Settargetdc(smartgetdc);
repeat
wait(100);
until(SmartGetColor(253, 233)<>1118604);
end;
procedure MainLoop;
begin
MouseSpeed := 16;
SmartStart;
ScriptID := '1176';
SRLID := SRLStatsID;
SRLPassword := SRLStatsPass;
ActivateClient;
DeclarePlayers;
repeat
if not loggedin then Loginplayer;
SetAngle(True);
MarkTime(nap);
GetCBLevel;
GetCurrentWcLevel;
Loads := 0;
repeat
WalkToWillows;
WillowCutter;
Responses;
WalkToBank;
Banking;
ReportVars[0] := LogsBanked;
ReportVars[1] := ExpGained;
ReportVars[2] := Loads;
ReportVars[3] := LevelUps;
SRLRandomsReport;
sleepp;
GetCurrentWcLevel;
proggy;
AntiRandoms;
until Loads > LoadsToDo;
NextPlayer2(True);
until(AllPlayersinactive)
FinalProggy;
SRLRandomsReport;
Writeln('Thank you for using Draynor Willow Cutter N Banker made by Kingstun.');
Writeln('Please post proggress reports on the thread for updates.');
end;
begin
SetupSRL;
MainLoop;
end.
——————————————————
<!– END TEMPLATE: formanswers –>