Mr. Roboto
2014-08-28 02:53:08
How Long have You Played Runescape?
10 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
Java, C#, C++, C, Object Oriented programming & Design Patterns.
Are you a member of any other communities?
Nope.
Tell us about yourself…
Please show us one (or multiple) of your scripts.
10 Year(s)
Are you affilated in anyway with Jagex LTD?
No
Were you Referred to SRL?
What is your general programming knowledge?
Java, C#, C++, C, Object Oriented programming & Design Patterns.
Are you a member of any other communities?
Nope.
Tell us about yourself…
From: Mr. Roboto
I am currently finishing my PhD in Computer Science. I should graduate if my advisor stops thinking of his students as slaves. I teach and build video games for a very small company. I love building and designing good software, plus I really love Design Patterns.
I started to play runescape back in classic. I stopped playing around 2005, but I return to play on and off sometimes. I botted a bit around 2012 but now I am more serious about botting the heck out of RS. I wrote a script in 30 mins or an hour after The Mayor encouraged me in the forums, so I thank him for that. [EDIT] I have kept working on the script after that.
A bit of personal information: I am in my late twenties. I live in USA. I consider myself respectful but easy going. I enjoy all sorts of music, but I mostly enjoy rock and blues or 80s. My favorite shows, in no particular order: It’s Always Sunny in Philly, Game of Thrones, Generation Kill, Rome, Lost, House, X-Files. (I guess I been watching a lot of TV lately lol).
I hope you consider my application.
Thanks,
Mr. Roboto
Please show us one (or multiple) of your scripts.
// You can download the script from the thread:
// https://villavu.com/forum/showthread.php?t=109817&p=1303571#post1303571
program MrRoboto_RD_ThievingCrafting;
{$DEFINE SMART}
{$I SRL-6/SRL.simba}
{$I SPS/lib/SPS-RS3.Simba}
const
VERSION = '3.4';
isCRAFTER = true;
// In hours.
MIN_EXECUTION_TIME = 2;
MAX_EXECUTION_TIME = 5;
var
startXP : integer;
previousXPGained : integer;
uncutGem_DTM : integer;
cutGem_DTM : integer;
finalExecutionTime : integer;
// Log in.
procedure logIn()
begin
setLength(players, 1);
with players[0] do
begin
loginName := ''; // username
password := ''; // password
isActive := true;
isMember := true;
end
currentPlayer := 0;
end;
// Random handler.
procedure findRandoms();
begin
exitTreasure();
claimTicket();
end;
// Antiban.
procedure antiBan()
var
i: integer;
begin
i := random(1500);
writeLn('Starting Antiban.');
case i of
1..4 : boredHuman(true);
5..20: begin
hoverSkill(SKILL_THIEVING);
wait(gaussRangeInt(1500, 5000));
end;
21..23: mouseMovingObject();
24..34: sleepAndMoveMouse(randomRange(100, 6000));
35..45: begin
mouseOffClient(Random(4));
wait(randomRange(2000, 15000));
end;
46..50: wait(randomRange(1000, 2000));
51..63: pickUpMouse();
64..65: begin
powersScreen.open();
wait(randomRange(1000, 3000));
powersScreen.openTab(random(5 + 1));
wait(randomRange(2000, 4000));
if random(2) = 1
then powersScreen.openSubTab(random(2));
powersScreen.close();
end;
66..70: smallRandomMouse();
71..80: begin
hoverSkill(SKILL_CRAFTING);
wait(gaussRangeInt(1500, 5000));
end;
end;
end;
// Prints a report of the bot.
procedure progressReport()
var
PAD : integer;
xpGained : integer;
xpPerHour : integer;
begin
PAD := 42;
previousXPGained := xpGained;
xpGained := chatBox.getXP() - startXP;
xpPerHour := round(xpGained * 3600000.0 / getTimeRunning());
// Print proggy.
clearDebug();
writeLn('||----------------------------------------||');
writeLn(padR('|| Mr. Roboto - RD Thieving/Craft (Rev. ' + VERSION + ')', PAD) + '||');
writeLn(padR('||', PAD) + '||');
writeLn(padR('|| Time running: ' + msToTime(getTimeRunning(), TIME_SHORT), PAD) + '||');
writeLn(padR('|| Experience earned: ' + toStr(xpGained) + ' (' + toStr(xpPerHour) + ' PH)', PAD) + '||');
writeLn('||----------------------------------------||');
end;
procedure cleanUp()
begin
FreeDTM(uncutGem_DTM);
FreeDTM(cutGem_DTM);
end;
// Stops the script. Logs the reason for terminating.
procedure stopScript(exception : string)
begin
wait(randomRange(2000, 3000));
progressReport();
writeLn('');
writeLn('Termination reason: ' + exception);
writeLn('');
writeLn('Post all proggys on the thread if you want updates.');
writeLn('------------------------------------------');
writeLn('');
players[currentPlayer].logout();
cleanUp();
terminateScript();
end;
// Returns XP from the XP bar in the chatbox. Made by Ashaman88.
function TRSChatBox.getXP(): integer;
var
b: TBox;
s: String;
tpa : TPointArray;
atpa : T2DPointArray;
i,p: Integer;
begin
B := self.getBounds();
B.edit(+(b.x2-b.x1)-140, +10, -5, -94);
findColorsTolerance(TPA, 14013909, b, 4, colorSetting(2, 0.00, 0.00));
if length(TPA) < 2 then
begin
writeLn('chatBox.getXP(): No XP found!');
exit;
end;
ATPA := tpa.cluster(5);
B := atpa.getbounds();
B.edit(-2, -2, +2, +3);
S := replace(tesseractgettext(B.x1, B.y1, B.x2, B.y2, FILTER_SMALL_CHARS), ' ', '', [rfReplaceAll]);
P := pos('x', S);
if P > 0 then
result := strToIntDef(extractFromStr(copy(S, P, length(S)), numbers), 0)
else
result := strToIntDef(extractFromStr(S, numbers), 0);
//writeLn('chatBox.getXP(): XP found: ' + toStr(result));
end;
// Tries to unlock the safe.
procedure unlockSafe()
var
x, y : integer;
failCount : integer;
found : boolean;
begin
// Loop until a safe is found.
repeat
// Search for a safe.
if mainscreen.findObject(x, y, 10722709, 3, ['rack Wall safe'], MOUSE_MOVE)
then begin
mouse(x, y, -20, 20, MOUSE_LEFT);
// Antiban stuff.
findRandoms();
antiBan();
// Safe was found, so we can exit loop.
found := true;
end
// Check if we failed to find the safe too many times.
else if failCount >= 2
then begin
stopScript('[Failed too many times to find the safe]');
end
// Increment failCount.
else
failCount := failCount + 1;
// Loop condition.
until found = true;
end;
// Does the actual crafting of the gems.
procedure productionManager()
begin
if productionScreen.isOpen(3000)
then begin
productionScreen.selectBox(3); //whatever box
productionScreen.clickStart(); //click start
if progressScreen.isOpen(2000)
then repeat
wait(100);
antiBan(); //wait until cancel button is no longer up
until progressScreen.getButton() <> PROGRESS_BUTTON_CANCEL;
end;
end;
// Crafts what ever DTM is given. Useful for uncut gems and cut gems.
// Parameter is passed by reference.
procedure craftGems(var dtm : integer)
var
isDone : boolean;
x, y: integer;
begin
isDone := false;
// Repeat until done with all types of gems in bag.
repeat
if(findDTM(dtm, x, y, tabBackPack.getBounds()))
then begin
mouse(x, y, 5, 5, MOUSE_LEFT);
productionManager();
antiBan();
end
else
isDone := true;
until isDone = true;
end;
procedure setupDTMs()
begin
// DTM belongs to The Mayor.
uncutGem_DTM := DTMFromString('m1gAAAHic42JgYNjExMCwDYhXAvESJgh/JxTvAuLVUDkuIGYGYkYg5gZiMSDmBWJRIBaB0iBcISEINJUJB2aEs/8zEAcYicQIAABXaglk');
// First DTM by me.
cutGem_DTM := DTMFromString('m6wAAAHiclczNCkBgEIXhg5KSG2BhY2NngfwmFti4ZNfGG1+x5NTTnGlqfEmdK02YjRUDSuQoUKHF6NDRYMCCzVid+96jRrZHfLflhck1JesSxKnZH4e+x/rhlROkwwif');
end;
// Will put the character to rest(sit down). From The Mayor.
procedure TRSMinimap.rest();
var
p: TPoint;
begin
p := self.button[MM_BUTTON_RUN].center;
if (not self.isResting()) then
begin
mouseCircle(p.x, p.y, self.button[MM_BUTTON_RUN].radius, MOUSE_RIGHT);
chooseOption.Select(['Rest']);
end;
end;
// Checks HP and then rests the player.
procedure hpManager()
begin
// Check if HP is less than the numbers between 20 and 30.
if(actionbar.getHPPercent() < randomRange(40, 50))
then begin
minimap.rest();
wait(1000);
// Check if we are actually resting.
if(minimap.isResting() = false)
then stopScript('[Failed to rest]');
repeat
wait(randomRange(1000, 2000));
antiBan();
until actionbar.getHPPercent() > randomRange(80, 90);
end;
end;
// Will put the bot in break mode.
// TODO: return from break.
procedure breakSystem()
begin
if(getTimeRunning() > finalExecutionTime)
then stopScript('[Taking a break]');
end;
// Main.
begin
clearDebug();
//smartEnableDrawing := true;
setupSRL();
logIn();
if not isLoggedIn()
then begin
players[currentPlayer].login();
wait(randomRange(1500, 3000));
minimap.setAngle(MM_DIRECTION_NORTH);
findRandoms();
end;
setupDTMs();
mainscreen.setAngle(MS_ANGLE_HIGH);
// Calculate break time. 3600000 => 60*60*1000.
finalExecutionTime := randomRange(MIN_EXECUTION_TIME, MAX_EXECUTION_TIME) * 3600000;
// Store the xp you started with.
startXP := chatBox.getXP();
// Bot logic.
repeat
repeat
// Check if still loggedIn.
if not isLoggedIn()
then stopScript('[Logged out]');
// Check if we need a break.
breakSystem();
// Find randoms, just incase.
findRandoms();
// Start unlocking the safe.
unlockSafe();
// Print proggy.
progressReport();
// Heal if needed.
hpManager();
wait(randomRange(7550, 9013));
until tabBackPack.isFull();
if(isCRAFTER = True)
then begin
craftGems(uncutGem_DTM);
wait(randomRange(1200, 3000));
antiBan();
craftGems(cutGem_DTM);
// Check if bag is still full.
if(tabBackPack.isFull())
then stopScript('[Bag is still full, failed to craft]');
antiBan();
end
else
tabBackPack.dropItems(DROP_PATTERN_SNAKE);
until false;
end.