BazzBarrett
2008-09-19 20:13:01
<!– BEGIN TEMPLATE: formanswers –>
bazzbarrett - SRL Member Application Form
bazzbarrett
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
yes
Refered by Waddo
Programming Knowledge
Basic PHP, HTML and Javascript
Other Communitys
None
How Long have You Played Runescape
1.5 years
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
Waddo First got me into scar (I know him through RS) and i got hooked on the language its so easy to understand and script in. ive been scripting scar 3-4 months and a member of this forum all that time altough only posting when i was shareing my own material or helping others (or i fealt a strong earge to post) therefor alot of my posts are very useful and helpful.
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
over my time i had wrote:
1 tut:
How To Make A Game in SCAR!
2 games:
Pong The Game (Myfirst script)
and MazeGame With map editor
This is my seound script to do with Rs the first being ClaySoftner And Bucket Filler
And resantly while making the script below i created a function called FindTPA with easly creates a TPA from a TIntegerArray:
TPAFind! - Does a TPA's job in 1 LINE!
That function (witch i have asked to be included in the next include) is show in use below as how affective, fast and easly callable it is.
EDIT: Fixed Sloppy Multiplayer
<!– END TEMPLATE: formanswers –>
bazzbarrett - SRL Member Application Form
bazzbarrett
What is the meaning to life?
Where you Referred to SRL? If yes, by whom?
yes
Refered by Waddo
Programming Knowledge
Basic PHP, HTML and Javascript
Other Communitys
None
How Long have You Played Runescape
1.5 years
Are you affilated in anyway with Jagex LTD?
No
—————————————————–
Please write down a paragraph about Yourself.
Waddo First got me into scar (I know him through RS) and i got hooked on the language its so easy to understand and script in. ive been scripting scar 3-4 months and a member of this forum all that time altough only posting when i was shareing my own material or helping others (or i fealt a strong earge to post) therefor alot of my posts are very useful and helpful.
——————————————————
Please Post a Sample of your Work. Only SCAR Scripts Accepted
over my time i had wrote:
1 tut:
How To Make A Game in SCAR!
2 games:
Pong The Game (Myfirst script)
and MazeGame With map editor
This is my seound script to do with Rs the first being ClaySoftner And Bucket Filler
And resantly while making the script below i created a function called FindTPA with easly creates a TPA from a TIntegerArray:
TPAFind! - Does a TPA's job in 1 LINE!
That function (witch i have asked to be included in the next include) is show in use below as how affective, fast and easly callable it is.
EDIT: Fixed Sloppy Multiplayer
///////////////////////////////////////////
// Bazzbarrett's Power Cutter! //
// //
// Please fill in Lines 25-35! //
// Will Power Chop: //
// Oak, Willow and Tree //
// //
///////////////////////////////////////////
program New;
{.include SRL/SRL/Misc/smart.scar}
{.include SRL/SRL.scar}
{.include SRL/SRL/Skill/WoodCutting.scar}
var
Trys, InvItems, T, xp :integer;
Colors :TIntegerArray;
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := '';
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].pin := '';
Players[0].Active := True;
Players[0].booleans[0] := True; //Is The ake in the first slot
Players[0].Strings[0] := 'Oak';// Oak, Willow or Tree! Remember to caps the First Letter! (TreeType)
Players[0].Integers[0] := 1000; //number of logs to cut
Players[0].Integers[1] := 0; //Leave blank
Players[0].Integers[2] := 0; // " "
Players[0].Integers[3] := 0; // " "
end;
procedure Setup;
begin
T := GetSystemTime;
SetupSRL;
SetAudioOff;
SetupWoodcutting;
DeclarePlayers;
LoginPlayer;
end;
procedure PlayerSetup;
begin
Retaliate(False);
SetAngle(True);
Players[currentplayer].Integers[2] := GetSkillLevel('woodcutting');
Wait(1000+random(500));
MakeCompass('N');
GameTab(4);
if Not FindAxe then
begin
Logout;
Players[currentplayer].Active := False;
end else
begin
if Not EquipAxe then
begin
if Not(Players[currentplayer].booleans[0])then
begin
ArrangeInv;
InvItems := InvCount;
end;
end;
end;
GameTab(4);
Case Players[currentplayer].Strings[0] of
'Oak':
Begin
Colors := [4884861, 4028525, 3175014];
xp := 37;
end;
'Willow':
begin
Colors := [2836539, 2240554, 2836539];
xp := 63;
end;
'Tree':
begin
Colors := [2911841, 2249802, 4623230];
xp := 15;
end;
end;
end;
procedure Proggy;
var
I :integer;
begin
Writeln('/-----------------------------------\');
Writeln('| BazzBarrett''s Oak Power Chopper!');
Writeln('| ');
Writeln('| Total Time Running: ' + inttostr((Getsystemtime-T)/60000) + ' Minuets!');
writeln('| And ' + inttostr(((Getsystemtime-T)/1000)-(((Getsystemtime-T)/60000)*60)) + ' Secounds!');
for I := 0 to Length(Players) - 1 do
begin
Writeln('|');
Writeln('| ' + Players[I].Name + ':');
Writeln('| Started at lvl '+inttostr(Players[I].Integers[2])+' and ended at lvl '+inttostr(Players[I].Integers[3]));
Writeln('| So We Gained ' + inttostr(Players[I].Integers[3]-Players[I].Integers[2]) + ' Levels!');
Writeln('| We Cut ' + IntToStr(Players[I].Integers[1]) + ' Logs!');
Writeln('| And Gained ' + Inttostr(Players[I].Integers[1]*Xp) + ' XP!');
end;
Writeln('| ');
Writeln('\-----------------------------------/');
end;
procedure Scriptterminate;
begin
proggy;
end;
function TPAFind(Var X, y :integer; colors :TIntegerArray; TheUpText :String):boolean;
//with special thank to Mastaraymond and ProphesyOfWolf For Helping largly with this function
var
CTS, Ic : Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
H, S, L, HueMod, SatMod, tolerance :extended;
midcolor: integer;
I,II : integer;
HSLColor : Array[1..3] of Extended;
HSL: Array[0..1] of Array[1..3] of Extended;
begin
//Work Out some values
For Ic:= 1 to 3 do
begin;
HSL[0][ic] := 255; //Max is 240?
end;
For Ic:= 0 to High(Colors) do
begin;
ColortoHSL(Colors[ic],HSLColor[1],HSLColor[2],HSLColor[3]);
For II:= 1 to 3 do
begin;
HSL[0][II] := MinE(HSLColor[II],HSL[0][II]);
HSL[1][II] := MaxE(HSLColor[II],HSL[1][II]);
end;
end;
end;
H := HSL[1][1] - HSL[0][1];
S := HSL[1][2] - HSL[0][2];
L := HSL[1][3] - HSL[0][3];
midcolor := HSLToColor((HSL[1][1] + HSL[0][1]) div 2,(HSL[1][2] + HSL[0][2]) div 2,(HSL[1][3] + HSL[0][3]) div 2);
HueMod := (H/L);
SatMod := (S/L);
tolerance := L;
//FIND the TPA!
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(Huemod, satmod );
FindColorsSpiralTolerance(MSCX, MSCY, TPA, MidColor, MSX1, MSY1, MSX2, MSY2, round(tolerance+0.5));
ColorToleranceSpeed(CTS);
ATPA := TPAToATPAEx(TPA, 15, 15);
For Ic := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 2, 2);
Wait(50);
If(IsUpTextMultiCustom([TheUpText])) then
begin
Result := True;
GetMousePos(x, y);
Break;
end;
end;
end;
procedure Checks;
var
I :integer;
begin
if not loggedin then exit;
for i := 1 to 8 do
begin
case I of
1: SolveNonTalkingRandoms;
2: Respond;
3: FindTalk;
4: FindDead;
6: if FindBox then SolveBox;
7: RC;
8: FindMod;
end;
end;
Disguise('['+inttostr(Players[currentplayer].Integers[1])+'/'+inttostr(Players[currentplayer].Integers[0])+'] Logs Cut!');
If FindFight then
begin
MakeCompass('N');
RunTo('S', True);
wait(20000+random(10000));
RunTo('N', True);
end;
if FindDead then
begin
Writeln('Dang! We died Going to Next player');
logout;
Players[currentplayer].Active := False;
end;
end;
procedure DropLogs;
var
I :integer;
begin
if not loggedin then exit;
Players[currentplayer].Integers[3] := GetSkillLevel('woodcutting');
if FindAxe then
begin
if EquipAxe then
begin
if Not InvFull then Exit;
DropAll;
Checks;
IncEx(Players[currentplayer].Integers[1], 28);
end else
begin
if Players[currentplayer].booleans[0] then
begin
for I := 2 to 28 do
begin
Dropitem(I);
Inc(Players[currentplayer].Integers[1]);
end;
end else
begin
for I := (InvItems+1) to 28 do
begin
DropItem(I);
Inc(Players[currentplayer].Integers[1]);
end;
//Checks;
end;
end;
end else
begin
Players[currentplayer].Active := False;
logout;
end;
end;
procedure ChopTrees;
var
T, x, y :integer;
begin
repeat
Checks;
if not loggedin then exit;
if TPAFind(x, y, Colors, Players[currentplayer].Strings[0]) then
begin
Trys := 0;
mouse(x, y, 3, 3, true);
Wait(1000+random(1000));
FindEnt(x, y, true);
Checks;
MarkTime(T);
repeat
wait(random(1000));
Checks;
FindEnt(x, y, true);
until( Not(IsUpTextMultiCustom([Players[currentplayer].Strings[0]])))or(TimeFromMark(T)>15000);
end else
begin
if trys > 5 then
begin
Logout;
Players[currentplayer].Active := False;
end;
inc(Trys);
wait(5000+random(5000));
writeln('Couldent Find Tree Randomly Walking');
RunTo('S', False);
Exit;
end;
MarkTime(T);
repeat
Wait(1000+random(2000));
until(IsUpTextMultiCustom([Players[currentplayer].Strings[0]]))or(TimeFromMark(T)>18000);
until(InvFull);
end;
begin
Setup;
repeat
PlayerSetup;
Repeat
ChopTrees;
DropLogs;
Until(Players[currentplayer].Integers[1] > Players[currentplayer].Integers[0])or( not loggedin)
Nextplayer(Players[currentplayer].Active);
until(AllPlayersInactive);
end.——————————————————<!– END TEMPLATE: formanswers –>