PDA

View Full Version : [Ranging] [AeroLib] Revised Ranged Guild



captainblast
07-23-2015, 11:32 PM
What it does

- Plays the ranged guild mini-game for experience and archery tickets
- Lines the mini-map up with the target to achieve more experience per hour
- Get anywhere from 15,000-30,000 ranged experience an hour, as well as archery tickets
- Included anti-ban, dismisses randoms, etc.
- Has a paint
- 100% color
- Failsafes

Requirements/Setup

- Newest Aerolib
- Newest Simba
- Wear the highest level longbow you can
- The higher the ranged bonus you have the better experience per hour
- Recommended: Magic Longbow or DarkBow

Getting the script ready

- Make sure you have atleast 10,000+ gold coins in your inventory
- For the most ideal spot, stand here
http://i.imgur.com/2g1JGad.png
- Make sure you have your attack style set to accurate!
- Max brightness
- Set your interpreter to lape.
- If you have any problems, feel free to post here. I will try to help.

Credits
- This script and post would not be possible without P1nky. He did all the updating and scripting on this version of script! I merely posted it here because this section is lacking a working ranged guild script. Huge thank you! Please do not bug him about problems or anything, instead post here.
- Davi. The core/bulk of the script is Davi's work (even most the layout of this thread) https://villavu.com/forum/showthread.php?t=112981
We all appreciate the work you have done! Thank you.
- This community. I love the SRL community, and the help they are all willing to give. There are to many names to list, so instead, I am going to just say the SRL in whole deserves a huge round of applause and thanks for what they have contributed to this community, and to the community of Runescape. <3

Thank you everyone!

Proggies

http://i.imgur.com/gX8Hheq.png

http://i.imgur.com/e8f1q2d.png

Below is the updated version, enjoy! Let us know how it runs, and any suggestions you may have. This script WILL NOT be regularly updated, unless it breaks, if you run into any minor problems, we encourage you to look at the guides and fix it on your own!

Download script here:
26467

webbydee
07-23-2015, 11:44 PM
Awesome work man

Note
07-24-2015, 12:52 AM
Will try it today and let you know how it goes :D

srlMW
07-24-2015, 01:29 AM
Always appreciative of a share. Good work :)

Note
07-24-2015, 03:09 AM
[=================================]
| < Aero|Library > |
| ---------------- |
| Version : 1.2 |
| Revision : 1 |
[=================================]
[AL] Initiating AeroLib...
[AL] Checking version...
[AL] Currently up to date.
[AL] Loaded 2 MSObjects.
[AL] Paired with SMART[6252]
[AL] Startup complete!
Couldn't grab xp values - will under report
Couldn't grab xp values - will under report
Couldn't grab xp values - will under report
Couldn't grab xp values - will under report
[AL] Logging player in...
Couldn't grab xp values - will under report
Couldn't grab xp values - will under report
[AL] Logging player in...
Couldn't grab xp values - will under report
Couldn't grab xp values - will under report
Couldn't grab xp values - will under report
Couldn't grab xp values - will under report
Couldn't grab xp values - will under report
Couldn't grab xp values - will under report
Couldn't grab xp values - will under report
Couldn't grab xp values - will under report
Couldn't grab xp values - will under report
Couldn't grab xp values - will under report
Couldn't grab xp values - will under report
Couldn't grab xp values - will under report
Couldn't grab xp values - will under report
Couldn't grab xp values - will under report
Couldn't grab xp values - will under report
Couldn't grab xp values - will under report
[AL] Logging player in...
Couldn't grab xp values - will under report
Timed out: Could not complete shooting - Terminating script
Thanks for using Davi's Ranger. Ran for: 28 Minutes and 18 Seconds
Successfully executed.
unsure why im getting this everything is set as requirements for macroing babysitting right now so ill see if it will happen again

Investigation Report
Rather Odd, I baby sat it and it functioned properly.. though there are slight "stops" the status on screen says lining up target.. and stays there for some 5-8seconds then shoots.. Encountered onther instance where everything is runing fine and just terminates saying "could not complete shooting" when it actually was shooting.. Hope this helps.

P.s How do i enable full debug mode where it states what procedure / function it's doing as in.. outlining every step its making in the debug.. (i don't know if this feture is still available in srl?)

Ez Flow
08-01-2015, 12:48 PM
Script is working well. IT oddly times out and stops working every 15 - 45 minutes though. claims it cannot finish the round or whatever even though it was working just fine previously. Either way whuile babysitting it helps and works well. Also... is there a reason that this script asks for the pin when it doesn't use bank? i just found that a bit strange

jstemper
08-06-2015, 06:55 PM
Still has that one problem when lining up, causing the script to terminate because it could not complete shooting. Idk how the heck you have a 5 hour proggy of this script

Edit: I deleted lines 531-536(the shooting failsafe)and no longer have that problem

captainblast
08-15-2015, 08:41 AM
Hey thanks for the feedback guys. I had an account banned, so I kind of went semi-inactive for a bit, I am going to fire up this script soon and see how she functions. I will upload any changes if I update the script at all :]



unsure why im getting this everything is set as requirements for macroing babysitting right now so ill see if it will happen again

Investigation Report
Rather Odd, I baby sat it and it functioned properly.. though there are slight "stops" the status on screen says lining up target.. and stays there for some 5-8seconds then shoots.. Encountered onther instance where everything is runing fine and just terminates saying "could not complete shooting" when it actually was shooting.. Hope this helps.

P.s How do i enable full debug mode where it states what procedure / function it's doing as in.. outlining every step its making in the debug.. (i don't know if this feture is still available in srl?)

Couldn't grab xp values relates to the stats ID (could be wrong here), not a big deal I believe but helps to have so you can see what your total botting stats are. Not sure if simba has that feature or not man I gotta see for myself.


