Drax
2012-01-31 22:20:55
How Long have You Played Runescape?
7 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
Pascal(thanks to this community)
Are you a member of any other communities?
No
Tell us about yourself…
Please show us one (or multiple) of your scripts.
7 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
Pascal(thanks to this community)
Are you a member of any other communities?
No
Tell us about yourself…
From: Surfing
Love surfing, Love helping others (i volunteer to the homeless), Became thoroughly interested in pascal as i wanted to learn to program from about 5 years ago and then i saw my chance here. I even did computer courses at college but yet they couldn't teach me programming until i found simba.
Please show us one (or multiple) of your scripts.
Program SurfingYewsEdgville;
{$i srl/srl/misc/smart.simba}
{$i SRL/SRL.simba}
{$i ObjectDTM\ObjDTMInclude.simba}
procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; // Username
Players[0].Pass := ''; // Password
Players[0].Active := True;
Players[0].BoxRewards := ['Xp', 'mote', 'ostume', 'oins', 'aphire', 'ssence'];
end;
const
LessBotLike=False; // If true it will wait.
HoldHatchet=False; // True if you want to Hold it.
SRLStats_Username = ''; // Your SRL Stats ID
SRLStats_Password = ''; // Your SRL Stats Password
ScriptVersion= '1.5d'; // Don't Touch
UseAutoChecker=True;
ScriptName= 'SurfingYewsEgdeville[V'; // Don't touch
var
x, y, TreesChopped: integer;
StartingXP: integer;
procedure AntiRandoms;
begin
FindNormalRandoms;
LampSkill := 'woodcutting';
LevelUp;
end;
procedure AntiBan;
begin
case random(10) of
0: RandomRClick;
1: PickUpMouse;
2: RandomRClick;
3: HoverSkill('woodcutting', False);
end;
end;
procedure AutoUpdateMe;
var Neifile:integer;
OnlineVersion, NewScript, NeiFeilNennen:string;
begin
if UseAutoChecker then
begin
writeln('Checking for script updates...');
OnlineVersion := GetPage('http://surfingyewsedgeville-git.googlecode.com/git/version.txt');
writeln(OnlineVersion);
writeln(ScriptVersion)
if (trim(OnlineVersion) > ScriptVersion) then
begin
writeLn('Newer script version online!');
writeLn('Autoupdating to newer version.');
NewScript := GetPage('http://surfingyewsedgeville-git.googlecode.com/git/SurfingYewsEdgeville.simba');
NeiFeilNennen := ScriptPath+ScriptName+OnlineVersion+'].simba';
Neifile := Rewritefile(NeiFeilNennen, true);
try
WriteFileString(Neifile, NewScript);
except
begin
writeLn('Fatal error writing to '+NeiFeilNennen+'!!');
terminatescript;
end;
end;
CloseFile(Neifile);
writeLn('New script downloaded to '+NeiFeilNennen+'!! Please use this one!!');
TerminateScript;
end else
writeLn('You have the latest version of the script!');
end else
WriteLn('!!!!! Not checking for latest version, you may be outdated!');
end;
procedure SetupLogin;
begin
ClearDebug;
AutoUpdateMe;
Smart_Server := 87;
Smart_Members := True;
Smart_Signed := True;
Smart_SuperDetail := False;
SetupSRL;
ObjDTM_Setup;
ActivateClient;
DeclarePlayers;
if not (LoggedIn) then
LoginPlayer;
ToggleXPBar(True);
StartingXP := (GetXPBarTotal);
TreesChopped := 0;
end;
Procedure CheckStats;
begin
if ((SRLStats_Username= '') And (SRLStats_Password = '')) then
begin
case MessageBox('No Stats account entered, would you like to set one up?','SRL Stats',mbYesNoCancel) of
mrYes:
begin
OpenWebPage('http://stats.villavu.com/register');
TerminateScript;
end;
mrNo:
begin
SetupSRLStats(636, 'Anonymous', 'anon1337');
Exit;
end;
mrCancel: TerminateScript;
end;
end else
SetupSRLStats(636, SRLStats_Username, SRLStats_Password);
end;
Procedure Commit;
begin
stats_IncVariable('Woodcutting EXP (Gained))',4725);
stats_IncVariable('Yew Logs Chopped',27);
SRLRandomsReport;
Stats_Commit;
WriteLn('=================')
WriteLn('Updated SRL Stats')
WriteLn('=================')
end;
Procedure OpenDbox;
var
x,y:Integer;
begin
Antirandoms;
repeat
if FindObjCustom(x, y, ['eposit'], [5855581], 2) then
MMouse(x, y, 0, 0);
until(IsUpText('eposit'));
Mouse(x, y, 0, 0, True);
end;
Procedure DepositAtoZ;
var
x,y:Integer;
begin
FindObjCustom(x, y, ['eposit','items'], [2052490], 2);
Mouse(x, y, 0, 0, True);
end;
procedure ReportScreen(TP: TStringArray; Placement: TPoint; Colour: integer);
var
mx, my, Pic, I, B, H, TPH, Numb: Integer;
TTP: TPointArray;
Canvas: TCanvas;
begin
SmartSetDebug(True);
GetClientDimensions(mx, my);
Pic := BitmapFromString(mx, my, '');
TPH := High(TP);
for I := 0 to TPH do
begin
TTP := LoadTextTPA(TP[i], SmallChars, H);
for B := 0 to High(TTP) do
begin
Numb := ((I + 1) * 13);
FastSetPixel(Pic, TTP[b].x + 1, TTP[b].y + Numb + 1, 3421236);
FastSetPixel(Pic, TTP[b].x, TTP[b].y + Numb, Colour);
end;
end;
Canvas := TCANVAS.Create;
Canvas.Handle := SmartGetDebugDC;
DrawBitmap(Pic, Canvas, Placement.x, Placement.y);
FreeBitmap(Pic);
end;
procedure Report;
var Exp: integer;
begin
Exp := (GetXPBarTotal - StartingXP);
ReportScreen(['Surfing Yews',
'',
'Total Time Running: ' + TimeRunning,
'',
'Yews Chopped: ' + IntToStr(TreesChopped),
'',
'XP Gained: ' + IntToStr(Exp)],
Point(28, 28), 16777215);
end;
procedure Resting;
var
S: String;
begin
if not loggedin then exit;
Antirandoms;
if (GetMMLevels('run', S) <= 50) then
RestUntil(RandomRange(90,100))
end;
Procedure WalkToBank;
begin
Antirandoms;
if ObjDTM_Walk('84:22:4:3:7:67:43:3:7:43:63:3:7:40:76:3:7:28:72:4:73:8:73:27:98:30:98:9', 0, 100, 80, True) then
Antiban;
if ObjDTM_Walk('106:48:3:10:7:119:69:10:7:119:61:10:7:119:53:4:98:27:97:50:116:51:115:27', 0, 100, 80, True) then
Antirandoms;
if ObjDTM_Walk('73:66:3:1:7:95:47:1:7:123:80:3:7:128:96:4:69:57:70:73:84:73:83:57', 0, 100, 80, True) then
begin
WriteLn('Now at Bank')
MakeCompass('N');
end else WriteLn('Could not find Bank');
end;
procedure WalkToYews;
begin
Antirandoms;
WriteLn('Walking to Yews')
if ObjDTM_Walk('60:129:4:1:7:131:95:3:7:137:112:10:7:98:99:10:7:98:107:4:51:120:52:137:76:137:75:119', 0, 100, 80, True) then
Antiban;
if ObjDTM_Walk('86:116:2:3:7:63:110:3:7:37:131:4:40:131:92:135:93:98:70:97', 0, 100, 80, True) then
WriteLn('Now at Yews')
else WriteLn('Could not find Yews')
end;
procedure WalkToSouthYew;
begin
Antirandoms;
WriteLn('Walking to South Yew')
if ObjDTM_Walk('80:112:4:1:7:32:123:3:7:35:106:3:7:39:94:3:7:22:102:4:72:105:71:124:96:125:98:103', 0, 100, 80, True) then
begin
MakeCompass('S');
Resting;
end else WriteLn('Could not find South Yew')
end;
procedure WalkToNorthYew;
begin
Antirandoms;
MakeCompass('N');
WriteLn('Walking to North Yew')
if ObjDTM_Walk('75:53:4:3:7:57:44:3:7:33:63:3:7:29:75:3:7:17:71:5:57:44:65:67:84:67:83:35:65:33', 0, 100, 80, True) then
begin
Resting;
end else WriteLn('Could not find North Yew')
end;
procedure Bank;
begin
MakeCompass('N');
Setangle(SRL_ANGLE_HIGH);
TreesChopped := TreesChopped + 27;
Commit;
Report;
WalkToBank;
Resting;
AntiRandoms;
OpenDbox;
DidRedClick;
begin
if DidRedClick then
wait(3000 + random(300));
if DepositScreen then
if HoldHatchet=True then
DepositAtoZ;
if HoldHatchet=False then
Deposit(2,28,True);
Wait(500 + random (50));
MakeCompass('N');
WalkToYews;
end;
end;
function FindYew(var x, y: Integer) :Boolean;
var
CTS, I: Integer;
TPA: TPointArray;
ATPA: Array of TPointArray;
begin
If Not LoggedIn then exit;
Antirandoms;
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.14, 0.043);
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 3819340, MSX1, MSY1, MSX2, MSY2,6);
aTPA := TPAToATPAEx(TPA, 20, 20);
For I := 0 to High(ATPA) do
begin
MiddleTPAEx(ATPA[i], x, y);
MMouse(x, y, 0, 0);
If WaitUpTextMulti(['ew', 'yew'], 250) then
begin
Result := True;
GetMousePos(x, y);
Break;
end;
end;
end;
function Chillax: Boolean;
begin
WriteLn('Chillaxing');
Setrest;
Wait(25000 + random(5000));
end;
procedure ChopYew;
var
x,y,t:Integer;
begin
MarkTime(t)
DidRedclick;
Report;
SetAngle(SRL_ANGLE_HIGH);
AntiRandoms;
If FindYew(x ,y) then
begin
Mouse(x, y, 0, 0, True);
end else Writeln('Cannot find Yew Tree');
If DidRedClick then
begin
repeat
wait(100);
Report;
Until(Not FindYew(x,y)) or (TimeFromMark(t)>120000) or InvFull;
if(InvFull)then
Bank;
end;
end;
procedure MainLoop;
begin
ChopYew;
WalkToNorthYew;
ChopYew;
WalkToSouthYew;
If LessBotLike=True then
If (Not FindYew(x,y)) then
Chillax;
end;
begin
ClearDebug;
SetupSRLStats(636, SRLStats_Username, SRLStats_Password);
SetupLogin;
repeat
MainLoop;
until(Not LoggedIn);
end.