Zach1188
2007-11-09 21:27:53
<!– BEGIN TEMPLATE: formanswers –>
Zach1188 - SRL Member Application Form
Zach1188
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
yes
Talk from the moparisthebest community
Programming Knowledge
VB6 and some Java and C++
Other Communitys
Kaitnieks (back in the day), Moparisthebest
How Long have You Played Runescape
Approx. 3 years
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
At age 13 I decided I would attempt learning SCAR, I did so however I was not the greatest scripter. From there I branched off and decided I wanted to learn a "real" programming language. I wanted to learn C++, however I did not feel I was ready to do so. So I learned VB6, and became a fairly good programmer in general. Somewhere along the road I eventually decided to give C++ a shot. I have now been learning and practicing C++ for the last 7 months, and although I am not even close to "fluent" in C++, I have gained a lot of general programming experience. About 2 months (2 years later) ago I decided I would come back to SCAR, so I learned the basics of SRL. And here I am.
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
Credits go to pwnaz0r for his "FindAxe2" procedure.
Btw, I'm slightly confused. When I try to attach a script, it says I do not have permission.
——————————————————
<!– END TEMPLATE: formanswers –>
Zach1188 - SRL Member Application Form
Zach1188
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
yes
Talk from the moparisthebest community
Programming Knowledge
VB6 and some Java and C++
Other Communitys
Kaitnieks (back in the day), Moparisthebest
How Long have You Played Runescape
Approx. 3 years
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
At age 13 I decided I would attempt learning SCAR, I did so however I was not the greatest scripter. From there I branched off and decided I wanted to learn a "real" programming language. I wanted to learn C++, however I did not feel I was ready to do so. So I learned VB6, and became a fairly good programmer in general. Somewhere along the road I eventually decided to give C++ a shot. I have now been learning and practicing C++ for the last 7 months, and although I am not even close to "fluent" in C++, I have gained a lot of general programming experience. About 2 months (2 years later) ago I decided I would come back to SCAR, so I learned the basics of SRL. And here I am.
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
Credits go to pwnaz0r for his "FindAxe2" procedure.
Btw, I'm slightly confused. When I try to attach a script, it says I do not have permission.
program Edgville_Yew_Banker;
{.include SRL\SRL.scar}
{.include SRL\SRL\skill\WoodCutting.scar}
const
TreeColor = 1865575; //Works for me, only change if necessary
TreeTol = 4; //Tree tolerance. If you don't know what this means, procede to press Alt - F4
BankIconColor = 0; //Lightest color on bank icon. 0 for autocolor
TreeIconColor = 0; //Lightest color on tree icon. 0 for autocolor
MaxLoads = 5; //(COMING SOON, currently does nothing) how many loads per player
var
x, y, FreeInv, YewsBanked, Loads, AxeMask:integer;
CurrentTree, i, BankMMColor, TreeMMColor:integer;
TreePTS: TPointArray;
First: boolean;
procedure DeclarePlayers;
begin
Disguise('Norton Anti-Virus');
//No multiplayer yet!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
HowManyPlayers:=1; //How many players in army?
NumberOfPlayers(HowManyPlayers); //Don't change
CurrentPlayer := 0; //Don't change
Players[0].Name :='Runescape'; //Your username
Players[0].Pass :='password'; //Your password
Players[0].Nick :='esca'; //3 - 4 letters of username. ie "Runescape" could be "esca"
Players[0].Active := True; //Is the Player used?
//You can uncomment the following to add more players.
//If adding more than 3 be sure to number them accordingly.
{
Players[1].Name :='Runescape';
Players[1].Pass :='password';
Players[1].Nick :='esca';
Players[1].Active := True;
Players[2].Name :='Runescape';
Players[2].Pass :='password';
Players[2].Nick :='esca';
Players[2].Active := True;
}
writeln(inttostr(HowManyPlayers)+' Players');
end;
procedure Report;
begin
writeLn(' ///////////////YewBanker by Zach1188\\\\\\\\\\\\\\\\\ ');
writeLn('// \\');
writeLn(' Yews Chopped: ' + IntToStr(YewsBanked) + '. Loads: ' + IntToStr(Loads) + ' with ' +
IntToStr(28 - (FreeInv - 1)) + ' logs each.');
writeLn(' Ran for ' + TimeRunning + ' ');
writeLn(' Last player: ' + Players[CurrentPlayer].Name + ' ');
writeLn('\\ //');
writeLn(' \\\\\\\\\\\\\------------------------//////////////// ');
end;
procedure EndAuto(Reason: string; DebugImage: boolean);
var x, y: integer;
begin
If DebugImage then
begin
SaveScreenshot('PowerChopperDebug.bmp');
GetClientDimensions(x, y);
DisplayDebugImgWindow(x, y);
LoadDebugBitmap('PowerChopperDebug.bmp');
end;
if LoggedIn then LogOut;
Report;
writeLn('Failed on player ' + Players[CurrentPlayer].Name);
writeLn(Reason);
if CurrentPlayer >= HowManyPlayers - 1 then TerminateScript;
end;
Procedure MoveSouth;
begin
If FindColor(x, y, BankMMColor, 545, 8, 727, 163) then
begin
writeLn('Tree icon not found, moving south.');
Mouse(x, y + 25 + Random(5), 3 - Random(2), 1, true);
Flag;
end else
begin
EndAuto('Cannot find bank or tree icon. Script terminated.', true);
end;
end;
Procedure GetIconColors;
begin
If BankMMColor = 0 then
begin
repeat
wait(100 + Random(100));
until(FindSymbol(x, y, 'bank'))
BankMMColor:= GetColor(x + 1, y);
writeLn('Bank color = ' + IntToStr(BankMMColor));
end;
If TreeMMColor = 0 then
begin
If FindSymbol(x, y, 'tree') then
begin
TreeMMColor:= GetColor(x, y);
writeLn('Tree color = ' + IntToStr(TreeMMColor));
end else
begin
MoveSouth;
GetIconColors;
exit;
end;
end;
end;
Procedure SetupEYB;
begin
AxeMask := BitmapFromString(9, 8, 'beNpjYMAK/v//z8CAT+o/GODShV' +
'U7LllcXFyG4HEbAgAAvvom2g==');
if not LoggedIn then LoginPlayer;
SetScreenName(Players[CurrentPlayer].Nick);
ArrangeInv;
MakeCompass('N');
HighestAngle;
TreeMMColor:= TreeIconColor;
BankMMColor:= BankIconColor;
ClearDebug;
ClearReport;
FreeInv:= InvCount + 1;
writeLn('First free inventory slot: ' + IntToStr(FreeInv));
GetIconColors;
end;
Function AvoidFight: boolean;
begin
if FindFight then
begin
Result:= True;
MakeCompass('N');
RunTo('E', False);
end;
end;
function FindAxe2: boolean;
var
ax, ay, i: integer;
begin
if not Loggedin then exit;
for i:= 4 to 5 do
begin
Gametab(i);
Sleep(600);
if FindBitmapMaskTolerance(AxeMask, ax, ay, 546, 203, 737, 466, 5, 5)then
begin
result:= true;
Gametab(4);
exit;
end;
end;
result:= false;
Writeln('Could not find axe!');
end;
function BothSymbols: boolean;
var xx, yy, yy2: integer;
begin
xx:= 642; yy:= 8; yy2:= 158;
if FindColorSpiral(xx, yy, TreeMMColor, 551, 5, 717, 161) then
begin
if FindColorSpiral(xx, yy2, TreeMMColor, 551, 5, 717, 161) then
begin
if yy2 - yy > 25 then
result:= true
else begin
result:= False;
writeLn('Cannot find both tree symbols');
end;
end else result:= False;
end else result:= False;
end;
function FindSymbolU: integer;
var y2: integer;
begin
x:= 642; y:= 8; y2:= y;
if FindColorSpiral(x, y, TreeMMColor, 551, 5, 717, 161) then
begin
result:= y - y2;
end else result:= -1;
end;
function FindSymbolL: integer;
var y2: integer;
begin
x:= 642; y:= 158; y2:= y;
if FindColorSpiral(x, y, TreeMMColor, 551, 5, 717, 161) then
begin
result:= y2 - y;
end else result:= -1;
end;
function FindIcons: boolean;
begin
if (not FindSymbol(x, y, 'bank')) and (not FindSymbol(x, y, 'bank')) then
begin
if (not FindColor(x, y, BankMMColor, 537, 6, 761, 163)) and (FindSymbolU < 0) then
begin
result:= False
exit;
end else result:= True;
end else result:= True;
end;
function FindFastRandoms: Boolean; //By WT-Fakawi, ALL credits to him.
var
i: Integer;
begin
for i := 1 to 9 do
begin
case I of
1: if FindDead then
Result := True;
2: if FindMime then
Result := True;
3: if FindMaze then
Result := True;
4: if FindQuiz then
Result := True;
5: if FindDemon then
Result := True;
6: begin
if NoGameTab then
begin
Result := True;
Players[CurrentPlayer].loc := 'No GameTab';
EndAuto('Missing gametab, random cannot be solved.', false);
TerminateScript;
end;
end;
7: begin
if InBlack then
begin
Result := True;
Players[CurrentPlayer].loc := 'InBlack';
EndAuto('Player in black, random cannot be solved.', false);
TerminateScript;
end;
end;
8: RC;
//9: if not FindIcons then
// begin
// result:= True;
// Players[CurrentPlayer].loc := 'No icons found';
// EndAuto('Cannot find tree or bank icons, possible random. Cannot be solved.', true);
// writeLn('Screenshot taken.');
// TerminateScript
// end;
end;
wait(1);
end;
end;
procedure CheckForRandoms(FullCheck: boolean);
begin
If Not(LoggedIn) then LoginPlayer;
FindFastRandoms;
AvoidFight;
If FullCheck or FindTalk then FindNormalRandoms;
end;
procedure RandomMessage;
var AmountOfMsgs: integer;
begin
AmountOfMsgs:= 15; //How many possible messages?
case 1 + Random(AmountOfMsgs - 1) of
1: TypeSend('moo.'); //You can change these to whatever you like
2: TypeSend('im bored.');
3: TypeSend('meh');
4: TypeSend('im tired');
5: TypeSend('i like pie');
6: TypeSend('rawr');
7: TypeSend('hmm');
8: TypeSend('dooood');
9: TypeSend('im bored');
10: TypeSend('hehe');
11: TypeSend('dude');
12: TypeSend('muaha');
13: TypeSend('woooo almost 1k yews');
14: TypeSend('ugh');
15: TypeSend('haha'); //You can set more than 15 if you want
end;
end;
Procedure AntiBan(OneIn: integer; WithMsg: boolean);
begin
case random((OneIn * 5) - 1) of //1 in XX chance of occurance
0: HoverSkill('Random',false);
1: begin
RandomRClick;
ClickOption('Cancel', 1);
MMouse(Random(500), Random(500), 3 - Random(2), 1)
end;
2: PickupMouse
3: begin
GameTab(1 + Random(11));
Wait(3000 + Random(1000));
GameTab(4);
end;
4: AlmostLogout;
5: if WithMsg then RandomMessage;
end;
end;
Procedure GoToBank;
var
NoAxe: boolean;
ax, ay: integer;
begin
if not(LoggedIn) then exit;
FindInventoryRandoms;
If InvFull or not FindAxe2 then
begin
If FindSymbolU >= 0 then
begin
Mouse(x + 10 + Random(5), y - 5 - Random(5), 3 - Random(2), 1, true);
writeLn('Walking passed dungeon');
CheckForRandoms(true);
writeLn('Looking for bank color ' + IntToStr(BankMMColor));
repeat
wait(Random(300));
until(not FindColor(x, y, BankMMColor, 537, 6, 761, 163));
writeLn('Bank is off minimap');
repeat
wait(Random(300));
until(FindColor(x, y, BankMMColor, 537, 6, 761, 163));
writeLn('Bank icon found on minimap, walking to bank');
wait(Random(2000));
If FindColorSpiralTolerance(x, y, 195836, x - 15, y - 15, x + 48, y + 51, 2) then
begin
Mouse(x - 4 - random(2), y + random(3), 3 - Random(2), 1, true);
CheckForRandoms(true);
Flag;
CheckForRandoms(false);
if not FindAxe2 then NoAxe:= true;
If OpenBankFast('eb') then
begin
if NoAxe then
begin
YewsBanked:= YewsBanked + (28 - (FreeInv - 1)) - (28 - InvCount);
Deposit(1, 28, 2);
if FindBitmapMaskTolerance(AxeMask, ax, ay, 5, 5, 515, 337, 5, 5) then
begin
Mouse(ax, ay, 3 - Random(2), 1, true);
CloseBank;
NoAxe:= false;
end else EndAuto('No axe found.', true);
end else
begin
Deposit(FreeInv, 28, 2);
CloseBank;
Loads:= Loads + 1;
YewsBanked:= YewsBanked + 28 - (FreeInv - 1);
end;
end else EndAuto('Error in finding bank booth', false);
CheckForRandoms(false);
end else If FindSymbolU >= 0 then
begin
GoToBank;
exit;
end else EndAuto('Cannot find bank or tree icons.', True);
end else EndAuto('Tree icon could not be found.', True);
end;
end;
Procedure GoToYews;
begin
if not(LoggedIn) then exit;
case Random(5) of
0,1,2: begin //Going to north yew
writeLn('Going to upper yew');
CurrentTree:= 1;
If FindSymbolU >= 0 then
begin
SetRun(true);
CheckForRandoms(false);
Mouse(x + 4 + Random(3), y + 16, 3 - Random(2), 1, true);
Flag;
SetRun(false);
GameTab(4);
CheckForRandoms(false);
end else
begin
MoveSouth;
GoToYews;
exit;
end;
end;
3,4,5: begin //Goint to south yew
writeLn('Going to lower yew');
CurrentTree:= 0;
If FindSymbolL >= 0 then
begin
SetRun(true);
CheckForRandoms(false);
Mouse(x + 23 + Random(4), y + Random(20), 3 - Random(2), 1, true);
Flag;
FindSymbolL;
Mouse(x + 4 + Random(3), y - 11, 3 - Random(2), 1, true);
Flag;
SetRun(false);
GameTab(4);
CheckForRandoms(false);
end else
begin
MoveSouth;
GoToYews;
exit;
end;
end;
end;
end;
Procedure WaitForTree;
begin
repeat
wait(50 + random(50));
case Random(24) of
0: If IsUpText('down Yew') then Mouse(TreePTS[i].x, TreePTS[i].y, 0, 0, true);
end;
if not FindAxe2 then exit;
CheckForRandoms(false);
FindEnt(TreePTS[i].x, TreePTS[i].y, true);
GameTab(4);
until(Not(IsUpText('down Yew')) or (InvFull))
wait(100 + random(1400));
end;
Function FindTree(Tree: string; Color, Tol: integer): boolean;
begin
FindColorsSpiralTolerance(255, 166, TreePTS, Color, 5, 5, 515, 337, Tol);
If Length(TreePTS) <= 0 then Result:= False
else for i:= 0 to Length(TreePTS) - 1 do
begin
//CheckForRandoms(False);
MMouse(TreePTS[i].x, TreePTS[i].y, 3 - Random(2), 1)
If (IsUpText(Tree)) then
begin
result:= true;
exit;
end else
begin
If (i = Length(TreePTS) - 1) or (i >= 4) then
begin
result:= false;
exit;
end;
end;
end;
end;
Procedure ChangeTree;
begin
if BothSymbols then
begin
CheckForRandoms(true);
MakeCompass('N');
If FindSymbolU < FindSymbolL then
begin
FindSymbolU;
writeLn('Moving to upper yew');
Mouse(x + 4 + Random(3), y + 16 + Random(3), 3 - Random(2), 1, true);
Flag;
end else if FindSymbolU > FindSymbolL then
begin
FindSymbolL;
writeLn('Moving to lower yew');
Mouse(x + 4 + Random(3), y - 11 - Random(3), 3 - Random(2), 1, true);
Flag;
end;
First:= true;
end;
end;
Procedure ChopTree;
begin
if not(LoggedIn) then exit;
First:= True
repeat
AntiBan(200, false);
case Random(299) of //1 in 300 chance of sending a random message
1: RandomMessage;
end;
CheckForRandoms(false);
If FindTree('down Yew', TreeColor, TreeTol) then
begin
First:= False;
If (not FindEnt(TreePTS[i].x, TreePTS[i].y, false)) then
begin
CheckForRandoms(true);
Mouse(TreePTS[i].x, TreePTS[i].y, 3 - Random(2), 1, true);
FindInventoryRandoms;
WaitForTree;
end;
end else If (Not First) and (Not InvFull) then ChangeTree;
GameTab(4);
until(InvFull or not FindAxe2);
end;
begin
SetupSRL;
DeclarePlayers;
ActivateClient;
repeat
SetupEYB;
repeat
GoToYews;
ChopTree;
GoToBank;
Report;
until(not LoggedIn);
NextPlayer(false);
until(false)
end.
——————————————————
<!– END TEMPLATE: formanswers –>