Script is working well. IT oddly times out and stops working every 15 - 45 minutes though. claims it cannot finish the round or whatever even though it was working just fine previously. Either way whuile babysitting it helps and works well. Also... is there a reason that this script asks for the pin when it doesn't use bank? i just found that a bit strange

Yes I noticed this as well and believe it pertains to the shooting failsafe (as mentioned by jstemper) Try deleting lines 531-536 and see if that helps. Not sure why the script asks for the pin either, the original base script that Davi wrote had the same thing and it was never removed after being edited. It never accesses the bank or anything. Feel free to delete it out if you wish.


Still has that one problem when lining up, causing the script to terminate because it could not complete shooting. Idk how the heck you have a 5 hour proggy of this script

Edit: I deleted lines 531-536(the shooting failsafe)and no longer have that problem

Yeah I had problems with that as well, after deleting that failsafe like you mentioned it usually helps. I need to test the script out and see how it is running now.

Thanks again for the feedback guys.

fulldragons
08-28-2015, 07:39 PM
Very nice works mates, but theres something i want to say, when your range level is up, program do missclick which mean you run out of area, it tryes to get you back to the position where you standed but after some time of not succesfully finding juddge it log you out, thats mean it works so good, but until you level up
Anyway first script i found which work correctly, i checked it and it also did antirandoms so great, hat down my boy, nice work

nitroxx0025
08-30-2015, 04:57 PM
seems to be working pretty good for me anyone knows the banrate of this ?

jstemper
08-31-2015, 01:24 AM
seems to be working pretty good for me anyone knows the banrate of this ?

Historically, botting at the range guild has always been quite risky. It was actually my first ban (temp ban) on my pure account

LOA123
09-19-2015, 01:33 AM
Error: File "AeroLib/AeroLib.simba " not found at line 4
Compiling failed.

not sure what to do when this happens. i would love to use this script though.

AFools
09-19-2015, 04:33 AM
Error: File "AeroLib/AeroLib.simba " not found at line 4
Compiling failed.

not sure what to do when this happens. i would love to use this script though.

You need to install the AeroLib Include;

elvenred
10-21-2015, 09:25 PM
got banned using this, would definitely try to add a little more variety to the script, either way, range guild is a dangerous place.

toxjq
06-18-2016, 02:42 AM
[====================================]
[ Randoms Report ]
[____________________________________]
[ Dismissed 0 random events ]
[====================================]
Timed out: Could not complete shooting - Terminating script
Thanks for using Davi's Ranger. Ran for: 2 Minutes and 39 Seconds
Successfully executed.

carib0u
04-08-2017, 09:20 PM
Was running into an initiation error with the previously posted script. The below is what I've updated... I will continue to work out the kinks, as the script's not running flawlessly every time!


program P1nkyDaviRanger
{$DEFINE SMART}
{$DEFINE WALKER}
{$I AeroLib/AeroLib.simba }

const

ba := BitmapFromString(9, 9, 'meJyTNXaWNXZmZGDgNA5jEFcDMuBI' +
'SscCwgBKQRjy5u7iGsZwBXAtKrb+sgZ2gvIaQLaCggFci0Fgp o5nv' +
'CzMCmQtQCkgG2gFEEEUw21BdgmQjcZFVoNLC5DEpQXIAADr/BYQ');

at := BitmapFromString(11, 8, 'meJzLmtOUNadp8rqduFAWWAEcYSp' +
'IqF4JR1gV45KFI/yyRCrAI0sMAgAzII4j');

var
Limit, lor, minAnti, maxAnti, AntiAmount, xp, xpPerHour, tickets, x,y : Integer;
RSW : TRSWalker;
started, handleRandoms : Boolean;
target : TPoint;
DsgnForm:TForm;
UsernameBox,PasswordBox, NickBox, PinBox,AntibanBox,AmountBox,delayminBox,delaymaxBo x: TEdit;
UsernameLabel, PasswordLabel, NickLabel, PinLabel, AntibanLabel, AmountLabel, delayLabel, typeLabel, seconds, seperator: TLabel;
randomsBox : TCheckBox;
PlayButton : TButton;
lastTime : Extended;
ticks, arrows: TItem;
tim, tim1: Timer;

procedure Draw(text: string);
begin
xpPerHour := round(xp * 3600 / (getTimeRunning / 1000));
OS_Smart.__Graphics.Clear;
OS_Smart.__Graphics.DrawClippedText('Made by: Davi', 'SmallChars', point(12, 278), clWhite);
OS_Smart.__Graphics.DrawClippedText('_____________ ', 'SmallChars', point(12, 284), clWhite);
OS_Smart.__Graphics.DrawClippedText('Status : ' + text, 'SmallChars', point(12, 304), clWhite);
OS_Smart.__Graphics.DrawClippedText('Time Running : ' + TimeRunning, 'SmallChars', point(220, 278), clYellow);
OS_Smart.__Graphics.DrawClippedText('XP : ' + inttostr(xp),'SmallChars', point(220, 292), clYellow);
OS_Smart.__Graphics.DrawClippedText('XP per hour : ' + inttostr(xpPerHour),'SmallChars', point(220, 306), clYellow);
OS_Smart.__Graphics.DrawClippedText('Tickets earned : ' + inttostr(tickets),'SmallChars', point(220, 320), clYellow);
end;

procedure OnlyPostiveNumbers(Sender: TObject; var Key:Char); native; // Thanks ineedbot
begin
case toStr(key) of
#8, '0'..'9':begin
end;
else begin
Key := #0;
end;
end;
end;

procedure Start(Sender: TObject); native;
begin
PlayButton:begin
started := true;
DsgnForm.Close;
end;
end;

