Dynamite
2009-05-16 15:33:26
How Long have You Played Runescape?
3 Year(s)
Are you affilated in anyway with Jagex LTD?
no
Were you Referred to SRL?
What is your general programming knowledge?
I only know SRL
Are you a member of any other communities?
I go on RsBot a tiny bit. Just to go and help people
Tell us about yourself…
Please show us one (or multiple) of your scripts.
3 Year(s)
Are you affilated in anyway with Jagex LTD?
no
Were you Referred to SRL?
What is your general programming knowledge?
I only know SRL
Are you a member of any other communities?
I go on RsBot a tiny bit. Just to go and help people
Tell us about yourself…
From: The Man
Hi my name is Senna, I was born in London but moved to Southampton (UK).
I used to ride motorbikes but gave up to play full time football, 6 days a week. I am 14, I love SRL because of the community and ease of script and editing.
Also i love helping people any way i can and i love people asking me :)
Please show us one (or multiple) of your scripts.
{==============================================================================]
[ [SRL]4 ]
[ ]
[ ]
[ NAME : Destiful Woodcutter ]
[ WRITER : The Man ]
[ CATEGORY : Woodcutting ]
[ DESCRIPTION : ]
[ ]
[==============================================================================]
[ Instructions: Be at Draynor bank. Fill out form, then run. ]
[==============================================================================}
{=========================Records & Vars DONT TOUCH!===========================}
program DestifulCutter;
{$DEFINE SMART} //Comment out to remove SMART
{$IFDEF SMART}
{.include srl/srl/misc/smart.scar}
{$ENDIF}
{.include SRL/SRL.scar}
{.include srl/srl/misc/debug.scar}
{.include SRL/SRL/Misc/Users.scar}
const
Rockcolour = 379494;
StartPlayer = 0;
var
x, y, RockDTM, LevelUps, WillowsDTM:integer;
procedure DeclarePlayers;
begin
SRLPlayerForm(True, [], [], ['Pin'], []);
end;
procedure SetLoc(s: String);
begin
Players[CurrentPlayer].Loc := s;
end;
function PlayerLoc: String;
begin
Result := Players[CurrentPlayer].Loc;
end;
function CountNPCs(var NPA: T2DPointArray): Integer;
var
NPC: array of TPoint;
begin
FindColorsSpiralTolerance(MMCX, MMY2, NPC, 62965, MMX1, MMY1, MMX2, MMY2, 5);
NPA := TPAtoATPA(NPC, 2);
Result := Length(NPA);
end;
function LevelUp : Boolean; //Thanks Wizzup?
var
Lev : Integer;
begin
Result := FindNPCChatText('gratu', Nothing) or
FindNPCChatText('atio', Nothing);
if Result then
begin
while ClickContinue(True, True) do
Wait(500 + Random(250));
WriteLn(Players[CurrentPlayer].Name + ' leveled up');
Lev:= GetSkillInfo('woodcutting', False);
WriteLn(Players[CurrentPlayer].Name + '''s woodcutting level is now ' + IntToStr(Lev));
LevelUps:= LevelUps + 1;
end;
end;
procedure LoadDTMs(Load : TStringArray);
var I : Integer;
begin
for I:= 0 to High(Load) do
case Load[i] of
Axe : AxeDTM := DTMFromString('78DA63AC616160F8C480023AD38518FE03694' +
'620FE0F048C9D40356F19D000231209A46B816A5E1050530A54F3' +
'9F809A2AA09ADF04D43402D5BCC4AF06008D550EC3');
Rock : RockDTM := DTMFromString('78DA636467606060614001DE41DE609A11CA6' +
'7E40212ACA86A748D7550D5F00009765435663616986A38099803' +
'92E726A086950873406AD8F0AB0100821404CC');
Willows : WillowsDTM := DTMFromString('78DA63B461666098C2C8800C023D65C1344C9' +
'4D108A8A617558DB38D04AA1A17A09A2E22D44C465563612C82AA' +
'C603A86616AA1A3B73315435A640350B50D514653A62BA790EAA9' +
'A8820235435BA4035B351D524475BA0AAD1C30C1F0F0729143500' +
'EE1C0DF9');
Bank : DB := DTMFromString('78DA636C67626008644001FFFFFD63F80FA41' +
'9416C2060AC01AAF182C8B140D5FCF9C304A619A17CB09A204C35' +
'22E86AC2F09B0300F8811153');
end;
end;
procedure FreeDTMs(Free : TStringArray);
var I : Integer;
begin for I:= 0 to High(Free) do
case Free[i] of
Axe : FreeDTM(AxeDTM);
Rock : FreeDTM(RockDTM);
Willows : FreeDTM(WillowsDTM);
Bank : DB := FreeDTM(DB);
end;
end;
procedure GRockDTM
var
MaxTol, i, T, D, C: Integer;
begin
MaxTol := 55;
C := FindRockColor;
LoadDTMs([Rock]);
repeat
IncEx(T, 10);
Writeln(IntToStr(T));
if DTMRotated(D, Result.x, Result.y, MMX1, MMY1, MMX2, MMY2) then
begin
Writeln('Found');
Break;
end;
FreeDTMs([Rock]);
until(T >= MaxTol);
end;
function DepositWillows: Boolean;
var
AxeDTM, x, y, i: Integer;
InvItems: boolean;
T: TBox;
begin
LoadDTMs([Axe])
if InvCount > 0 then
OpenBank('db', True, True)
else Exit;
if PinScreen then InPin(Players[CurrentPlayer].Strings[0]);
if BankScreen then
begin
for i := 1 to 28 do
begin
T := InvBox(i);
if not FindDTM(AxeDTM, x, y, T.x1, T.y1, T.x2, T.y2) and ExistsItem(i) then
begin
MouseItem(i, False);
Wait(RandomRange(500, 1000));
case Random(3) of
0..1: ChooseOption('eposit-All');
2: begin
ChooseOption('eposit-X');
Wait(RandomRange(500, 1000));
TypeSend(IntToStr(RandomRange(30, 100)));
end;
end;
Wait(2000+random(2000));
Result := not(InvFull);
if Result then SetLoc('WalkToWillows');
end;
end;
Result := True;
SetLoc('WalkToWillows');
end;
CloseBank;
finally
FreeDTMs([Axe]);
end;
end;
function WalkWillowRadial(XOffSet, YOffSet: Integer): TPoint;
var
TPA: TPointArray;
i, CTS: Integer;
ATPA: T2DPointArray;
TB: TBox;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(1);
RadialWalkEx(TPA, MMCX, MMCY + 20, 1455939, 50, 200, 250, 50);
if Length(TPA) = 0 then Exit;
ATPA := SplitTPAEx(TPA, 20, 20);
SortATPAFrom(ATPA, Point(MMCX, MMCY));
TB := GetATPABounds(ATPA);
for i := 0 to High(TPA) do
if (PointInBox(TPA[i], TB)) then
begin
Result.x := ((TB.x1 + TB.x2) / 2) - XOffSet;
Result.y := ((TB.y1 + TB.y2) / 2) - YOffSet;
Break;
end;
ColorToleranceSpeed(CTS);
end;
procedure SetupScript;
var
s: String;
begin
MakeCompass('n');
SetAngle(True);
SetRun(GetMMLevels('run', s) > 0);
DepositWillows;
MakeCompass('n');
SetLoc('WalkToWillows');
end;
procedure AntiRandom;
begin
FindNormalRandoms;
end;
procedure Proggy;
var
i: Integer;
begin
writeln('Destiful Woodcutter');
writeln('Ran For: '+TimeRunning+'!');
for I := 0 to High(Players) do
begin
Writeln(IntToStr(Players[I].Integers[99]));
end;
end;
function PointSet(P: TPoint): Boolean;
begin
if (P.x <> 0) or (P.y <> 0) then Result := True;
end;
procedure ScriptTerminate;
begin
Proggy;
end;
function ToWillows: boolean;
var
u,x,y,m: Integer;
P: TPoint;
begin
if (not(loggedin)) then exit;
U := findwatercolor;
P := WalkWillowRadial(3, 3);
if (PointSet(P)) then
begin
Result := True;
Mouse(P.x, P.y, 3, 3, True);
AntiRandom;
Flag;
SetLoc('Chopping');
Exit;
end;
if (DTMRotated(RockDDTM, x, y, MMX1, MMY1, MMX2, MMY2)) then // Found DDTM
begin
Result := True;
Mouse(x, y, 5, 5, True);
AntiRandom;
Flag;
SetLoc('Chopping');
Wait(RandomRange(100, 500));
Exit;
end;
if RadialWalk(FindRockColor, 160, 200, 60, -10, -10) then
Result := True
else
Result := RadialWalk(FindWaterColor, 260, 280, 40, 70, 5);
if Result then
begin
SetLoc('Chopping');
AntiRandom;
Exit;
end;
if Findsymbol(x,y,'fish') then
begin
M := GetColor(x - 20, y);
if M = U Then
begin
Mouse(x,y,5,5, true);
wait(250+random(250));
FFlag(10);
If Distance(mmcx,mmcy,x,y) < 7 then
begin
result := true;
SetLoc('Chopping');
AntiRandom;
Exit;
end;
end;
end;
end;
function Reposition: TPoint;
var
i, CTS: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
TB: TBox;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(1);
FindColorsSpiralTolerance(MMCX, MMCY, TPA, 1455939, MMX1, MMY1, MMX2, MMY2, 50);
if Length(TPA) = 0 then Exit;
SortATPAFrom(ATPA, Point(MMCX, MMCY));
TB := GetATPABounds(ATPA);
for i := 0 to High(TPA) do
if (PointInBox(TPA[i], TB)) then
begin
Result.x := ((TB.x1 + TB.x2) / 2) - 2;
Result.y := ((TB.y1 + TB.y2) / 2) - 2;
Break;
end;
ColorToleranceSpeed(CTS);
end;
Procedure CountTheLogs;
var
Log: Byte;
LogDTM: Integer;
begin
if not LoggedIn then Exit;
GameTab(4);
LoadDTMs([Willows])
Log := CountItemsIn('inv', 'dtm', WillowsDTM, []);
Writeln('Got ' + IntToStr(Log) + ' logs this time.');
Players[currentplayer].integers[99] := Players[currentplayer].integers[99] + Log;
FreeDTMs([Willows])
end;
function Bank: Boolean;
var
DB, x, y, i, ii, Failsaves: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
Failsaves := 1;
for i := 0 to Failsaves do
begin
case i of
0:
begin
LoadDTMs([Bank])
if DTMRotated(DB, x, y, MMX1, MMY1, MMX2, MMY2) then
begin
Result := True;
Mouse(x, y, 3, 3, True);
Flag;
AntiRandom;
SetLoc('Bank');
Exit;
end;
finally
FreeDTMs([Bank]);
end;
end;
1:
begin
RadialWalkEx(TPA, MMCX, MMCY, 195836, 3, 360, 30, 30);
if Length(TPA) = 0 then Exit;
SortTPAFrom(TPA, Point(MMCX, MMCY));
ATPA := SplitTPAEx(TPA, 10, 10);
SortATPASize(ATPA, True);
MiddleTPAEx(ATPA[0], x, y);
Mouse(x, y, 3, 3, True);
Result := True;
AntiRandom;
Flag;
AntiRandom;
SetLoc('Bank');
Exit;
end;
end;
end;
end;
Procedure SetVar;
Begin
Players[CurrentPlayer].Strings[0] := Lowercase(Players[CurrentPlayer].Strings[0]);
End;
function FindWillow(var x, y: Integer): Boolean;
var
Colors: TIntegerArray;
I, A, M, curCTS, MX, MY: Integer;
TPA: TPointArray;
ATPA: T2DPointArray;
begin
Result := False;
if (not(LoggedIn)) then exit;
curCTS := GetColorToleranceSpeed;
ColorToleranceSpeed(3);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 3233608, MSX1, MSY1, MSX2, MSY2, 2);
if Length(TPA) = 0 then Exit;
ColorToleranceSpeed(1);
ATPA := TPAtoATPAEx(TPA, 10, 10);
M := High(ATPA);
for A := 0 to M do
if MiddleTPAEx(ATPA[A], MX, MY) then
begin
MMouse(MX, MY, 6, 6);
Wait(100 + Random(50));
if IsUpText('illow') then
begin
Result := True;
GetMousePos(X, Y);
ColorToleranceSpeed(curCTS);
Exit;
end;
end;
ColorToleranceSpeed(curCTS);
end;
procedure AntiBanage;
begin
case Random(100) of
0: HoverSkill('woodcutting', false);
1: MakeCompass('random');
2: Wait(1000 + Random(200));
3: RandomMovement;
4: RandomRClick;
5: HoverSkill('random', false);
6: GameTab(RandomRange(1, 12));
else SleepAndMoveMouse(250+random(100));
end;
end;
function ChoppingLoop: Boolean;
var
T, x, y: Integer;
P: TPoint;
Colour: Integer;
begin
repeat
begin
AntiRandom;
MarkTime(T);
if FindWillow(x, y) then
begin
Mouse(x, y, 3, 3, False);
Wait(100+random(200));
if ChooseOption('hop') then
begin
Colour := GetColor(x, y - 5);
Wait(1000+random(2000));
while (SimilarColors(Colour, GetColor(x, y - 5), 4) and not(InvFull)) do
begin
MakeCompass('N');
Result := True;
AntiBanage;
Wait(100)
AntiRandom;
SleepAndMoveMouse(2500+random(100));
if TimeFromMark(T) >= 20000 then Break;
end;
end;
end;
end;
until(InvFull = True);
end;
procedure Responder; // Cheers R1ch great guy :D
var
HiChats, NoobChats, AutoChats, HiChatR, NoobChatR, AutoChatR, UpChats,
UpChatR, LevelChats, YesChats : TStringArray;
I, RL, R : Integer;
begin
if (not(LoggedIn)) then
begin
Players[CurrentPlayer].Active:= False;
Exit;
end;
HiChats:= ['hi', 'yo', 'sup', 'ello', 'wassup', 'll right', 'hey', 'hai'];
HiChatR:= ['hi', 'hello there', 'sup', 'yo', 'hello', 'hey', 'howdy', 'hai'];
NoobChats:= ['noob', 'froob', 'neeb', 'choob', 'loser', 'you are a'];
NoobChatR:= ['u are', 'you r', 'u r', 'i aint', 'how am i??', 'looked in the mirror lately?'];
AutoChats:= ['autoer', 'bot', 'auto', 'cheater', 'autoing', 'cheat'];
AutoChatR:= ['no im not', 'im not a bot', 'i dont cheat!', 'me?!', 'r u serious?!', 'bots can talk??'];
UpChats:= ['gratz', 'well done', 'congratulations', 'grats', 'congratz'];
UpChatR:= ['thanks', 'ty', 'thank you', 'thx', 'thanx'];
LevelChats:= ['wc lv', 'wcing lv', 'woodcutting lev', 'wc lev'];
YesChats:= ['Yes', 'Ye', 'Yeah', 'Yea', 'Yup', 'Uh huh', 'Yep'];
for I:= 0 to High(HiChats) do
begin
if InChat(HiChats[i]) then
TypeSend(HiChatR[i]);
R:= R + 1;
end;
for I:= 0 to High(NoobChats) do
begin
if InChat(NoobChats[i]) then
TypeSend(NoobChatR[i]);
R:= R + 1;
end;
for I:= 0 to High(AutoChats) do
begin
if InChat(AutoChats[i]) then
TypeSend(AutoChatR[i]);
R:= R + 1;
end;
if LevelUp then
begin
for I:= 0 to High(UpChats) do
begin
if InChat(UpChats[i]) then
TypeSend(UpChatR[i]);
R:= R + 1;
end;
end;
for I:= 0 to High(LevelChats) do
begin
if InChat(LevelChats[i]) then
begin
R:= R + 1;
RL:= GetSkillInfo('fishing', False);
case Random(10) of
0: TypeSend(IntToStr(RL));
1: TypeSend('lvl '+IntToStr(RL));
2: TypeSend(IntToStr(RL) + ' over here');
3: TypeSend('level '+IntToStr(RL));
4: TypeSend('I''m ' + IntToStr(RL) + 'fishing');
5: TypeSend('only ' + IntToStr(RL));
6: TypeSend('meh, only ' + IntToStr(RL));
7: begin
case Random(5) of
0: TypeSend('onky ' + IntToStr(RL));
1: TypeSend('omly ' + IntToStr(RL));
2: TypeSend('inly ' + IntToStr(RL));
3: TypeSend('onlu ' + IntToStr(RL));
4: TypeSend('om;y ' + IntToStr(RL));
end;
case Random(5) of
0: TypeSend('only*');
1: TypeSend('*only');
2: TypeSend('Sorry, *only');
3: TypeSend('I meant "only"');
4: TypeSend('*only ' + IntToStr(RL));
end;
end;
8: case Random(3) of
0: TypeSend('My wcing is ' + IntToStr(RL));
1: TypeSend('My woodcutting is ' + IntToStr(RL) + '...8-)');
2: TypeSend('It''s ' + IntToStr(RL));
end;
9: begin
TypeSend('Me?');
Wait(2500 + Random(1500));
for I:= 0 to High(YesChats) do
if InChat(YesChats[i]) then
TypeSend(IntToStr(RL));
end;
end;
end;
end;
end;
procedure SetupMain;
begin
cleardebug;
writeln('');
writeln('');
writeln('');
writeln('');
writeln('');
writeln('');
writeln('');
writeln('');
setupsrl;
ScriptID := '1058';
mousespeed := 13; // to fast. 13 is better
declareplayers;
activateclient;
wait(500);
end;
begin
SetupMain;
{$IFDEF SMART}
smartsetupex(16, false, true, false);
settargetdc(smartgetdc);
{$ENDIF}
if (not (LoggedIn)) then
begin
Loginplayer;
setangle(true);
Wait(500 + random(30))
SetChat('on', 1);
SetChat('friends', 2);
SetChat('off', 3);
end;
SetupScript;
repeat
if not (loggedIn) then
begin
nextplayer(false);
SetupScript;
end;
if PlayerLoc = 'WalkToWillows' then
if ToWillows then Continue;
if PlayerLoc = 'Chopping' then
ChoppingLoop;
if PlayerLoc = 'LoadDone' then
if Bank then Continue;
if PlayerLoc = 'Bank' then
if DepositWillows then Continue;
Until(AllPlayersInactive = True);
Proggy;
end.