Frt
2009-02-05 07:54:50
<!– BEGIN TEMPLATE: formanswers –>
Frt - SRL Member Application Form
Frt
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
PHP
Other Communitys
Sythe
How Long have You Played Runescape
2 years with breaks.
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
I've been home the last two weeks which I'v spend on learning SRL.
I already had some basic knowledge about Scar since I have used the program for other games on the internet. To explain this I've made some basic programs for Facebook applications like Pet Society and some MafiaGames on the internet (MafiaFamily).
I've currently been working on a Tut-runner but got stuck on the fighting part. Haven't had time atm to get it done (:
I've just started learning reflection and I'm hoping to master this in a couple of months.
Well, that's about all I had to say about myself. (:
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
EDIT: I have updated the code for the Chopper and added my tutRunner.
Runtime Log:
Logs cutted: 55
Runtime: 24 Minutes and 48 Seconds
Next script is my tutorial runner, which I got gut stuck at by the fighting part. Would like if you took a look at that one too.
——————————————————
<!– END TEMPLATE: formanswers –>
Frt - SRL Member Application Form
Frt
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
no
Programming Knowledge
PHP
Other Communitys
Sythe
How Long have You Played Runescape
2 years with breaks.
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
I've been home the last two weeks which I'v spend on learning SRL.
I already had some basic knowledge about Scar since I have used the program for other games on the internet. To explain this I've made some basic programs for Facebook applications like Pet Society and some MafiaGames on the internet (MafiaFamily).
I've currently been working on a Tut-runner but got stuck on the fighting part. Haven't had time atm to get it done (:
I've just started learning reflection and I'm hoping to master this in a couple of months.
Well, that's about all I had to say about myself. (:
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
EDIT: I have updated the code for the Chopper and added my tutRunner.
// Made by Frt
//
// INSTRUCTIONS:
// Stand in an area with a lot of the trees you want to cut.
// Fill in the const.
// Have your axe in the firstspot in the inventory. Don't have anything else.
// There is no Axe-finder so don't use an expensive axe since it won't find it.
// There is a safeguard against fights so you don't risk dying.
//
// Don't blaim me if you get banned using this auto!
program PowerChopper;
{.include SRL/SRL.scar}
{.include SRL/SRL/skill/woodcutting.scar}
const
YourID = ''; // SRL User
YourPW = ''; // SRL Pass
TreeColor = 4097400; // Speaks for itself.
MaxCuttingTime = 30000; // How long in ms before moving on to another tree
Chop = 'Tree'; // Tree, Oak, Willow etc.
Draynor = True; // If true, it will bank instead of drop. You have to start in Draynor bank at the first banker!
var
x,y,Inventory,Road,i,times,tp,Logs: integer;
Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Integers[0] := 300; // Amount of logs to cut.
Players[0].Active := True;
end;
Procedure AntiBan;
begin
if (not (LoggedIn)) then
Exit;
if (not (LoggedIn)) then
Exit;
case random(4) of
0: PickUpMouse;
1: RandomMovement;
2: RandomRClick;
3: case random(4) of
0: HoverSkill('Fishing', false);
1: HoverSkill('Cooking', false);
2: HoverSkill('Woodcutting', false);
3: HoverSkill('Firemaking', false);
end;
end;
end;
Function Runner(Way: Boolean): Boolean;
begin
if (not (LoggedIn)) then
Exit;
if (Draynor) then
begin
Road := 7302775;
// to Trees
if (Way = True) then
begin
begin
if (not (RadialWalk(Road, 0, 90, 70, 1, -1))) then
RunTo('N', True);
if (not (RadialWalk(Road, 0, 80, 60, 1, -1))) then
RunTo('N', True);
if (not (RadialWalk(Road, 270, 360, 40, 1, -1))) then
RunTo('W', True);
if (FindSymbol(x, y, 'dungeon')) then
begin
Mouse(x - 5, y + 5, 5, 5, true);
FFlag(5);
end;
Wait(1500+Random(500));
end;
end;
// To Bank
if (Way = False) then
begin
if (FindSymbol(x, y, 'dungeon')) then
begin
Mouse(x + 5, y - 5, 5, 5, True);
FFlag(5);
end else
Runto('W', True);
if (not (RadialWalk(Road, 0, 110, 40, 1, -1))) then
RunTo('E', True);
if (not (RadialWalk(Road, 45, 90, 30, 1, -1))) then
RunTo('S', True);
if (not (RadialWalk(Road, 120, 310, 70, 1, -1))) then
RunTo('S', True);
if (not (RadialWalk(Road, 120, 310, 70, 1, -1))) then
RunTo('S', True);
if (FindSymbol(x, y, 'bank')) then
begin
Mouse(x, y, 4, 4, True);
FFlag(5);
end else
Runto('W', True);
end;
end;
end;
procedure Drop;
var
i: Integer;
begin
if (not (LoggedIn)) then
Exit;
for i:= 2 to 28 do
begin
DropItem(i);
Wait(500+Random(500));
end;
end;
Procedure Bank;
begin
if (not (LoggedIn)) then
Exit;
Runner(False);
Wait(2500+Random(500));
i := 0;
repeat
if (FindSymbol(x, y, 'bank')) then
Mouse(x,y,1,1,true);
OpenBankFast('draynor');
Wait(500+Random(1000));
Deposit(2,28,true);
Wait(500+Random(1000));
CloseBank;
Wait(1000+Random(500));
i := i + 1;
if (i = 10) then
begin
Writeln('Could not find bank. Terminating script...');
TerminateScript;
end;
until(InvFull = False);
AntiBan;
if(FindSymbol(x,y,'bank')) then Mouse(x,y,1,1,true);
Runner(True);;
end;
Procedure ChopDrop;
begin
if (not (LoggedIn)) then
Exit;
MarkTime(tp);
if (FindColorTolerance(x, y, TreeColor, 1, 1, 515, 250, 2)) then
begin
MMouse(x , y, 1, 1);
Wait(1000+Random(500));
if (IsUpText(Chop)) then
begin
Mouse(x, y, 1, 1, False);
ChooseOption('Chop');
Repeat
FindBirdsNest;
AntiBan;
if (FindFight) then
RunAway('S', True, 1, 4000 + random(2000));
Wait(1000+Random(1000));
if (TimeFromMark(tp) > MaxCuttingTime) then
Break;
Until(Invcount = Inventory + 1);
Logs := Logs + 1;
Inventory := InvCount;
if (Inventory = 28) then
begin
if Draynor then
begin
Bank;
end else Drop;
Writeln('Logs cutted: ' + IntToStr(Logs));
Writeln('Runtime: ' + TimeRunning);
AntiBan;
end;
Wait(2000+Random(500));
end;
end;
end;
begin
SetupSRL;
ActivateClient();
ClearDebug;
Lampskill := 'woodcutting';
DeclarePlayers;
LoginPlayer;
SetAngle(True);
MakeCompass('N');
Runner(True);
repeat
ChopDrop;
until (AllPlayersInactive); // Repeats till all players are Inactive
end.Runtime Log:
Logs cutted: 55
Runtime: 24 Minutes and 48 Seconds
Next script is my tutorial runner, which I got gut stuck at by the fighting part. Would like if you took a look at that one too.
program TutRunner;
{.include SRL/SRL.scar}
{.include SRL/SRL/Misc/users.scar}
{.include SRL/SRL/skill/Smithing.scar}
{.include SRL/SRL/skill/Fighting.scar}
const
Arrow = 3585227;
ArrowMap = 2357498;
DoneBar = 10118512;
Tree = 2634566;
XpTab = 2910245;
RoadScreen = 6649727;
Fire = 7720182;
Range = 1319581;
FenceMap = 15396332;
Furnace = 2242984;
Rat = 7963523;
var
x, y, i, n, b: integer; // Misc
RoadColour: integer;
function W(Waiter:integer): Boolean;
begin
Wait(Waiter + Random(1000));
end;
function Chooser(UpText, ChooseText: string): Boolean;
begin
n := 0;
repeat
if (FindColorTolerance(x, y, Arrow, 2, 2, 500, 400, 5)) then
begin
MMouse(x, y + 20 + Random(10), 5, 5);
if (IsUpText(UpText)) then
begin
GetMousePos(x, y);
Mouse(x, y, 1, 1, False);
W(500);
if (ChooseOption(ChooseText)) then Break;
W(2000);
end;
end;
Wait(150);
n := n + 1;
until(n = 5);
W(1000);
end;
function DropMany(maxc:integer):Boolean;
begin
repeat
maxc := maxc + 1;
if (ExistsItem(maxc)) then
begin
DropItem(maxc);
W(500);
end;
until(maxc = 28);
end;
function OpenGate(name, D: string): Boolean;
begin
i := 0;
MakeCompass('N');
repeat
if (not (LoggedIn)) then Break;
if (FindColorTolerance(x, y, Arrow, 2, 2, 500, 400, 5)) then
begin
MMouse(x - 5, y + 30, 5, 5);
W(500);
if (IsUpText(name)) then
begin
Mouse(x - 5, y + 30, 5, 5, true);
W(3500);
Break;
end else
begin
MakeCompass(D);
W(1000);
end;
end;
Wait(100 + Random(100));
i := i + 1;
until(i = 20);
MakeCompass('N');
W(1000);
end;
function WalkToMap(A1, A2, A3, A4, A5:integer):Boolean;
var
a:integer;
begin
i := 0;
repeat
if (not (LoggedIn)) then Break;
if (not (RadialWalk(ArrowMap, A1, A2, A3, A4, A5))) then
begin
Wait(100+Random(100));
end else Break;
i := i + 1;
W(500);
until(i > 5);
W(1000);
end;
function FindIns:Boolean;
begin
i := 0;
Writeln('Looking for instructor to talk with...');
repeat
if (not (LoggedIn)) then Break;
if (ClickContinue(true, true)) then Break;
if (FindColorTolerance(x, y, Arrow, 2, 2, 500, 400, 5)) then
begin
MMouse(x, y+20+Random(10), 5, 5);
if (IsUpText('Talk')) then
begin
GetMousePos(x, y);
Mouse(x, y, 1, 1, true);
end;
W(1500);
end;
Wait(50+Random(50));
i := i + 1;
until(i = 5);
Writeln('Found instructor and engaged conversation!');
W(1000);
end;
function FinishTalk:Boolean;
begin
Writeln('Talking with instructor...');
i := 0;
repeat
if (not (LoggedIn)) then Exit;
if (not (ClickContinue(true, true))) then Break;
i := i + 1;
W(1000);
until(i = 15);
Writeln('Finished talking with instructor!');
W(1000);
end;
// Introducer
procedure StepOne;
begin
if (not (LoggedIn)) then Exit;
FinishTalk;
FindIns;
FinishTalk;
// Click the Option Tab
W(1000);
Mouse(674, 483, 5, 5, true);
W(2000);
FindIns;
FinishTalk;
// Walk out of door
OpenGate('Door', 'E');
Writeln('Step one complete!');
Writeln(' ');
end;
// Woodcutting/Fishing
procedure StepTwo;
begin
// Walk To next instructor
WalkToMap(90, 270, 70, 1, -1);
i := 0;
repeat
FindIns;
FinishTalk;
// Backpack
Writeln('Wieving backpack...');
Mouse(642, 185, 5, 5, true);
W(1000);
i := i + 1;
if (InvCount = 2) then Break;
until(i = 5);
// Chop Tree
Writeln('Chopping trees...');
i := 0;
repeat
if (not (LoggedIn)) then Break;
if (i = 30) then Break;
x := 240;
y := 180;
if (FindColorSpiralTolerance(x, y, Tree, 2, 2, 500, 400, 5)) then
begin
MMouse(x+5, y-30, 5, 5);
if (IsUpText('Tree')) then
begin
GetMousePos(x, y);
Mouse(x, y, 1, 1, true);
end;
W(5000);
end;
Wait(100+Random(100));
i := i + 1;
until(InvCount = 4);
W(1000);
DropMany(4);
i := 0;
// Check if leveled up.
repeat
if (not (LoggedIn)) then Break;
ClickContinue(true, true);
i := i + 1;
if (not (ClickContinue(true, true))) then Break;
until(i = 6);
W(500);
i := 0;
// Walk to empty spot and light a fire
Writeln('Lightning a fire...');
repeat
if (not (LoggedIn)) then Break;
x := 240+20;
y := 180+20;
if (FindColorSpiraltolerance(x, y, RoadScreen, 2, 2, 500, 400, 5)) then
begin
Mouse(x, y, 5, 5, true);
W(2000);
end;
MouseItem(2, true);
W(500);
MouseItem(3, true);
W(500);
i := i + 1;
if (InvCount = 3) then Break;
until(i = 30);
W(10000);
Mouse(245+Random(20), 435, 3, 3, true);
// Open XpTab
Writeln('Opening XpTab...');
Mouse(576, 187, 5, 5, true);
W(1000);
FindIns;
FinishTalk;
// Walk to fishing spot
Writeln('Walking to fishing spot...');
WalkToMap(90, 270, 60, 1, -1);
// Start fishing
writeln('Beginning to fish...');
repeat
if (not (LoggedIn)) then Break;
if (Invcount = 6) then Break;
if FindObjCustom(x, y, ['Net', 'et F', 't Fi'], [12828090, 11182231], 3) then
begin
Mouse(x, y, 5, 5, true);
i := 0;
W(8000);
i := i + 1;
end;
until(i = 20);
DropMany(6);
// Walk to empty spot and light a fire
x := 240+20;
y := 180+20;
Writeln('Lightning fire...');
repeat
if (not (LoggedIn)) then Break;
if (FindColorSpiraltolerance(x, y, RoadScreen, 2, 2, 500, 400, 5)) then
begin
Mouse(x, y, 5, 5, true);
W(2000);
end;
MouseItem(2, true);
W(500);
MouseItem(4, true);
W(500);
i := i + 1;
if (InvCount = 5) then Break;
until(i = 30);
W(10000);
Mouse(245+Random(20), 435, 3, 3, true);
W(500);
// Cook fish
i := 0;
n := 5;
Writeln('Cooking shrimps...');
repeat
if (not (LoggedIn)) then Break;
if (FindColorTolerance(x, y, ArrowMap, 530, 4, 700, 160, 5)) then Break;
if (not (ExistsItem(n))) then n := n + 1;
x := 240;
y := 180;
if (FindColorSpiralTolerance(x, y, Fire, 2, 2, 500, 400, 5)) then
begin
MouseItem(n, true);
W(1000);
Mouse(x, y, 3, 3, true);
W(2000);
end;
Wait(200+Random(100));
i := i + 1;
until(i = 10);
Mouse(245+Random(20), 435, 3, 3, true);
// Walk to gate
Writeln('Walking to gate...');
WalkToMap(180, 360, 65, 1, 1);
// Open Gate
OpenGate('ate', 'E');
Writeln('Step Two Completed!');
Writeln(' ');
W(1000);
end;
// Cook
procedure StepThree;
begin
WalkToMap(0, 360, 70, 1, 1);
OpenGate('oor', 'E');
repeat
if (InvCount = 7) then Break;
FindIns;
FinishTalk;
i := i + 1;
W(500);
until(i = 5);
i := 0;
repeat
if (InvCount = 8) then Break;
MouseItem(6, true);
W(1000);
MouseItem(7, true);
W(1000);
until(i = 5);
WalkToMap(90, 270, 50, 0, -1);
i := 0;
repeat
MouseItem(8, true);
W(1000);
MakeCompass('S');
if (FindColorTolerance(x, y, Range, 2, 2, 500, 400, 5)) then
begin
Mouse(x, y, 3, 3, true);
W(8000);
MouseItem(8, false);
W(500);
ChooseOption('rop');
W(500);
end;
i := i + 1;
if (InvCount = 7) then Break;
until(i = 6);
MakeCompass('N');
Mouse(252+Random(20), 433, 5, 5, true);
W(1000);
Mouse(742, 483, 5, 5, true);
W(1000);
WalkToMap(360, 90, 50, 1, 1);
OpenGate('oor', 'E');
Mouse(710, 483, 5, 5, true);
W(500);
Mouse(566+Random(130), 218+Random(200), 5, 5, true);
W(1000);
SetRun(true);
end;
// Quest-instructor
procedure StepFour;
begin
RoadColour := FindWaterColor;
RadialWalk(RoadColour, 270, 360, 80, 1, 1);
W(2000);
RadialWalk(RoadColour, 0, 10, 70, 1, 0);
W(2000);
RadialWalk(RoadColour, 90, 0, 70, 1, 0);
W(2000);
WalkToMap(0, 180, 70, -1, -1);
W(500);
OpenGate('oor', 'S');
WalkToMap(90, 270, 70, 1, 1);
FindIns;
FinishTalk;
Mouse(610, 186, 5, 5, true);
W(1500);
FindIns;
FinishTalk;
OpenGate('adder', 'S');
end;
// The Mine
procedure StepFive;
begin
RunAway('n', True, 3, 2000+Random(200));
WalkToMap(0, 360, 65, 1, 1);
// Talk to instructor
FindIns;
FinishTalk;
// Prospect tin
WalkToMap(0, 360, 65, 1, 1);
Chooser('Mine', 'Prospect');
W(1500);
// Prospect copper
WalkToMap(0, 360, 65, 1, 1);
Chooser('Mine', 'Prospect');
W(1500);
// Talk to instructor
repeat
if (InvCount = 8) then Break;
WalkToMap(0, 360, 60, 1, 1);
FindIns;
FinishTalk;
until(i = 5);
// Mine tin
i := 0;
repeat
if (InvCount = 9) then Break;
WalkToMap(0, 360, 60, 1, 1);
Chooser('Mine', 'Mine');
W(1500);
until(i = 5);
// Mine copper
i := 0;
repeat
if (InvCount = 10) then Break;
WalkToMap(0, 360, 60, 1, 1);
Chooser('Mine', 'Mine');
W(1500);
until(i = 5);
// Smelt Bronze bar
i := 0;
repeat
if (InvCount = 9) then Break;
WalkToMap(0, 360, 60, -1, -1);
MouseItem(9, true);
W(1000);
Chooser('urnace', 'se');
W(1500);
Mouse(233+Random(25), 432, 2, 2, true);
W(500);
i := i + 1;
until(i = 5);
i := 0;
// Talk to instructor to get hammer
repeat
if (InvCount = 10) then Break;
WalkToMap(0, 360, 65, 1, 1);
FindIns;
FinishTalk;
i := i + 1;
until(i = 5);
// Make dagger
i := 0;
repeat
WalkToMap(0, 360, 60, -1, -1);
W(500);
MouseItem(9, true);
W(500);
Chooser('Use', 'Use');
SmithItem('Dagger', '1');
W(1000);
Mouse(233+Random(25), 432, 2, 2, true);
MMouseItem(9);
i := i + 1;
if (IsUpText('ield')) then Break;
until(i = 5);
// Walk out of area
WalkToMap(0, 360, 65, -1, 0);
OpenGate('ate', 'E');
end;
// Combat
procedure StepSix;
begin
// Talk to instructor
WalkToMap(0, 360, 60, 1, 1);
FindIns;
FinishTalk;
// Gametab 6
Mouse(672, 187, 5, 5, true);
W(1000);
Mouse(611, 428, 5, 5, true);
W(1000);
// Equip Dagger
MouseItem(9, true);
W(500);
Mouse(491, 45, 3, 3, true);
// Talk to instructor
FindIns;
FinishTalk;
GameTab(4);
W(750);
// Equip Sword and shield
MouseItem(9, true);
W(500);
MouseItem(11, true);
W(1000);
// Gametab 1
Mouse(541, 183, 5, 5, true);
W(750);
// Go kill rat
b := 0;
repeat
// Enter cage
WalkToMap(0, 360, 60, 1, 1);
OpenGate('ate', 'E');
WalkToMap(0, 360, 60, 1, 1);
// Look for rat to attack
RunAway('E', True, 3, 2000+Random(200));
i := 0;
repeat
x := 240;
y := 180;
// Look and see if it's fighting
if (FindColorSpiralTolerance(x, y, Rat, 2, 2, 500, 400, 5)) AND not (IsFightAt(x, y)) then
begin
// Attack
MMouse(x, y, 3, 3);
if (IsUpText('ttack')) then Mouse(x, y, 3, 3, true);
n := 0;
if (InFight) then Break;
end;
W(250);
until(i = 10);
repeat
W(500);
if (not (InFight)) then Break;
until(n = 20);
RunAway('W', True, 3, 2000+Random(200));
MakeCompass('E');
SetAngle(False);
repeat
MMouse(Random(500), Random(400), 3, 3);
GetMousePos(x, y);
if (IsUpText('Gate')) then
begin
Mouse(x, y, 3, 3, true);
W(1000);
Break;
end;
until(false);
SetAngle(True);
MakeCompass('N');
WalkToMap(0, 360, 60, 1, 1);
FindIns;
FinishTalk;
if (InvCount = 14) then Break;
b := b + 1;
until(b = 20);
MouseItem(13, true);
W(500);
MouseItem(14, true);
W(500);
// Shoot rat
RunAway('S', True, 3, 2000+Random(200));
i := 0;
repeat
x := 240;
y := 180;
// Look and see if it's fighting
if (FindColorSpiralTolerance(x, y, Rat, 2, 2, 500, 400, 5)) AND not (IsFightAt(x, y)) then
begin
// Attack
MMouse(x, y, 3, 3);
if (IsUpText('ttack')) then Mouse(x, y, 3, 3, true);
end;
W(250);
until(i = 10);
end;
begin
ActivateClient;
ClearDebug;
SetupSRL;
SetAngle(True);
// Introducer
if (not (TabExists(11))) then StepOne;
// Woodcutting/Fishing
if (not (TabExists(2 ))) then StepTwo;
// Cook
if (not (TabExists(12))) then StepThree;
// Quest
if (not (TabExists(3 ))) then StepFour;
// Mining/Smithing
StepFive;
// Combat
StepSix;
end.——————————————————
<!– END TEMPLATE: formanswers –>