procedure OnlyNumbers(Sender: TObject; var Key: Char); native; // Thanks ineedbot
begin
case toStr(key) of
#8, '0'..'9', '-':begin
if(toStr(key) = '-')then begin
if(AmountBox.getSelStart <> 0)then begin
Key := #0;
end;
end;
end;
else begin
Key := #0;
end;
end;
end;

procedure InitForm;
var TempFont : TFont;
begin
DsgnForm.init(nil);
with DsgnForm do
begin
setCaption('Davi''s Ranger');
setBorderStyle(bsSingle);
setLeft(25);
setTop(25);
setWidth(512);
setHeight(409);
end;
UsernameBox.init(DsgnForm);
with UsernameBox do
begin
setParent(DsgnForm);
setText('');
setLeft(200);
setTop(37);
setWidth(257);
setHeight(23);
end;
UsernameLabel.init(DsgnForm);
with UsernameLabel do
begin
setParent(DsgnForm);
setCaption('Username or eMail :');
setLeft(30);
setTop(37);
setWidth(150);
setHeight(23);
end;
PasswordBox.init(DsgnForm);
with PasswordBox do
begin
setParent(DsgnForm);
setText('');
setLeft(200);
setTop(70);
setWidth(200);
setHeight(23);
setPasswordChar('*');
setMaxLength(20);
end;
PasswordLabel.init(DsgnForm);
with PasswordLabel do
begin
setParent(DsgnForm);
setCaption('Password :');
setLeft(30);
setTop(70);
setWidth(150);
setHeight(23);
end;
NickBox.init(DsgnForm);
with NickBox do
begin
setParent(DsgnForm);
setText('');
setLeft(200);
setTop(113);
setWidth(80);
setHeight(23);
end;
NickLabel.init(DsgnForm);
with NickLabel do
begin
setParent(DsgnForm);
setCaption('Nickname (random solving) :');
setLeft(30);
setTop(113);
setWidth(150);
setHeight(23);
end;
PinBox.init(DsgnForm);
with PinBox do
begin
setParent(DsgnForm);
setText('');
setLeft(200);
setTop(156);
setWidth(80);
setHeight(23);
setMaxLength(4);
setPasswordChar('*');
setONKEYPRESS(OnlyPostiveNumbers);
end;
PinLabel.init(DsgnForm);
with PinLabel do
begin
setParent(DsgnForm);
setCaption('Pin (If you have one) :');
setLeft(30);
setTop(156);
setWidth(150);
setHeight(23);
end;
AntibanBox.init(DsgnForm);
with AntibanBox do
begin
setParent(DsgnForm);
setText('100');
setLeft(200);
setTop(199);
setWidth(80);
setHeight(23);
setONKEYPRESS(OnlyPostiveNumbers);
setMaxLength(3);
end;
AntibanLabel.init(DsgnForm);
with AntibanLabel do
begin
setParent(DsgnForm);
setCaption('Antiban freq (Percentage) :');
setLeft(30);
setTop(199);
setWidth(150);
setHeight(23);
end;
delayminBox.init(DsgnForm);
with delayminBox do
begin
setParent(DsgnForm);
setText('2');
setLeft(200);
setTop(242);
setWidth(80);
setHeight(23);
setONKEYPRESS(OnlyPostiveNumbers);
setMaxLength(2);
end;
delaymaxBox.init(DsgnForm);
with delaymaxBox do
begin
setParent(DsgnForm);
setText('8');
setLeft(320);
setTop(242);
setWidth(80);
setHeight(23);
setONKEYPRESS(OnlyPostiveNumbers);
setMaxLength(2);
end;
delayLabel.init(DsgnForm);
with delayLabel do
begin
setParent(DsgnForm);
setCaption('Minimum antiban delay :');
setLeft(30);
setTop(242);
setWidth(150);
setHeight(23);
end;
seconds.init(DsgnForm);
with seconds do
begin
setParent(DsgnForm);
setLeft(410);
setTop(242);
setWidth(100);
setHeight(23);
setCaption('seconds');
end;
seperator.init(DsgnForm);
with seperator do
begin
setParent(DsgnForm);
setLeft(295);
setTop(242);
setWidth(100);
setHeight(23);
setCaption('to');
end;
AmountBox.init(DsgnForm);
with AmountBox do
begin
setParent(DsgnForm);
setText('-1');
setLeft(200);
setTop(285);
setWidth(80);
setHeight(23);
setONKEYPRESS(OnlyNumbers);
setMaxLength(6);
end;
AmountLabel.init(DsgnForm);
with AmountLabel do
begin
setParent(DsgnForm);
setCaption('Limit (-1 for no limit) :');
setLeft(30);
setTop(285);
setWidth(150);
setHeight(23);
end;
randomsBox.init(DsgnForm);
with randomsBox do
begin
setParent(DsgnForm);
setCaption('Handle randoms');
setState(0);
setLeft(200);
setTop(328);
setWidth(90);
setHeight(19);
end;
PlayButton.init(DsgnForm);
with PlayButton do
begin
setParent(DsgnForm);
setCaption('Play');
setLeft(200);
setTop(371);
setWidth(75);
setHeight(25);
setOnClick(Start);
end;
end;


procedure ShowFormModal();Native;
begin
InitForm;
DsgnForm.showModal();

ticks.BMP := at;
ticks.Name := 'Archery ticket';
ticks.Wieldable := False;
ticks.BMP_TOL := 15;

arrows.BMP := ba;
arrows.Name := 'Bronze arrow';
arrows.Wieldable := True;
arrows.BMP_TOL := 15;

Me.Name := UsernameBox.getText;
Me.Pass := PasswordBox.getText;
Me.Nick := NickBox.getText;
Me.Pin := PinBox.getText;
Me.Member := True;
Me.Active := True;

SMART_ShowConsole := false;
SMART_UserAgent := 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0';

