Sk1nyNerd
2014-02-02 19:35:28
How Long have You Played Runescape?
8 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
Some: C++, Verilog, LabView
Are you a member of any other communities?
No
Tell us about yourself…
Please show us one (or multiple) of your scripts.
8 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
Some: C++, Verilog, LabView
Are you a member of any other communities?
No
Tell us about yourself…
From: ibot_dung11
I'm 21, been playing RS since I was 13 on and off. Started botting around 2010 as I got busy with life. Currently a Junior at a Unv. of Wisconsin double majoring in Physics and Electrical Engineering. My favorite hobby is working out and playing hockey. Ive gained 35 pounds in the last 16 months working out. Pretty stoked :) I enjoy sports indoor and outdoor, videogames, an occasional beer with friends and having a good time. Probably one of the friendliest people youll meet.
Please show us one (or multiple) of your scripts.
(*`````````````````````````````` Teaks For Apes ``````````````````````````````*)
(*
*Script Requirements:
*Latest Simba, SMART, OSR Include, Reflection Include
*Ability to get to Ape Atoll with a Monkey Greegree (Ninja Greegree was
used when testing)
*Running the Script:
*Follow the Player Settings below to set-up the Script
*It will either PowerChop or Burn the Teak logs
*Start the Script near the Teak trees or anywhere on the MiniMap where the
Dungeon Exclamation is visible
*Bugs/Things to Do:
*Could use a better walking method to get back to the Trees after burning
Pm any questions. Enjoy :)
*)
program TeaksforApes;
{$DEFINE SMART}
{$I SRL-OSR/SRL.Simba}
{$I SRL-OSR/SRL/misc/reports.simba}
{$I SRL-OSR/SRL/misc/SmartGraphics.Simba}
{$I SRL-OSR/SRL/reflection/Reflection.simba}
var
LogDTM, TinderboxDTM: integer;
InvLogs, InvLogsCheck, LogsCut, LogsBurned, x, y: integer;
WCxp, WCxph, LogsCutph, FMxp, FMxph, LogsBurnedph: integer;
FindTreeTime, NewLogTime: integer;
Status: String;
(*```````````````````````````````Player Settings```````````````````````````````*)
const
ScriptVersion = '1';
CutLogs = ; //How many logs do you want to cut? Each log gives 85 exp
DropLogs = ; //False to Burn logs, True to Powerchop and drop the logs
procedure DeclarePlayer;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := ''; //Enter your username
Players[0].Pass := ''; //Enter your password
Players[0].Nick := ''; //Enter 3-4 sidebyside characters of you user name
//Players[0].Pin:= ''; //Enter your bankpin
Players[0].WorldInfo := []; //Enter a desired world or leave blank for random
Players[0].LampSkill := Skill_Woodcutting;
Players[0].Active := True;
end;
(*`````````````````````````````End Player Settings`````````````````````````````*)
procedure LoadDTMz;
begin
LogDTM := DTMFromString('m1gAAAHic42JgYHBhYmAwB2JLIDYGYh8odgZiDyAOBGIHIH4KVPsYiN8C8QsgfgTEt4D4DpLYByCe2xIBJBkJ4v8MxAHCJkEwAgAAe2gOPw=='); //tol 255
TinderboxDTM := DTMFromString('mAAEAAHic42FgYJjJxMDQAcSdUAziLwHipUC8AIgXAfFCIJ4ExL1AvI+RgWEvEB8A4iNAfIoRIrYLiHcA8SYgXg/Em6H8eHsOoC2MRGMRBtIA8SZDMDIAADxCEN4=');
end;
procedure FreeDTMz;
begin
FreeDTM(LogDTM);
FreeDTM(TinderboxDTM);
end;
procedure AutoUpdate; //Auto-Update. Basically Harry's Template
var NewFile: integer;
OnlineVersion, NewScript, NewFileName: string;
begin
writeln('Checking for Updates...');
OnlineVersion := GetPage('http://pastebin.com/raw.php?i=Jr1ZSc1b'); //current online script version
//writeln(OnlineVersion);
//writeln(ScriptVersion); //declared at begining of script
if (trim(OnlineVersion) > ScriptVersion) then //checking if the number is greater than the script in uses number
begin
NewScript := GetPage('http://pastebin.com/raw.php?i=pQgZPbNL'); //getting the new script
NewFileName := ScriptPath + 'ibot11s TeaksforApes' + '.simba'; //what we are saving the new script as
NewFile := Rewritefile(NewFileName, true); //rewriting the old file with the new file
writeln('Successfully Updated!');
writeln('Please close and use the updated version...');
try //if an error occurs when saving
WriteFileString(NewFile, NewScript);
except
begin
writeln('Opps! We were unable to Update!');
terminatescript;
end;
end;
CloseFile(NewFile);
TerminateScript;
end else
writeLn('You have the latest version of the script!');
end;
Procedure DrawCustomPaintReport(st, tr, lc, wc, lb, fm: string); //Double progress report
var
PaintPic: integer;
begin
WCxph := Round((WCxp*3600) / (GetTimeRunning/1000));
LogsCutph := Round((LogsCut*3600) / (GetTimeRunning/1000));
FMxph := Round((FMxp*3600) / (GetTimeRunning/1000));
LogsBurnedph := Round((LogsBurned*3600) / (GetTimeRunning/1000));
SMART_ClearCanvas;
SMART_DrawText(8,25, UpChars07, 'Status: ', 16776960);
SMART_DrawText(58,25, Upchars07, st, 16776960);
SMART_DrawText(8,45, UpChars07, 'Time Running: ', 16776960);
SMART_DrawText(99,45, UpChars07, TimeRunning, 16776960);
SMART_DrawText(8,65, UpChars07, 'Logs Cut: ', 16776960);
SMART_DrawText(72,65, UpChars07, lc, 16776960);
SMART_DrawText(8,85, UpChars07, 'Woodcutting EXP: ', 16776960);
SMART_DrawText(122,85, UpChars07, wc, 16776960);
SMART_DrawText(8,105, UpChars07, 'Logs Burned: ', 16776960);
SMART_DrawText(96,105, UpChars07, lb, 16776960);
SMART_DrawText(8,125, UpChars07, 'Firemaking EXP: ', 16776960);
SMART_DrawText(111,125, UpChars07, fm, 16776960);
SRLProgressReport(ResultDebugBox, 'Teaks for Apes', 'ibot_dung11', 'Version ' + toStr(ScriptVersion),
['Status', 'Time Running', 'Logs Cut', 'Woodcutting EXP', 'Logs Burned', 'Firemaking EXP'],
[Status, MsToTime(GetTimeRunning,Time_Abbrev), IntToStr(LogsCut) + '(' + IntToStr(LogsCutph) + '/Hr)',
IntToStr(WCxp) + '(' + IntToStr(WCxph) + '/Hr)', IntToStr(LogsBurned) + '(' + IntToStr(LogsBurnedph) + '/Hr)',
IntToStr(FMxp) + '(' + IntToStr(FMxph) + '/Hr)']);
end;
procedure HumanWait;
begin
case random(6) of
0: wait(randomrange(50,100)); //avg 75
1: wait(randomrange(50,600)); //avg 325
2: wait(randomrange(75,150)); //avg 112
3: wait(randomrange(150,750)); //avg 450
4: wait(randomrange(100,650)); //avg 375 Tavg 227
5: wait(randomrange(0,50)); //avg 25
end;
end;
procedure HumanMouseClick;
begin
case random(10) of
0..9: ClickMouse2(mouse_left);
10: begin
ClickMouse2(mouse_right);
WaitOption('hop down', randomrange(150, 600)); //avg 375
ChooseOption('hop down');
end;
end;
end;
procedure AntiBanCamera; //When Chopping Trees
begin
case random(10000) of
0..10: MakeCompass(randomrange(65,125));
end;
end;
procedure AntiBanOther; //When not Chopping Trees
begin
case random(10000) of
0..100: MakeCompass(randomrange(85,115));
101..500: HoverSkill(8, False); //Woodcutting
300..400: HoverSkill(11, False); //Firemaking
end;
end;
procedure LocationTrees; //Between the two trees
begin
if (Not(R_NearTile(Point(2773,2699),3))) then
begin
R_WalkToPointMS(Point(2773,2699));
FFlag(0);
wait(1500);
end;
end;
procedure LocationStartFire; //West of the South tree
begin
MakeCompass(90);
if (Not(R_OnTile(Point(2773,2699)))) then
begin
R_WalkToPointMS(Point(2773,2699));
FFlag(0);
wait(1500);
end;
if (Not(R_OnTile(Point(2772,2698)))) then
begin
R_WalkToPointMS(Point(2772,2698));
FFlag(0);
wait(1500);
end;
end;
procedure WalkToTrees; //Walks to trees if it finds the Dungeon Symbol on MM
var
x, y, a, b: integer;
begin
Status := ('Walking to trees...');
DrawCustomPaintReport('Walking to trees...', TimeRunning, IntToStr(LogsCut) + '(' + IntToStr(LogsCutph) + '/Hr)',
IntToStr(WCxp) + '(' + IntToStr(WCxph) + '/Hr)', IntToStr(LogsBurned) + '(' + IntToStr(LogsBurnedph) + '/Hr)',
IntToStr(FMxp) + '(' + IntToStr(FMxph) + '/Hr)');
if (Not(R_NearTile(Point(2773,2699),6))) then //If not within 6 tiles it will
begin //search for the MM Symbols to
//relocate
if (FindSymbol(x,y, 'dungeon')) then
begin
MMouse(x,y,5,5);
HumanWait;
ClickMouse2(mouse_left);
FFlag(5);
end else
begin
Status := ('Unable to find trees...');
DrawCustomPaintReport('Unable to find trees...', TimeRunning, IntToStr(LogsCut) + '(' + IntToStr(LogsCutph) + '/Hr)',
IntToStr(WCxp) + '(' + IntToStr(WCxph) + '/Hr)', IntToStr(LogsBurned) + '(' + IntToStr(LogsBurnedph) + '/Hr)',
IntToStr(FMxp) + '(' + IntToStr(FMxph) + '/Hr)');
LogOut;
TerminateScript;
end;
if (FindSymbol(a,b, 'tree')) then
begin
MMouse(a,b,1,1);
HumanWait;
ClickMouse2(mouse_left);
FFlag(0);
wait(250);
LocationTrees;
Exit;
end;
end;
end;
procedure NoTrees; //LogsOut if unable to find trees
begin
if (TimeFromMark(FindTreeTime) > 60000) then
begin
Status := ('Unable to find any trees...');
DrawCustomPaintReport('Unable to find any trees...', TimeRunning, IntToStr(LogsCut) + '(' + IntToStr(LogsCutph) + '/Hr)',
IntToStr(WCxp) + '(' + IntToStr(WCxph) + '/Hr)', IntToStr(LogsBurned) + '(' + IntToStr(LogsBurnedph) + '/Hr)',
IntToStr(FMxp) + '(' + IntToStr(FMxph) + '/Hr)');
LogOut;
TerminateScript;
end;
end;
function FindTree: Boolean; //Searches for available trees
var
TPA, TempTPA: TPointArray;
ATPA: Array of TPointArray;
i, x, y, a, b, MinPoints, CTS: Integer;
Colors, Tolerances: TIntegerArray;
HueMods, SatMods: TExtendedArray;
TreePoint, TempPoint: TPoint;
begin
Result:= False;
LocationTrees;
MarkTime(NewLogTime);
Status := ('Searching for tree...');
DrawCustomPaintReport('Searching for trees...', TimeRunning, IntToStr(LogsCut) + '(' + IntToStr(LogsCutph) + '/Hr)',
IntToStr(WCxp) + '(' + IntToStr(WCxph) + '/Hr)', IntToStr(LogsBurned) + '(' + IntToStr(LogsBurnedph) + '/Hr)',
IntToStr(FMxp) + '(' + IntToStr(FMxph) + '/Hr)');
InvLogs := CountItems('DTM', LogDTM, []);
if ((rs_GetCompassAngleDegrees < 60) or (rs_GetCompassAngleDegrees > 130)) then
MakeCompass(randomrange(60,130));
Colors := [6526899, 4616585, 52118951]; //light, dark, leaf
Tolerances := [6, 17, 12];
HueMods := [0.03, 0.01, 0.02];
SatMods := [1.23, 0.25, 0.56];
MinPoints := 15;
CTS:= GetToleranceSpeed;
SetColorToleranceSpeed(2);
for i:= 0 to High(Colors) do
begin
SetToleranceSpeed2Modifiers(Huemods[i], SatMods[i]);
FindColorsTolerance(TempTPA, Colors[i], MSX1, MSY1, MSX2, MSY2, Tolerances[i]);
AppendTPA(TPA, TempTPA);
end;
ColorToleranceSpeed(CTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if (High(TPA)> 0) then
begin
ATPA:= SplitTPA(TPA,10);
SortATPASize(ATPA,True);
for i:= 0 to High(ATPA) do
begin
if (High(ATPA[i]) < MinPoints) then
Break;
end;
if (i = 0) then
Exit;
SetArrayLength(ATPA,i);
SortATPAFromFirstPoint(ATPA,Point(MSCX,MSCY));
for i:= Low(ATPA) to Min(High(ATPA),3) do
begin
MiddleTPAEX(ATPA[i],x,y);
MMouse(randomrange(x-5,x+5),randomrange(y-5,y+5),0,0);
if WaitUpTextMulti(['hop','own'],randomrange(50,600)) then
begin
if (IsUpTextMultiCustom(['hop','own'])) then
begin
HumanWait;
HumanMouseClick;
if (DidRedClick) then
begin
Result:= True;
Status:= ('Chopping tree...');
DrawCustomPaintReport('Chopping tree...', TimeRunning, IntToStr(LogsCut) + '(' + IntToStr(LogsCutph) + '/Hr)',
IntToStr(WCxp) + '(' + IntToStr(WCxph) + '/Hr)', IntToStr(LogsBurned) + '(' + IntToStr(LogsBurnedph) + '/Hr)',
IntToStr(FMxp) + '(' + IntToStr(FMxph) + '/Hr)');
MarkTime(FindTreeTime);
FFlag(0);
Exit;
end else
FindTree;
end;
end else
NoTrees;
end;
end;
NoTrees;
end;
procedure BurnLogs; //Burns the logs. Walks back when done or finds BlackChatMessage
var //You cant burn logs here
i, x, y, a, b: integer;
BurnSequence: TIntegerArray;
InvSlot: TBox;
CurrentTile: TPoint;
begin
Status := ('Burning logs...');
DrawCustomPaintReport('Burning logs...', TimeRunning, IntToStr(LogsCut) + '(' + IntToStr(LogsCutph) + '/Hr)',
IntToStr(WCxp) + '(' + IntToStr(WCxph) + '/Hr)', IntToStr(LogsBurned) + '(' + IntToStr(LogsBurnedph) + '/Hr)',
IntToStr(FMxp) + '(' + IntToStr(FMxph) + '/Hr)');
MakeCompass(90);
LocationStartFire;
for i:= 0 to 27 do
begin
repeat
if FindDTM(LogDTM, a, b, MIX1, MIY1, MIx2, MIy2) then
begin
if FindDTM(TinderboxDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
MMouse(randomrange(x-10,x+10),randomrange(y-8,y+8),0,0);
HumanWait;
ClickMouse2(mouse_left);
HumanWait;
CurrentTile := R_GetTileGlobal();
if FindDTM(LogDTM, a, b, MIX1, MIY1, MIx2, MIy2) then
begin
MMouse(randomrange(a-10,a+10),randomrange(b-8,b+8),0,0);
HumanWait;
ClickMouse2(mouse_left);
IncEx(FMxp, 110);
Inc(LogsBurned);
DrawCustomPaintReport('Burning logs...', TimeRunning, IntToStr(LogsCut) + '(' + IntToStr(LogsCutph) + '/Hr)',
IntToStr(WCxp) + '(' + IntToStr(WCxph) + '/Hr)', IntToStr(LogsBurned) + '(' + IntToStr(LogsBurnedph) + '/Hr)',
IntToStr(FMxp) + '(' + IntToStr(FMxph) + '/Hr)');
wait(500);
repeat
if (FindBlackChatMessage('ou can')) then
begin
WalkToTrees;
Exit;;
end;
if ((R_GetTileGlobal = CurrentTile) or (R_IsAnimating)) then
wait(randomrange(1850,2150));
until(R_IsAnimating = False);
end else
Break;
end else
LogOut;
Break;
end else
Break;
until(i = 27);
end;
WalkToTrees;
end;
procedure NoNewLogs; //If no new logs are found in the inventory it will search
begin //for a new tree
if (TimeFromMark(NewLogTime) > 20000) then
begin
wait(randomrange(0,5000));
LocationTrees;
FindTree;
end;
end;
procedure DropInv; //Drops all of the logs in a sequence
var
i, x, y: integer;
DropSequence: TIntegerArray;
InvSlot: TBox;
begin
if (DropLogs = True) then
begin
Status := ('Dropping logs...');
DrawCustomPaintReport('Dropping logs...', TimeRunning, IntToStr(LogsCut) + '(' + IntToStr(LogsCutph) + '/Hr)',
IntToStr(WCxp) + '(' + IntToStr(WCxph) + '/Hr)', IntToStr(LogsBurned) + '(' + IntToStr(LogsBurnedph) + '/Hr)',
IntToStr(FMxp) + '(' + IntToStr(FMxph) + '/Hr)');
case random(100) of
0..20: DropSequence := [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,
22,23,24,25,26,27,28]; //row
21..60: DropSequence := [1,5,9,13,17,21,25,2,6,10,14,18,22,26,3,7,11,15,19,23,
27,4,8,12,16,20,24,28]; //column top
61..100: DropSequence := [1,5,9,13,17,21,25,26,22,18,14,10,6,2,3,7,11,15,19,23,
27,28,24,20,16,12,8,4]; //column top bottom top
end;
for i:= 0 to 27 do
begin
InvSlot := InvBox(DropSequence[i]);
//writeln(inttostr(DropSequence[i]));
if FindDTM(LogDTM, x, y, InvSlot.x1, InvSlot.y1, InvSlot.x2, InvSlot.y2) then
begin
MouseItem(DropSequence[i],mouse_right);
WaitOption('rop',randomrange(0,350));
ChooseOption('rop');
end;
end;
end else
BurnLogs;
end;
procedure LiveInvUpdater; //Real-Time inv updater
begin
InvLogsCheck := CountItems('DTM', LogDTM, []);
if (IsUpTextMultiCustom(['hop','own'])) then
begin
if (CountItems('DTM', LogDTM, []) > InvLogs) then
begin;
MarkTime(NewLogTime);
MarkTime(FindTreeTime);
IncEx(WCxp, 85);
Inc(InvLogs);
Inc(LogsCut);
DrawCustomPaintReport('Chopping tree...', TimeRunning, IntToStr(LogsCut) + '(' + IntToStr(LogsCutph) + '/Hr)',
IntToStr(WCxp) + '(' + IntToStr(WCxph) + '/Hr)', IntToStr(LogsBurned) + '(' + IntToStr(LogsBurnedph) + '/Hr)',
IntToStr(FMxp) + '(' + IntToStr(FMxph) + '/Hr)');
LevelUp;
end else
NoNewLogs;
end;
end;
procedure CheckInv; //Checking the inv for logs, Mod talking, and WC level up
begin
repeat
LiveInvUpdater;
AntiBanCamera;
FindMod();
LevelUp();
until (not(IsUpTextMultiCustom(['hop','own'])) or (invFull));
if (invFull) then
begin
LiveInvUpdater;
DropInv;
AntiBanOther;
end else
Exit;
end;
begin //Start-Up
ClearDebug;
writeln('Starting Script...');
DeclarePlayer;
SetupSRL;
SetupReflection;
SMART_ClearCanvas;
Writeln('');
AutoUpdate;
Writeln('');
If (Not LoggedIn) then
begin
LogInPlayer;
end;
LoadDTMz;
SetRun(True);
SetAngle(0);
MakeCompass(randomrange(60,130));
MarkTime(FindTreeTime);
CheckInv;
WalkToTrees;
repeat //Main
FindTree;
CheckInv;
until((LogsCut = CutLogs) or False);
begin
writeln('');
writeln(IntToStr(CutLogs) + ' logs have been cut!');
writeln('Logging out...');
LogOut;
TerminateScript;
end;
AddOnTerminate('FreeDTMz');
TerminateScript;
end.