handleRandoms := (toStr(randomsBox.getState) = 'cbChecked');

if (Length(AmountBox.getText) > 0) then
begin
limit := StrToInt(AmountBox.getText)
end else
begin
limit := 9999999 // Arbitrarily large
end;

if (Length(AntiBanBox.getText) > 0) then
begin
AntiAmount := StrToInt(AntiBanBox.getText)
end else
begin
AntiAmount := 0;
end;
if (Length(delayminBox.getText) > 0) then
begin
minAnti := StrToInt(delayminBox.getText)
end else
begin
minAnti := 0;
end;
if (Length(delaymaxBox.getText) > 0) then
begin
maxAnti := StrToInt(delaymaxBox.getText)
end else
begin
maxAnti := 0;
end;
DsgnForm.Free;
end;

procedure SafeShowModal;
begin
sync(showFormModal);
end;

function checkAnti() : Boolean;
var
perc : Integer;
begin
if (AntiAmount > 0) then
begin
perc := AntiAmount - 1
case random(100) of
0..perc: Result:= True;
end;
end;
end;

procedure customAnti;
var
time : Extended;
begin
time := getTimeRunning - randomRange(minAnti*1000,maxAnti*1000);
if lastTime < time then
begin
if (checkAnti) then
begin
waitEx(10); // to handle randoms during Anti
draw('Performing antiban');
case random(9) of
0: randomMovement();
1: boredHuman();
2: pickUpMouse();
3: boredHuman();
4: hoverSkill('random', false);
5: SleepAndMoveMouse(3000);
6: compassMovement(40,120,False);
7: randomFKeys(True);
8: MMouseOffClient('rand');
end;
end;
lastTime := getTimeRunning;
end;
end;

procedure customMouse(point: TPoint);
// This methodology was inspired by rj's antiban guide
begin
case random(200) of
0..160: HumanMMouse(point, random(5), random(5));
161..190: HumanMMouse(point, random(7), random(7));
191..200: HumanMMouse(point, random(10), random(10));
end;
end;
Procedure RandomWait;
Begin
Draw('Waiting');
case random(1000) of
0..700: wait(RandomRange(400, 1000));
701..900: wait(RandomRange(600, 1600));
901..1000: wait(RandomRange(800, 3800));
End;
End;

function findNearestTarget(): Boolean;
var
TPA: TPointArray;
ATPA: T2DPointArray;
I: Integer;
box: TBox;
begin
if not FindColorsSpiralTolerance(x, y, TPA, 5888743, MSX1, MSY1, MSX2, MSY2, 10) then
exit;
ATPA := SplitTPA(TPA, 5);
SortATPAFromFirstpoint(ATPA, Point(0, 0));
if (length(ATPA) <= 0) then
begin
result := False;
exit;
end;
//os_smart.__Graphics.DrawATPA(ATPA);
for I := 0 to high(ATPA) do
begin
if (length(ATPA[I]) >= 10) then
begin
//os_smart.__Graphics.DrawTPA(ATPA[I], 255); also for debugging purposes
box := intToBox(ATPA[I].getBounds().X1, ATPA[I].getBounds().Y1 - 25, ATPA[I].getBounds().X2, ATPA[I].getBounds().Y2);
if (box.x1 < 0) then
box.x1 := 0;
if (box.y1 < 0) then
box.y1 := 0;
target := MiddleTPA(ATPA[I]);
result := True;
exit;
end;
end;
result := False;
end;

procedure startCompetition;
var
found, repos : boolean;
begin
case random(2) of
0: lor := vk_right;
1: lor := vk_left;
end;
tim.start;
tim1.start;
repeat
if (RSW._GetPos.Y < 2767) or (RSW._GetPos.X < 2477) then
RSW.blindWalk(point(2487,2777));
if handleRandoms then
waitEx(50);
if not isLoggedIn() then
break;
if (tim.timeElapsed > 20000) then
begin
Writeln('Timed out: Could not find Judge - Terminating script');
logoutPlayer;
TerminateScript;
end;
if (tim1.timeElapsed > 5000) and (not found) then
begin
Draw('Checking under character');
customMouse(point(MSCX,MSCY));
fastClick(mouse_Right);
WaitUpText('ompetition', randomrange(300, 800));
if ChooseOptionMulti(['ompetition']) then
begin
found := True;
waitChatChange;
end;
tim1.start;
end;
draw('Looking for judge');
if(findMSObjectSimple([2180171, 1914942], ['ompetition', 'udge']) and (not found)) then
begin
fastClick(mouse_Right);
WaitUpText('ompetition', randomrange(300, 400));
if ChooseOptionMulti(['ompetition']) then
begin
found := True;
waitChatChange;
end;
end else
begin
keyDown(lor);
wait(randomRange(500,1000));
keyUp(lor);
end;
until(found = true);
DoConversation(['ure']);
arrows.Interact(mouse_Left);
end;

procedure doCompetition;
var
tim2, tim3 : Timer;
amount, namount, ticketsGained, count : integer;
shooting, found : boolean;
begin
amount := ticks.getAmount(True);
count := 0;
shooting := false;
tim.start;
tim1.start;
repeat
if (RSW._GetPos.Y < 2767) or (RSW._GetPos.X < 2477) then
RSW.blindWalk(point(2487,2777));
if handleRandoms then
waitEx(50);
if not isLoggedIn() then
break;
if tim.timeElapsed > 60000 then
begin
Writeln('Timed out: Could not complete shooting - Terminating script');
logoutPlayer;
TerminateScript;
end;

if (shooting = false) then //find target
begin
if (tim1.timeElapsed > 30000) and (not found) then
begin
Writeln('Timed out: Could not find targets - Terminating script');
logoutPlayer;
TerminateScript;
end;
setAngle(ANGLE_LOW);
draw('Looking for targets');
if (findNearestTarget = False) then
begin
keyDown(vk_left);
wait(randomRange(500,1000));
keyUp(vk_left);
end else
begin
found := true;
if (target.X < 475) or (target.X > 495) then
begin
draw('Lining up target');
if (target.X < 475) then
begin
keyDown(vk_right);
repeat
findNearestTarget;
until(target.X > 465); // comp for slide
keyUp(vk_right);
end;
if (target.X > 495) then
begin
keyDown(vk_left);
repeat
findNearestTarget;
until(target.X < 505); // comp for slide
keyUp(vk_left);
end;
end else
begin
customMouse(target);
if(isUptextMulti(['ire-at','Fire','arget'])) then
begin
draw('Target Acquired');
found := false;
shooting := True;
end;
end;
end;
end;

if (shooting = true) then //shoot target
begin
draw('Firing at target');
if (isUptextMulti(['ire-at','Fire','arget'])) then
begin
fastClick(mouse_Left);
end else
begin
if (not Interfaces[TARGETSCREEN].isVisible()) then
begin
shooting := false;
tim1.start;
continue;
end;
end;
tim2.start;
repeat
if tim2.timeElapsed > 10000 then
begin
Writeln('Misclicked - Trying to find targets');
shooting := false;
tim1.start;
break;
end;
wait(randomRange(200,500));
until(Interfaces[TARGETSCREEN].isVisible() or clickContinueEx(False));
count := count + 1;
if Interfaces[TARGETSCREEN].isVisible() and (not clickContinueEx(False)) then
begin
if(isUptextMulti(['lose'])) then
begin
fastClick(mouse_Left);
end;
tim3.start;
repeat
draw('Closing interface');
if (tim3.timeElapsed() > 1500) then
begin
customMouse(point(485,40));
if(isUptextMulti(['lose'])) then
begin
fastClick(mouse_Left);
end;
end;
until(not Interfaces[TARGETSCREEN].isVisible());
if random(2) then
begin
getMousePos(x,y);
customMouse(point(x, y));
end;
end;
end;
namount := ticks.getAmount(True);
if count > 10 then
break;
until(namount > amount);
tim.start;
repeat
if tim.timeElapsed > 1000 then
begin
Writeln('Couldn''t grab xp values - will under report');
break;
end;
namount := ticks.getAmount(True);
until(namount > amount);
ticketsGained := namount - amount;
xp := xp + ticketsGained * 5;
tickets := tickets + ticketsGained;
clickContinue(true);
end;


procedure FreeStuff;
begin
Writeln('Thanks for using Davi''s Ranger. Ran for: '+TimeRunning);
freeBitmap(at);
freeBitmap(ba);
RSW.Free;
end;

begin
AddOnTerminate('FreeStuff');
SafeShowModal;
if (Started) then
begin
initAL();
RSW.Init('WorldMap', OS_SMART.ID);
RSW.walkStyle := wsSPS;
RSW.anyAngle := True;
RSW.skipClose := 5;
OS_Smart.__Graphics.Clear;
repeat
if not isLoggedIn() then
begin
LogInPlayer(false);
end;
startCompetition;
customAnti;
doCompetition;
if handleRandoms then
randomsReport;
until (xp = limit);
LogoutPlayer;
end;
end.

Parasyte
05-28-2017, 10:40 PM
quick question, when i start it and i type in all the requested info and hit play it opens up rs but then doesn't do anything is their something i am missing? also what do i type into nickname box?

Edit:Yeah this script just does not wanna work for me.

slacky
01-04-2018, 06:14 AM
So, just because someone asked for help regarding this script using AeroLib 1.2, and Simba 1.2RC6 I went and updated it just to compile under latest Simba, be that my own build.. Now, idk if it works-works, but it did at least compile for me, and the form showed up and loaded SMART as expected. I could not test further than that.

But for anyone interested you need my Simba 1.2 build (https://github.com/slackydev/Simba/releases/tag/Simba-1.2.0-rc6_fixes) to get forms working, and ensure minimal amount of memory-leaks happen. You just need to place the .exe in your Simba folder and load it instead of Simba.exe for this.

And here is the script:

program P1nkyDaviRanger_AL21_SIMBA1200;
{$H-}
{$DEFINE SMART}
{$DEFINE WALKER}
{$I AeroLib/AeroLib.simba }

const
ba := BitmapFromString(9, 9, 'meJyTNXaWNXZmZGDgNA5jEFcDMuBI' +
'SscCwgBKQRjy5u7iGsZwBXAtKrb+sgZ2gvIaQLaCggFci0Fgp o5nv' +
'CzMCmQtQCkgG2gFEEEUw21BdgmQjcZFVoNLC5DEpQXIAADr/BYQ');

at := BitmapFromString(11, 8, 'meJzLmtOUNadp8rqduFAWWAEcYSp' +
'IqF4JR1gV45KFI/yyRCrAI0sMAgAzII4j');

var
Limit, lor, minAnti, maxAnti, AntiAmount, xp, xpPerHour, tickets, x,y : Integer;
RSW : TRSWalker;
started, handleRandoms : Boolean;
target : TPoint;
DsgnForm:TForm;
UsernameBox,PasswordBox, NickBox, PinBox,AntibanBox,AmountBox,delayminBox,delaymaxBo x: TEdit;
UsernameLabel, PasswordLabel, NickLabel, PinLabel, AntibanLabel, AmountLabel, delayLabel, typeLabel, seconds, seperator: TLabel;
randomsBox : TCheckBox;
PlayButton : TButton;
lastTime : Extended;
ticks, arrows: TItem;
tim, tim1: Timer;

procedure Draw(text: string);
begin
xpPerHour := round(xp * 3600 / (GetTimeRunning / 1000));
OS_Smart.__Graphics.Clear;
OS_Smart.__Graphics.DrawClippedText('Made by: Davi', 'SmallChars', point(12, 278), clWhite);
OS_Smart.__Graphics.DrawClippedText('_____________ ', 'SmallChars', point(12, 284), clWhite);
OS_Smart.__Graphics.DrawClippedText('Status : ' + text, 'SmallChars', point(12, 304), clWhite);
OS_Smart.__Graphics.DrawClippedText('Time Running : ' + TimeRunning, 'SmallChars', point(220, 278), clYellow);
OS_Smart.__Graphics.DrawClippedText('XP : ' + inttostr(xp),'SmallChars', point(220, 292), clYellow);
OS_Smart.__Graphics.DrawClippedText('XP per hour : ' + inttostr(xpPerHour),'SmallChars', point(220, 306), clYellow);
OS_Smart.__Graphics.DrawClippedText('Tickets earned : ' + inttostr(tickets),'SmallChars', point(220, 320), clYellow);
end;

procedure OnlyPostiveNumbers(Self, Sender: TObject; var Key:Char); // Thanks ineedbot
begin
case ToString(key) of
#8, '0'..'9': {DO NOTHING};
else Key := #0;
end;
end;

procedure Start(Self, Sender: TObject);
begin
started := true;
DsgnForm.Close;
end;

procedure OnlyNumbers(Self, Sender: TObject; var Key: Char); // Thanks ineedbot
begin
case toStr(key) of
#8, '0'..'9', '-':begin
if(toStr(key) = '-')then begin
if(AmountBox.getSelStart <> 0)then begin
Key := #0;
end;
end;
end;
else begin
Key := #0;
end;
end;
end;

procedure InitForm;
var TempFont : TFont;
begin
DsgnForm.init(nil);
with DsgnForm do
begin
setCaption('Davi''s Ranger');
setBorderStyle(bsSingle);
setLeft(25);
setTop(25);
setWidth(512);
setHeight(409);
end;

UsernameBox.init(DsgnForm);
with UsernameBox do
begin
setParent(DsgnForm);
setText('');
setLeft(200);
setTop(37);
setWidth(257);
setHeight(23);
end;

UsernameLabel.init(DsgnForm);
with UsernameLabel do
begin
setParent(DsgnForm);
setCaption('Username or eMail :');
setLeft(30);
setTop(37);
setWidth(150);
setHeight(23);
end;

PasswordBox.init(DsgnForm);
with PasswordBox do
begin
setParent(DsgnForm);
setText('');
setLeft(200);
setTop(70);
setWidth(200);
setHeight(23);
setPasswordChar('*');
setMaxLength(20);
end;

PasswordLabel.init(DsgnForm);
with PasswordLabel do
begin
setParent(DsgnForm);
setCaption('Password :');
setLeft(30);
setTop(70);
setWidth(150);
setHeight(23);
end;

NickBox.init(DsgnForm);
with NickBox do
begin
setParent(DsgnForm);
setText('');
setLeft(200);
setTop(113);
setWidth(80);
setHeight(23);
end;

NickLabel.init(DsgnForm);
with NickLabel do
begin
setParent(DsgnForm);
setCaption('Nickname (random solving) :');
setLeft(30);
setTop(113);
setWidth(150);
setHeight(23);
end;

PinBox.init(DsgnForm);
with PinBox do
begin
setParent(DsgnForm);
setText('');
setLeft(200);
setTop(156);
setWidth(80);
setHeight(23);
setMaxLength(4);
setPasswordChar('*');
setONKEYPRESS(@OnlyPostiveNumbers);
end;

PinLabel.init(DsgnForm);
with PinLabel do
begin
setParent(DsgnForm);
setCaption('Pin (If you have one) :');
setLeft(30);
setTop(156);
setWidth(150);
setHeight(23);
end;

AntibanBox.init(DsgnForm);
with AntibanBox do
begin
setParent(DsgnForm);
setText('100');
setLeft(200);
setTop(199);
setWidth(80);
setHeight(23);
setONKEYPRESS(@OnlyPostiveNumbers);
setMaxLength(3);
end;

AntibanLabel.init(DsgnForm);
with AntibanLabel do
begin
setParent(DsgnForm);
setCaption('Antiban freq (Percentage) :');
setLeft(30);
setTop(199);
setWidth(150);
setHeight(23);
end;

delayminBox.init(DsgnForm);
with delayminBox do
begin
setParent(DsgnForm);
setText('2');
setLeft(200);
setTop(242);
setWidth(80);
setHeight(23);
setONKEYPRESS(@OnlyPostiveNumbers);
setMaxLength(2);
end;

delaymaxBox.init(DsgnForm);
with delaymaxBox do
begin
setParent(DsgnForm);
setText('8');
setLeft(320);
setTop(242);
setWidth(80);
setHeight(23);
setONKEYPRESS(@OnlyPostiveNumbers);
setMaxLength(2);
end;

delayLabel.init(DsgnForm);
with delayLabel do
begin
setParent(DsgnForm);
setCaption('Minimum antiban delay :');
setLeft(30);
setTop(242);
setWidth(150);
setHeight(23);
end;

seconds.init(DsgnForm);
with seconds do
begin
setParent(DsgnForm);
setLeft(410);
setTop(242);
setWidth(100);
setHeight(23);
setCaption('seconds');
end;

seperator.init(DsgnForm);
with seperator do
begin
setParent(DsgnForm);
setLeft(295);
setTop(242);
setWidth(100);
setHeight(23);
setCaption('to');
end;

AmountBox.init(DsgnForm);
with AmountBox do
begin
setParent(DsgnForm);
setText('-1');
setLeft(200);
setTop(285);
setWidth(80);
setHeight(23);
setONKEYPRESS(@OnlyNumbers);
setMaxLength(6);
end;

AmountLabel.init(DsgnForm);
with AmountLabel do
begin
setParent(DsgnForm);
setCaption('Limit (-1 for no limit) :');
setLeft(30);
setTop(285);
setWidth(150);
setHeight(23);
end;

randomsBox.init(DsgnForm);
with randomsBox do
begin
setParent(DsgnForm);
setCaption('Handle randoms');
SetState(cbUnchecked);
setLeft(200);
setTop(328);
setWidth(90);
setHeight(19);
end;

PlayButton.init(DsgnForm);
with PlayButton do
begin
setParent(DsgnForm);
setCaption('Play');
setLeft(200);
setTop(371);
setWidth(75);
setHeight(25);
setOnClick(@Start);
end;
end;


procedure ShowFormModal();
begin
InitForm;
DsgnForm.showModal();

ticks.BMP := at;
ticks.Name := 'Archery ticket';
ticks.Wieldable := False;
ticks.BMP_TOL := 15;

arrows.BMP := ba;
arrows.Name := 'Bronze arrow';
arrows.Wieldable := True;
arrows.BMP_TOL := 15;

Me.Name := UsernameBox.getText;
Me.Pass := PasswordBox.getText;
Me.Nick := NickBox.getText;
Me.Pin := PinBox.getText;
Me.Member := True;
Me.Active := True;

SMART_ShowConsole := false;
SMART_UserAgent := 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:33.0) Gecko/20100101 Firefox/33.0';

handleRandoms := (toStr(randomsBox.getState) = 'cbChecked');

if (Length(AmountBox.getText) > 0) then
begin
limit := StrToInt(AmountBox.getText)
end else
begin
limit := 9999999 // Arbitrarily large
end;

if (Length(AntiBanBox.getText) > 0) then
begin
AntiAmount := StrToInt(AntiBanBox.getText)
end else
begin
AntiAmount := 0;
end;
if (Length(delayminBox.getText) > 0) then
begin
minAnti := StrToInt(delayminBox.getText)
end else
begin
minAnti := 0;
end;
if (Length(delaymaxBox.getText) > 0) then
begin
maxAnti := StrToInt(delaymaxBox.getText)
end else
begin
maxAnti := 0;
end;
DsgnForm.Free;
end;

procedure SafeShowModal;
begin
sync(@showFormModal);
end;

function checkAnti(): Boolean;
var
perc : Integer;
begin
if (AntiAmount > 0) then
begin
perc := AntiAmount - 1;
Result:= Random(100) < perc;
end;
end;

procedure customAnti;
var
time : Extended;
begin
time := getTimeRunning - randomRange(minAnti*1000,maxAnti*1000);
if lastTime < time then
begin
if (checkAnti) then
begin
waitEx(10); // to handle randoms during Anti
draw('Performing antiban');
case random(9) of
0: randomMovement();
1: boredHuman();
2: pickUpMouse();
3: boredHuman();
4: hoverSkill('random', false);
5: SleepAndMoveMouse(3000);
6: compassMovement(40,120,False);
7: randomFKeys(True);
8: MMouseOffClient('rand');
end;
end;
lastTime := getTimeRunning;
end;
end;

procedure customMouse(point: TPoint);
// This methodology was inspired by rj's antiban guide
begin
case random(200) of
0..160: HumanMMouse(point, random(5), random(5));
161..190: HumanMMouse(point, random(7), random(7));
191..200: HumanMMouse(point, random(10), random(10));
end;
end;
Procedure RandomWait;
Begin
Draw('Waiting');
case random(1000) of
0..700: wait(RandomRange(400, 1000));
701..900: wait(RandomRange(600, 1600));
901..1000: wait(RandomRange(800, 3800));
End;
End;

function findNearestTarget(): Boolean;
var
TPA: TPointArray;
ATPA: T2DPointArray;
I: Integer;
box: TBox;
begin
if not FindColorsSpiralTolerance(x, y, TPA, 5888743, MSX1, MSY1, MSX2, MSY2, 10) then
exit;
ATPA := SplitTPA(TPA, 5);
SortATPAFromFirstpoint(ATPA, Point(0, 0));
if (length(ATPA) <= 0) then
begin
result := False;
exit;
end;
//os_smart.__Graphics.DrawATPA(ATPA);
for I := 0 to high(ATPA) do
begin
if (length(ATPA[I]) >= 10) then
begin
//os_smart.__Graphics.DrawTPA(ATPA[I], 255); also for debugging purposes
box := intToBox(ATPA[I].getBounds().X1, ATPA[I].getBounds().Y1 - 25, ATPA[I].getBounds().X2, ATPA[I].getBounds().Y2);
if (box.x1 < 0) then
box.x1 := 0;
if (box.y1 < 0) then
box.y1 := 0;
target := MiddleTPA(ATPA[I]);
result := True;
exit;
end;
end;
result := False;
end;

procedure startCompetition;
var
found, repos : boolean;
begin
case random(2) of
0: lor := vk_right;
1: lor := vk_left;
end;
tim.start;
tim1.start;
repeat
if (RSW._GetPos.Y < 2767) or (RSW._GetPos.X < 2477) then
RSW.blindWalk(point(2487,2777));
if handleRandoms then
waitEx(50);
if not isLoggedIn() then
break;
if (tim.timeElapsed > 20000) then
begin
Writeln('Timed out: Could not find Judge - Terminating script');
logoutPlayer;
TerminateScript;
end;
if (tim1.timeElapsed > 5000) and (not found) then
begin
Draw('Checking under character');
customMouse(point(MSCX,MSCY));
fastClick(mouse_Right);
WaitUpText('ompetition', randomrange(300, 800));
if ChooseOptionMulti(['ompetition']) then
begin
found := True;
waitChatChange;
end;
tim1.start;
end;
draw('Looking for judge');
if(findMSObjectSimple([2180171, 1914942], ['ompetition', 'udge']) and (not found)) then
begin
fastClick(mouse_Right);
WaitUpText('ompetition', randomrange(300, 400));
if ChooseOptionMulti(['ompetition']) then
begin
found := True;
waitChatChange;
end;
end else
begin
keyDown(lor);
wait(randomRange(500,1000));
keyUp(lor);
end;
until(found = true);
DoConversation(['ure']);
arrows.Interact(mouse_Left);
end;

procedure doCompetition;
var
tim2, tim3 : Timer;
amount, namount, ticketsGained, count : integer;
shooting, found : boolean;
begin
amount := ticks.getAmount(True);
count := 0;
shooting := false;
tim.start;
tim1.start;
repeat
if (RSW._GetPos.Y < 2767) or (RSW._GetPos.X < 2477) then
RSW.blindWalk(point(2487,2777));
if handleRandoms then
waitEx(50);
if not isLoggedIn() then
break;
if tim.timeElapsed > 60000 then
begin
Writeln('Timed out: Could not complete shooting - Terminating script');
logoutPlayer;
TerminateScript;
end;

if (shooting = false) then //find target
begin
if (tim1.timeElapsed > 30000) and (not found) then
begin
Writeln('Timed out: Could not find targets - Terminating script');
logoutPlayer;
TerminateScript;
end;
setAngle(ANGLE_LOW);
draw('Looking for targets');
if (findNearestTarget = False) then
begin
keyDown(vk_left);
wait(randomRange(500,1000));
keyUp(vk_left);
end else
begin
found := true;
if (target.X < 475) or (target.X > 495) then
begin
draw('Lining up target');
if (target.X < 475) then
begin
keyDown(vk_right);
repeat
findNearestTarget;
until(target.X > 465); // comp for slide
keyUp(vk_right);
end;
if (target.X > 495) then
begin
keyDown(vk_left);
repeat
findNearestTarget;
until(target.X < 505); // comp for slide
keyUp(vk_left);
end;
end else
begin
customMouse(target);
if(isUptextMulti(['ire-at','Fire','arget'])) then
begin
draw('Target Acquired');
found := false;
shooting := True;
end;
end;
end;
end;

if (shooting = true) then //shoot target
begin
draw('Firing at target');
if (isUptextMulti(['ire-at','Fire','arget'])) then
begin
fastClick(mouse_Left);
end else
begin
if (not Interfaces[TARGETSCREEN].isVisible()) then
begin
shooting := false;
tim1.start;
continue;
end;
end;
tim2.start;
repeat
if tim2.timeElapsed > 10000 then
begin
Writeln('Misclicked - Trying to find targets');
shooting := false;
tim1.start;
break;
end;
wait(randomRange(200,500));
until(Interfaces[TARGETSCREEN].isVisible() or clickContinueEx(False));
count := count + 1;
if Interfaces[TARGETSCREEN].isVisible() and (not clickContinueEx(False)) then
begin
if(isUptextMulti(['lose'])) then
begin
fastClick(mouse_Left);
end;
tim3.start;
repeat
draw('Closing interface');
if (tim3.timeElapsed() > 1500) then
begin
customMouse(point(485,40));
if(isUptextMulti(['lose'])) then
begin
fastClick(mouse_Left);
end;
end;
until(not Interfaces[TARGETSCREEN].isVisible());
if random(2) then
begin
getMousePos(x,y);
customMouse(point(x, y));
end;
end;
end;
namount := ticks.getAmount(True);
if count > 10 then
break;
until(namount > amount);
tim.start;
repeat
if tim.timeElapsed > 1000 then
begin
Writeln('Couldn''t grab xp values - will under report');
break;
end;
namount := ticks.getAmount(True);
until(namount > amount);
ticketsGained := namount - amount;
xp := xp + ticketsGained * 5;
tickets := tickets + ticketsGained;
clickContinue(true);
end;


procedure FreeStuff;
begin
Writeln('Thanks for using Davi''s Ranger. Ran for: '+TimeRunning);
freeBitmap(at);
freeBitmap(ba);
RSW.Free;
end;

begin
AddOnTerminate('FreeStuff');
SafeShowModal;
if (Started) then
begin
initAL();
RSW.Init('WorldMap', OS_SMART.ID);
RSW.walkStyle := wsSPS;
RSW.anyAngle := True;
RSW.skipClose := 5;
OS_Smart.__Graphics.Clear;
repeat
if not isLoggedIn() then
begin
LogInPlayer(false);
end;
startCompetition;
customAnti;
doCompetition;
if handleRandoms then
randomsReport;
until (xp = limit);
LogoutPlayer;
end;
end.


I hope it works :)

Sinix
05-08-2018, 08:02 AM
So, just because someone asked for help regarding this script using AeroLib 1.2, and Simba 1.2RC6 I went and updated it just to compile under latest Simba, be that my own build.. Now, idk if it works-works, but it did at least compile for me, and the form showed up and loaded SMART as expected. I could not test further than that.

But for anyone interested you need my Simba 1.2 build (https://github.com/slackydev/Simba/releases/tag/Simba-1.2.0-rc6_fixes) to get forms working, and ensure minimal amount of memory-leaks happen. You just need to place the .exe in your Simba folder and load it instead of Simba.exe for this.

And here is the script:

...

I hope it works :)

It starts up nicely, logs in, does one solid round of shooting the targets (it gets the tickets), then logs out.


Timed out: Could not complete shooting - Terminating script
Thanks for using Davi's Ranger. Ran for: 3 Minutes and 17 Seconds
Successfully executed.