SRL Archive - RS3 Outdated / Broken Scripts

RangeGuilder


Kyle Undefined

2011-11-12 22:47:00

RangeGuilder by Kyle Undefined



This is my first public script in a long, long time. Seeing that I've been working on MSI a lot lately, I wanted to take a break and work on something else. So here is one of my older scripts that I updated!

It's single player, since I really didn't see a point in making it multi-player. It has pretty good item detection, and hardly fails. It spam clicks the target for speedier shots, and to bypass the results screen.

The instructions are in the script, please be sure to follow them correctly.

There's really not a whole lot to say, except that please post your progress reports and/or bugs issues.

I hope you enjoy! :)

V1.2 is out!


Nsight

2011-11-12 23:29:07

I will have a progress report for you tomorrow sir, i've been waiting for this!

NCDS

2011-11-12 23:47:49

Where's the script? lol

YoHoJo

2011-11-13 00:06:14

From: NCDS
Where's the script? lol


Need to click the link in his signature.
Camo, you should make it more obvious where to get the script :D

bambino

2011-11-13 02:43:56

going to post a proggie soon:)

Gruntzer

2011-11-13 08:11:59

need to get mems on my pure to test this :p

bad luck :(

bambino

2011-11-13 08:41:02

Status: \~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/
========== RangeGuilder by Camo Developer V1.0 ==========
===================================================
||===== Time Running : 37 Minutes and 4 Seconds
||===== Games Completed : 23
||===== Tickets Earned : 108
||===== GP Spent : 4600
||===== Rune Arrows collected : 0
===================================================
===================================================

it's very slow maybe it's better to spam click than close window and shoot on the board again ?

it doesn't equip arrows i have to equip them myself

still it's not that bad thnx for the effort

Kyle Undefined

2011-11-13 13:18:12

From: NCDS
Where's the script? lol


From: YoHoJo
Need to click the link in his signature.
Camo, you should make it more obvious where to get the script :D


Hahahaha! Oh my! I forgot to add it! Sorry :p

Ok, it's added to the first post!


From: bambino
Status: \~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/
========== RangeGuilder by Camo Developer V1.0 ==========
===================================================
||===== Time Running : 37 Minutes and 4 Seconds
||===== Games Completed : 23
||===== Tickets Earned : 108
||===== GP Spent : 4600
||===== Rune Arrows collected : 0
===================================================
===================================================

it's very slow maybe it's better to spam click than close window and shoot on the board again ?

it doesn't equip arrows i have to equip them myself

still it's not that bad thnx for the effort


Hmm ok, I'll have to work on the item detection some more. Thanks for the info!

Naggiii

2011-11-13 19:36:44

Exception in Script: Unable to find file 'sps/sps.simba' used from ''

…?

Harry

2011-11-13 19:46:27

The first post says how to get SPS. Read.

Kyle Undefined

2011-11-13 23:04:33

There is a new version out, it fixed the item detection and some of the report calculations.

If you already have the script, just run the version you have and you'll get the new one.

Let me know how it works! :)

corrupt3lf

2011-11-13 23:52:46

after it competes and collects tikets it runs back to the trader trades trader but buys nothing and than runs back to judege and repeats

Kyle Undefined

2011-11-14 00:08:52

Ok, thanks! I'll get that working soon, have a list of other things that need to be completed though.

bambino

2011-11-14 11:59:31

it says locating judge even though it didn't close the window
as stated before it's slow but 1.1 is slightly better :)



Kyle Undefined

2011-11-14 15:29:46

I tried the spam shoot the targets, but it wouldn't work. It only shoots one and the results screen comes up. That's the reason why it's slow, sorry.

I'll work on getting it better though :) Thanks for being my tester lol.

bambino

2011-11-14 15:47:48

From: Camo Developer
I tried the spam shoot the targets, but it wouldn't work. It only shoots one and the results screen comes up. That's the reason why it's slow, sorry.

I'll work on getting it better though :) Thanks for being my tester lol.


no need :D I should thank you for making the script:)

and here is what i mean by spam clicking

check at 1:18

http://www.youtube.com/watch?v=PUfnNpCXRVU&feature=player_detailpage#t=78s

Kyle Undefined

2011-11-14 18:37:47

From: bambino
no need :D I should thank you for making the script:)

and here is what i mean by spam clicking

check at 1:18

http://www.youtube.com/watch?v=PUfnNpCXRVU&feature=player_detailpage#t=78s


Yeah, that's what I tried, but couldn't get it to work….Hmm, I'll try to get it working I guess.

dojo

2011-11-14 21:44:42

From: Camo Developer
Yeah, that's what I tried, but couldn't get it to work….Hmm, I'll try to get it working I guess.

u aint need to make it spam as fast as the video like a clic per sec can do it

Kajutsky

2011-11-14 23:44:04

i wish it would work…

Kajutsky

2011-11-14 23:45:07

after i download it and i press run it says theres some error do u hav to change anything on this script to make it work? bcos i dont kno how to script. pls help! i rly wonna try out this script

Flight

2011-11-14 23:47:51

From: dgpro
after i download it and i press run it says theres some error do u hav to change anything on this script to make it work? bcos i dont kno how to script. pls help! i rly wonna try out this script


If you could post a screenshot of the error that would help a lot.

Kajutsky

2011-11-15 04:31:52

do u hav to type anything on the script to make it work? my computer is getting fixed atm so cant post a screen shot

Alaska

2011-11-15 10:01:26

From: dgpro
do u hav to type anything on the script to make it work? my computer is getting fixed atm so cant post a screen shot


You have to fill out your players information & what reward you want it to purchase.

pagnozzi

2011-11-21 12:32:43

Way to slow

'Toxin

2011-11-21 12:34:19

From: pagnozzi
Way to slow


Way too stupid, you are. At least give some proper input.

On another note….This script looks fairly nice, will test later,

Kyle Undefined

2011-11-21 12:52:35

From: pagnozzi
Way to slow


Yes, I know it's slow, but I haven't had time to work on it recently.

From: XxX Toxin XxX
Way too stupid, you are. At least give some proper input.

On another note….This script looks fairly nice, will test later,


Thanks man, it may work ok lol :p

Home

2011-11-21 13:50:52

From: Camo Developer
Yes, I know it's slow, but I haven't had time to work on it recently.



Thanks man, it may work ok lol :p


Make it spam click. :)

~Home

Kyle Undefined

2011-11-21 13:58:42

From: Home
Make it spam click. :)

~Home


I tried getting it to do it before, but that's one of the things I want to change.

Versus The World

2011-11-21 16:42:00

Lookiing forward to seeing this script progress, good luck

bambino

2011-11-21 16:58:53

i was wondering if you need more testing for version 1.1?

Kyle Undefined

2011-11-21 17:18:39

I haven't done any progress on this, so testing isn't really necessary, but thanks.

Mink

2011-11-25 02:10:39

is their anyway u can optimize ur script to create a true/false for whether to actually buy something with the tickets?

Versus The World

2011-11-25 03:44:15

Id love to see this script finished properly. Has anyone tweaked it themselves so that it spam's the target?

funnyman9292

2011-11-25 12:11:27

The Script cannot find the judge and keeps walking back and forth between trader and judge? Everythings updated, i also had to manually log in but thats because of update. http://imageshack.us/photo/my-images/683/ughd.png/

whatev

2011-11-25 12:13:17

From: funnyman9292
i also had to manually log in but thats because of update.



If it's been in the last few (two) days, your settings are suspect. Login is fixed.

Remember simba wont log in unless you use fixed/low

Mink

2011-11-25 14:04:21

Works nearly flawlessly(yet slow).
Only issue I've come across and had to manually fix was when it identifies one of the back archery targets, and clicks it, and for whatever reason it runs behind the targets. I believe an easy fix would be to hav a set general area where the player wud stay in of 4x4 spaces when aiming at the targets.

rexyiscool

2011-11-26 13:20:11

ill be trying this soon.

thanks

Weave

2011-11-26 14:41:22

how do i add scripts!? any help would be extremely appretiated

RISK

2011-11-26 14:48:05

Download the script -> Open it in Simba with this button:
From: Weave
how do i add scripts!? any help would be extremely appretiated

Kyle Undefined

2011-11-26 21:06:44

Wow, this has gotten a lot of attention while I was gone. Ok, I'll try to get it updated soon!

Dr. Fuji

2011-11-28 23:27:42

Everything seems to work fine except that the bot cannot locate the targets it starts a game then spins around looking for the targets while doing nothing? Eventually it tries to start the game over again by asking the judge which obviously does not work.

wtfje

2011-11-29 07:18:14

Can somebody tell me the xp/hour this script if making?

Kyle Undefined

2011-11-29 21:34:56

From: Dr. Fuji
Everything seems to work fine except that the bot cannot locate the targets it starts a game then spins around looking for the targets while doing nothing? Eventually it tries to start the game over again by asking the judge which obviously does not work.


Are your graphic settings correct?

Ihajys Kylna

2011-11-30 03:33:32

Current xp per hour?

I can offer my help for testing if you'd like.

May run 20+ hours in a row etc.

Thanks!

illuminatiswag

2011-11-30 14:53:05

Going to try this soon

funnyman9292

2011-11-30 16:52:47

Camo maybe right after the bot shoots at the target it right clicks, so when the bullseye window is up the bot can just click fire…

Dr. Fuji

2011-12-01 00:27:09

I have it on safe mode min graphics maximum brightness max cpu.
I get "FindTargets could not find any points."

vashanddou

2011-12-01 12:14:46

After first set of 10 arrows, he starts to just walk around.
Please make the script spam click targets it'll work faster =P
and edit him walking around randomly.

illuminatiswag

2011-12-02 07:21:06

Hope this gets updated not working well add spam click and make it always stay in a 4 x 4 box as like a failsafe incase it missclicks it will just run back to the desired spot

wipe me down

2011-12-03 03:45:11

From: illuminatiswag
Hope this gets updated…


^^^

illuminatiswag

2011-12-03 17:00:37

From: wipe me down
^^^


^^^^^^

juuby

2011-12-03 17:11:06

guys, im new with simba bot for rs, pleasee help me i downloaded simba and open the msi and srl thing..then there are 2 tabs 1 saying RunMe and the other is untitled, so i go to the RunMe thing..and hit run.. then this show :(
ThreadSafeCallEx('ShowMSIForm'); (its orange colored)
and another thing is.. that an error shows up and then says:Ășnable to find MSVCR71.ddl'

PLEASE if there's a hero who can help me PLEASE PM ME PLEASE i really need to get started @

123 owned2

2011-12-04 19:57:06

allright script. needs some updates would be nice if it spammed clicked

Kyle Undefined

2011-12-04 20:32:58

Yeah I know, I was going to update it this weekend but I've been so busy, and now that RS hates me and crashes I haven't had the chance to update. I promise, there's one coming soon!

MuffinMan

2011-12-05 14:47:21

Seems like a good script! :D Trying

illuminatiswag

2011-12-05 17:49:36

From: Camo Developer
Yeah I know, I was going to update it this weekend but I've been so busy, and now that RS hates me and crashes I haven't had the chance to update. I promise, there's one coming soon!


Gl i hope it works out i want to get 99 range on my acc :p

Deadly Serious

2011-12-07 01:06:47

It seems to just sprint around the archery course for me.

Kyle Undefined

2011-12-07 01:31:47

Are your display setting correct?

Deadly Serious

2011-12-07 03:09:55

From: Camo Developer
Are your display setting correct?


From: Deadly Serious
Yes, they are.


After shooting 10 arrows and collecting its tickets, it tries to run to the trader. It get lost and trys clicking outside of the archery range and then proceeds to run around, not knowing where to go.

Locating Judge…
Judge located, attempting to compete…
Talked to Judge.
Locating Targets…
Targets found!
Firing shot #1 at target…
Firing shot #2 at target…
Firing shot #3 at target…
Firing shot #4 at target…
Firing shot #5 at target…
Firing shot #6 at target…
Firing shot #7 at target…
Firing shot #8 at target…
Firing shot #9 at target…
Firing shot #10 at target…
Locating Judge…
Judge located, attempting to get tickets…
Got the tickets!
Walking to Trader…

tybkj

2011-12-07 10:49:19

I got much respect for you making this script but it doesn't work well for me it tries shooting at the thing, without paying for it. And it must get spamm clicking.

Kyle Undefined

2011-12-07 13:54:57

I'm working on the new version, will be out by tonight. Please wait until then :)

GreenZombie

2011-12-07 14:04:36

Nice :) Good luck with the new version

tybkj

2011-12-07 15:25:46

I will get you that awesome proggy if you done it.

polska94

2011-12-07 19:10:36

cant wait till new version!

Kyle Undefined

2011-12-07 23:52:16

Version 1.2 is out! If you already have it, you can just run the script and get the new one. Updated first post!

illuminatiswag

2011-12-08 00:06:35

From: Camo Developer
Version 1.2 is out! If you already have it, you can just run the script and get the new one. Updated first post!


Woot what did you add sexy beast ?!

Deadly Serious

2011-12-08 00:12:59

From: Camo Developer
Version 1.2 is out! If you already have it, you can just run the script and get the new one. Updated first post!


Testing it out now, have you added spam clicking? <3

Edit: I keep getting this error :(

The version you're using is outdated!
Downloading new version…
Successfully downloaded the script! Please close the script and re-open to see the changes, thank you!
Successfully executed.
File[C:\Users\User\Downloads\RangeGuilder.simba] has not been freed in the script, freeing it now.

123 owned2

2011-12-08 00:19:48

starts up fine then it just shuts down getting this :
Judge located, attempting to compete…
Talked to Judge.
Checking for AntiRandoms
Looking for arrows…
Checking for AntiRandoms
Could not start competition. Please make a post on the thread about the issue.
Successfully executed.

Kyle Undefined

2011-12-08 00:50:45

Deadly, do you close the script and re-open after it downloads?

Hmm, I'll have to look into that, but it's late and I'm passing out.

Deadly Serious

2011-12-08 01:04:05

From: Camo Developer
Deadly, do you close the script and re-open after it downloads?

Hmm, I'll have to look into that, but it's late and I'm passing out.


Yes, I did multiple times. This might be the problem:
A new update of Simba is available!
Current version is 974. Latest version is 977
I have no idea where to download 977 :(

illuminatiswag

2011-12-08 01:17:19

One thing when it spam clicks and then sometimes it wont spam click enough so the score thing stays open script kills itself because cant find target should add it to exit the score and keep going. only bug i seen so far

Kyle Undefined

2011-12-08 01:20:51

From: Deadly Serious
Yes, I did multiple times. This might be the problem:
A new update of Simba is available!
Current version is 974. Latest version is 977
I have no idea where to download 977 :(


Under "Tools", there will be an option to Update. That will update Simba. If the script won't update still, just download it from the first post.

Illuminati, hmm ok thanks. I'll have to work on even faster spam clicking I guess :/

Deadly Serious

2011-12-08 01:26:23

From: Camo Developer
Under "Tools", there will be an option to Update. That will update Simba. If the script won't update still, just download it from the first post.

Illuminati, hmm ok thanks. I'll have to work on even faster spam clicking I guess :/


Downloaded the new version, still getting the same error. I just deleted my ranging guild script and added it again but it still trys to update. It also still trys to "free" it without success.

Kyle Undefined

2011-12-08 01:29:52

Hmm, that makes no sense. I just manually tested and it worked fine. Does the script version say 1.2 at the top and under the constants?

Deadly Serious

2011-12-08 01:33:25

From: Camo Developer
Hmm, that makes no sense. I just manually tested and it worked fine. Does the script version say 1.2 at the top and under the constants?


I just downloaded the one on your first post again.

Competes at the range guild and collects Archery Tickets for items ]
[ Version 1.2

But still trys to download the new version when it is the new version lol?



Compiled successfully in 484 ms.
The version you're using is outdated!
Downloading new version...
Successfully downloaded the script! Please close the script and re-open to see the changes, thank you!
Successfully executed.
File[C:\Users\User\Downloads\RangeGuilder.simba] has not been freed in the script, freeing it now.

Kyle Undefined

2011-12-08 01:36:04

Can you post the script that you just downloaded from the front page, something is going on here.

Deadly Serious

2011-12-08 01:37:47

From: Camo Developer
Can you post the script that you just downloaded from the front page, something is going on here.


Attached Files
RangeGuilder.simba (15.0 KB, 4 views)

The download link just above. The one you posted.

Kyle Undefined

2011-12-08 01:39:28

I mean, post it into here. Using the code or simba tags?

Deadly Serious

2011-12-08 01:41:14


program RangeGuilder;
{$i SRL/SRL/Misc/Smart.scar}
{$i SRL/SRL.scar}
{$i SRL\SRL\Misc\Stats.simba}

{[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]]
[ RangeGuilder ]
[ Camo Developer ]
[ Competes at the range guild and collects Archery Tickets for items ]
[ Version 1.2 ]
[][][][][][][][][][][][][][][][][][][]Setup[][][][][][][][][][][][][][][][][][]]
[ Be in the range guild next to the judge ]
[ Make sure you have a bow in hand ]
[ Make sure you have money in your inventory ]
[ Also, this script requires SPS ]
[][][][][][][][][][][][][][][][]Player Integers[][][][][][][][][][][][][][][][]]
[ Times to compete : Players[CurrentPlayer].Integers[0] ]
[][][][][][][][][][][][][][][][]Player Strings[][][][][][][][][][][][][][][][][]
[ Item to trade for : Players[CurrentPlayer].Strings[0] ]
[ You must fill it out exactly as follows: ]
[ 'Rune Arrows' ]
[ 'Barb bolttips' ]
[ 'Studded body' ]
[ 'Coif' ]
[ 'Green dhide body' ]
[ 'Adamant javalin' ]
[][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][][]]}

const
SRLStatsUserName = '';
SRLStatsPassword = '';

Version = '1.2'; (* Please do not touch *)

var
maxGames, startupTickets, totTickets, totGames, totItems : Integer;

procedure VersionCheck();
var
oVersion : string;
begin
oVersion := GetPage('http://srl.kyleundefined.com/Scripts/RangeGuilder/Version.txt');
if(oVersion <> Version)then
begin
WriteLn('The version you''re using is outdated!');
WriteLn('Downloading new version...');
if(WriteFileString(RewriteFile(ScriptPath + 'RangeGuilder.simba', True), GetPage('http://srl.kyleundefined.com/Scripts/RangeGuilder/RangeGuilder.txt')))then
WriteLn('Successfully downloaded the script! Please close the script and re-open to see the changes, thank you!');
TerminateScript;
end
else
WriteLn('You have the current version, good to go!');
end;

procedure DeclarePlayers();
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name := ''; // Your RuneScape Account Name
Pass := ''; // Your RuneScape Account Password
Active := True; // Use in the Script. True / False.
Integers[0] := 5; // How many times to compete
Strings[0] := 'Rune Arrows'; // What item to get with tickets
end;
end;

procedure AntiRandoms;
begin
if (not(LoggedIn)) then
Exit;
WriteLn('Checking for AntiRandoms');
FindNormalRandoms;
srl_InFight;
end;

function CalculateGameCount(): Integer;
var
coinAmt, x, y, i : Integer;
begin
if not Gametab(tab_Inv) then
Gametab(tab_Inv);

if FindCoins(x, y, 'inv') then
begin
i := CoordsToItem(x, y);
WriteLn('Found coins in Inventory Slot #' + IntToStr(i));

coinAmt := GetAmountBox(InvBox(i));
Result := (coinAmt / 200);
end else
begin
WriteLn('Couldn''t find coins in the inventory!');
WriteLn('Terminating the script!');
TerminateScript();
end;
end;

function CountTickets(): Integer;
var
x, y, i, ticketAmt : Integer;
begin
if FindColorTolerance(x, y, 5867118, MIX1, MIY1, MIX2, MIY2, 5) then
begin
i := CoordsToItem(x, y);
WriteLn('Found Archer Tickets in Inventory Slot #' + IntToStr(i));

ticketAmt := GetAmountBox(InvBox(i));
startupTickets := ticketAmt;

Result := ticketAmt;
end else
WriteLn('Did not find Archer Tickets in Inventory.');
end;

function FindJudge(var rx, ry : Integer) : Boolean;
var
TPA : TPointArray;
I, CTS : Integer;
ATPA : T2DPointArray;
o : TPoint;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.00, 0.03);
FindColorsTolerance(TPA, 7235945, MSX1, MSY1, MSX2, MSY2, 9);
ColorToleranceSpeed(CTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if(Length(TPA) = 0)then
begin
WriteLn('FindJudge could not find any points.');
Exit;
end;
SortTPAFrom(TPA, Point(MSCX, MSCY));
ATPA := TPAToATPA(TPA, 15);
for I := 0 to High(ATPA) do
begin
o := MiddleTPA(ATPA[i]);
MMouse(o.x, o.y, 3, 3);
if(WaitUptext('Judge', RandomRange(250, 750)))then
begin
Result := True;
GetMousePos(rx, ry);
Exit;
end;
end;
end;

procedure SetupScript();
begin
MakeCompass('N');
SetAngle(True);
SetRun(True);
Wait(RandomRange(1000, 1750));
maxGames := CalculateGameCount();
WriteLn('You can play a total of ' + IntToStr(maxGames) + ' games!');
totTickets := CountTickets();
WriteLn('You have ' + IntToStr(totTickets) + ' tickets');
end;

function CompeteJudge() : Boolean;
var
x, y, BronzeArrowsBmp : Integer;
begin
Wait(RandomRange(500, 750));
WriteLn('Locating Judge...');

if FindJudge(x, y) then
begin
AntiRandoms();
WriteLn('Judge located, attempting to compete...');
Mouse(x, y, 3, 3, False);
Wait(RandomRange(500, 750));
ChooseOption('Compete');
WriteLn('Talked to Judge.');
Wait(RandomRange(1000, 1250));
MouseBox(247, 392, 274, 405, 1);
Wait(RandomRange(400, 750));
ClickToContinue();
Wait(RandomRange(500, 750));
AntiRandoms();

BronzeArrowsBmp := BitmapFromString(10, 33, 'meJytUssKwjAQDCsigg+qFbFQqF' +
'poEYWeLCheFC/ePHjx4B/5zy4duuRVwUcIZTKzM7slUerXRT5M9Td' +
'cbIRkDBCt90xO0iKIM6rKgKEuD1feo2Q1mM2pOgJDzU73pLxM8y1v' +
'qMBQW8Oom5/JnArL4hkUu6OobCSnGGVNgVBh1IuVYwRpdRcjyrwdG' +
'bj5/zJa6kdG+SOvUQbzGkG+N/bHD95NRpbandQ1YiTdiBxdDeMnjC' +
'JJLz0KpEjKjKI6Si7UilLmgxGVx3YfUi+4MemVlHYRX6wXd5Uwgw==');

WriteLn('Looking for arrows...');

if FindBitmapToleranceIn(BronzeArrowsBmp, x, y, MIX1, MIY1, MIX2, MIY2, 10) then
begin
Wait(RandomRange(500, 750));
WriteLn('We have the arrows! Equiping...');
Mouse(x, (y + 10), 2, 2, True);
WriteLn('Arrows equipped!');
Result := True;
end;

FreeBitmap(BronzeArrowsBmp);
AntiRandoms();
end;
end;

function FindTargets(var rx, ry : Integer) : Boolean;
var
TPA : TPointArray;
I, CTS : Integer;
ATPA : T2DPointArray;
o : TPoint;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.05, 0.54);
FindColorsTolerance(TPA, 11300959, MSX1, MSY1, MSX2, MSY2, 1);
ColorToleranceSpeed(CTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if(Length(TPA) = 0)then
begin
WriteLn('FindTargets could not find any points.');
Exit;
end;
SortTPAFrom(TPA, Point(MSCX, MSCY));
ATPA := TPAToATPA(TPA, 15);
for I := 0 to High(ATPA) do
begin
o := MiddleTPA(ATPA[i]);
MMouse(o.x, o.y, 3, 3);
if(WaitUptext('arget', RandomRange(250, 750)))then
begin
Result := True;
GetMousePos(rx, ry);
Exit;
end;
end;
end;

function RandomRangeEx(rFrom, rTo : Variant) : Variant;
var
r : Variant;
begin
r := RandomRange(Floor(rFrom), Ceil(rTo));
r := r + RandomE;

repeat
begin
if r <= rFrom then
r := r + RandomE
else if r >= rTo then
r := r - RandomE;
end;
until ((r >= rFrom) and (r <= rTo))

r := (Trunc(r * 100) / 100.00)

Result := r;
end;

function ShootTargets() : Boolean;
var
x, y, i : Integer;
bClicked : Boolean;
begin
AntiRandoms();
Wait(RandomRange(500, 750));
WriteLn('Locating Targets...');

SetAngle(False);
MakeCompass(36.87 + RandomRangeEx(-1.75, 1.75));
Wait(RandomRange(1000, 1250));

if FindTargets(x, y) then
begin
AntiRandoms();
WriteLn('Targets found!');
Wait(RandomRange(500, 1000));
MMouse(x, y, 3, 3);
Wait(RandomRange(750, 1250));
WriteLn('Spam firing at targets');
repeat
ClickMouse2(True);
Inc(I);
bClicked := ClickToContinue();
if(bClicked)then
Break;
until((i >= 75));
Inc(totGames);
Result := bClicked;
AntiRandoms();
end;
end;

procedure GetTickets();
var
x, y, i : Integer;
begin
Wait(RandomRange(500, 750));
WriteLn('Locating Judge...');

if FindJudge(x, y) then
begin
WriteLn('Judge located, attempting to get tickets...');
Mouse(x, y, 3, 3, True);
Wait(RandomRange(500, 750));
ClickToContinue();
WriteLn('Got the tickets!');

if FindColor(x, y, 5867118, MIX1, MIY1, MIX2, MIY2) then
begin
i := CoordsToItem(x, y);
totTickets := GetAmountBox(InvBox(i));
WriteLn('You now have ' + IntToStr(totTickets) + ' tickets!');
end;
end;
end;

function LoadItemCost(which : string) : Integer;
begin
case which of
'Rune Arrows' : Result := 1020;
'Barb bolttips' : Result := 114;
'Studded body' : Result := 51;
'Coif' : Result := 12;
'Green dhide body' : Result := 856;
'Adamant javalin' : Result := 292;
end;
end;

function WalkToTrader() : Boolean;
begin
AntiRandoms();
MakeCompass('N');
SetAngle(True);
MouseBox(584, 35, 602, 52, 1);
Wait(RandomRange(7500, 8500));
Result := True;
AntiRandoms();
end;

function FindTrader(var rx, ry : Integer) : Boolean;
var
TPA : TPointArray;
I, CTS : Integer;
ATPA : T2DPointArray;
o : TPoint;
begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(0.10, 0.38);
FindColorsTolerance(TPA, 1516875, MSX1, MSY1, MSX2, MSY2, 4);
ColorToleranceSpeed(CTS);
SetColorSpeed2Modifiers(0.2, 0.2);
if(Length(TPA) = 0)then
begin
WriteLn('FindTrader could not find any points.');
Exit;
end;
SortTPAFrom(TPA, Point(MSCX, MSCY));
ATPA := TPAToATPA(TPA, 15);
for I := 0 to High(ATPA) do
begin
o := MiddleTPA(ATPA[i]);
MMouse(o.x, o.y, 3, 3);
if(WaitUptext('ercha', RandomRange(250, 750)))then
begin
Result := True;
GetMousePos(rx, ry);
Exit;
end;
end;
end;

function TraderScreen() : Boolean;
begin
Result := CountColor(2070783, MSX1, MSY1, MSX2, MSY2) > 0;
end;

function TradeTickets() : Boolean;
var
x, y : Integer;
box : TBox;
begin
AntiRandoms();
if WalkToTrader() then
begin
Wait(RandomRange(1000, 3500));
WriteLn('Locating Trader...');

if FindTrader(x, y) then
begin
AntiRandoms();
WriteLn('Found Trader!');
WriteLn('Attempting to trade...');
Wait(RandomRange(500, 750));
Mouse(x, y, 3, 3, False);
Wait(RandomRange(500, 750));
ChooseOption('rad');
Wait(RandomRange(750, 1250));

if TraderScreen() then
begin
case Players[CurrentPlayer].Strings[0] of
'Rune Arrows' : box := IntToBox(203, 80, 228, 105);
'Barb bolttips' : box := IntToBox(52, 83, 77, 103);
'Studded body' : box := IntToBox(132, 84, 153, 104);
'Coif' : box := IntToBox(283, 84, 307, 106);
'Green dhide body' : box := IntToBox(360, 86, 376, 109);
'Adamant javalin' : box := IntToBox(428, 81, 458, 108);
end;

Wait(RandomRange(1000, 1750));
MouseBox(box.X1, box.Y1, box.X2, box.Y2, 2);

Wait(RandomRange(500, 750));
Result := ChooseOption('uy');

Wait(RandomRange(250, 500));
Inc(totItems);

Wait(RandomRange(500, 750));
MouseBox(479, 35, 494, 50, 1);

AntiRandoms();
end;
end
else
WriteLn('Couldn''t find Trader!');
end;
end;

function WalkToJudge() : Boolean;
begin
AntiRandoms();
MakeCompass('N');
SetAngle(True);
MouseBox(671, 134, 680, 139, 1);
Wait(RandomRange(7500, 8500));
Result := True;
AntiRandoms();
end;

function CalculateItemsCollected(count : Integer) : Integer;
begin
case Players[CurrentPlayer].Strings[0] of
'Rune Arrows' : Result := count * 50;
'Barb bolttips' : Result := count * 30;
'Adamant javalin' : Result := count * 20;
else
Result := count;
end;
end;

procedure Report;
begin
AntiRandoms();
SRLRandomsReport;
stats_IncVariable('Coins Spent', (totGames * 200));
stats_IncVariable('Items Picked Up', totItems);
stats_IncVariable('Loads Done', totGames);
stats_IncVariable('Archery Tickets (Earned)', (totTickets - startupTickets));
Stats_Commit;
Writeln('========== RangeGuilder by Camo Developer V' + Version + ' ==========');
Writeln('===================================================');
Writeln('||===== Time Running : ' + TimeRunning);
Writeln('||===== Games Completed : ' + IntToStr(totGames));
Writeln('||===== Tickets Earned : ' + IntToStr(totTickets - startupTickets));
Writeln('||===== GP Spent : ' + IntToStr(totGames * 200));
WriteLn('||===== ' + Players[CurrentPlayer].Strings[0] + ' collected : ' + IntToStr(CalculateItemsCollected(totItems)));
Writeln('===================================================');
Writeln('===================================================');
Writeln('===================================================');
end;

procedure EndScript(reason : string);
begin
WriteLn('Could not ' + reason + '. Please make a post on the thread about the issue.');
Logout();
TerminateScript();
end;

begin
VersionCheck();
SMART_Members := True;
SMART_Signed := True;
SetupSRL();
SetupSRLStats(222, SRLStatsUserName, SRLStatsPassword);
SRLRandomsReport;
ClearDebug();
ActivateClient();
DeclarePlayers();
LoginPlayer();
SetupScript();
Wait(RandomRange(750, 1250));
repeat
if (CompeteJudge()) then
begin
Wait(RandomRange(750, 1250));
if (ShootTargets()) then
begin
Wait(RandomRange(750, 1250));

if totTickets >= LoadItemCost(Players[CurrentPlayer].Strings[0]) then
begin
if (TradeTickets()) then
begin
Wait(RandomRange(750, 1250));
if (not WalkToJudge()) then
EndScript('walk back to Judge');
end else
EndScript('trade tickets');
end;
end else
EndScript('fire at targets');
end else
EndScript('start competition');

Report();
until((totGames >= Players[CurrentPlayer].Integers[0]) or (totGames >= maxGames));
Report();
WriteLn('Thanks for running! Please post your progress reports! :)');
TerminateScript;
end.

Do you mean like that? Sorry I'm a noob at this.

Kyle Undefined

2011-12-08 01:48:29

That's perfect, and I don't see anything that would be wrong with that. Try something like this. Under this line:

oVersion := GetPage('http://srl.kyleundefined.com/Scripts/RangeGuilder/Version.txt');

put the following text: WriteLn('oVersion = ' + oVersion);

So it will look like this:

oVersion := GetPage('http://srl.kyleundefined.com/Scripts/RangeGuilder/Version.txt');
WriteLn('oVersion = ' + oVersion);

Let me know what that prints out in the debug.

Deadly Serious

2011-12-08 01:53:27

From: Camo Developer
That's perfect, and I don't see anything that would be wrong with that. Try something like this. Under this line:

oVersion := GetPage('http://srl.kyleundefined.com/Scripts/RangeGuilder/Version.txt');

put the following text: WriteLn('oVersion = ' + oVersion);

So it will look like this:

oVersion := GetPage('http://srl.kyleundefined.com/Scripts/RangeGuilder/Version.txt');
WriteLn('oVersion = ' + oVersion);

Let me know what that prints out in the debug.


[Error] (52:3): Identifier expected at line 51
Compiling failed.

Edit: I received this error.

Line 51: else

Kyle Undefined

2011-12-08 01:55:10

I honestly have no clue…I'm sorry man.

illuminatiswag

2011-12-08 02:00:55

From: Camo Developer
Under "Tools", there will be an option to Update. That will update Simba. If the script won't update still, just download it from the first post.

Illuminati, hmm ok thanks. I'll have to work on even faster spam clicking I guess :/


no just make it so when it doesnt spam click it will close and re search for the targets because remember not everyone has good comps so sometimes it will lagg for different people

Deadly Serious

2011-12-08 02:10:24

From: Camo Developer
I honestly have no clue…I'm sorry man.


Can you stop it automatically updating for like 5 mins? I just want to see if that's the problem. If you can't that's fine.

polska94

2011-12-08 08:53:40

yea script couldnt find any points and couldnt fire at targets…

Kyle Undefined

2011-12-08 09:38:22

From: illuminatiswag
no just make it so when it doesnt spam click it will close and re search for the targets because remember not everyone has good comps so sometimes it will lagg for different people


That's what I was doing before, and everyone wanted spam clicking. Make up your minds :p

From: Deadly Serious
Can you stop it automatically updating for like 5 mins? I just want to see if that's the problem. If you can't that's fine.


At the bottom, in the last begin…end, you can comment out the Updater, and it will run just fine. That will work until I can figure out what is going on.

illuminatiswag

2011-12-08 12:16:31

Yes make it spam click but for instance
if it gets stuck because it didnt spam click fast enough have it hit the x and then continue to spam click

Deadly Serious

2011-12-08 16:01:59

From: Camo Developer
At the bottom, in the last begin…end, you can comment out the Updater, and it will run just fine. That will work until I can figure out what is going on.


Thanks, I deleted that and a few other "Check version" ones and I've been able to load it up :D
Edit: It just right clicks the judge and drags the mouse away. Even though it says differently in the code.

Found coins in Inventory Slot #2
You can play a total of 1825 games!
Did not find Archer Tickets in Inventory.
You have 0 tickets
Locating Judge...
Checking for AntiRandoms
Judge located, attempting to compete...

This might be because I'm a noob and deleted the wrong code but I don't think I deleted anything of importance, I only deleted the auto updater and the code to check for the script version >.<

Liquhfy

2011-12-08 21:12:00

Could not start competition. Please make a post on the thread about the issue.

Lloyd1z

2011-12-09 12:33:56

^Same for me.

logical

2011-12-09 17:09:53

it is not needed to click continue after you pay the judge :)
it wont start though :'(
ends here:

FindTargets could not find any points.
Could not fire at targets. Please make a post on the thread about the issue.

Kyle Undefined

2011-12-09 17:33:24

From: Deadly Serious
Thanks, I deleted that and a few other "Check version" ones and I've been able to load it up :D
Edit: It just right clicks the judge and drags the mouse away. Even though it says differently in the code.

Found coins in Inventory Slot #2
You can play a total of 1825 games!
Did not find Archer Tickets in Inventory.
You have 0 tickets
Locating Judge...
Checking for AntiRandoms
Judge located, attempting to compete...

This might be because I'm a noob and deleted the wrong code but I don't think I deleted anything of importance, I only deleted the auto updater and the code to check for the script version >.<


You probably have a competition started. I'm going to add a check for that so if you start the script in the middle of a competition, it will finish it before trying to do another.

Deadly Serious

2011-12-09 17:58:54

From: Camo Developer
You probably have a competition started. I'm going to add a check for that so if you start the script in the middle of a competition, it will finish it before trying to do another.


Yup, it was in a competition. I finished the competition then I restarted the script quite a few times but I just keep getting this error.

We have the arrows! Equiping...
Arrows equipped!
Checking for AntiRandoms
Checking for AntiRandoms
Locating Targets...
FindTargets could not find any points.
Could not fire at targets. Please make a post on the thread about the issue.
Successfully executed.
It doesn't run for very long before it gets this error.

illuminatiswag

2011-12-09 23:33:28

yea because sometimes it wont spam click fast enough so it just signs out it should close the points box when it doesnt spam click fast enough then back to spamming lol

illuminatiswag

2011-12-10 09:27:05

Camo i hope you understand what im trying to tell you

Kyle Undefined

2011-12-10 16:08:15

I understand what you're saying, I just don't have time to work on it now. Sorry. Please don't double post either.

LemonHaze

2011-12-13 06:53:36

i'll try this next week. 99range, here i come :p

illuminatiswag

2011-12-13 07:26:23

From: lordvolt
i'll try this next week. 99range, here i come :p


dont waist your time.

Gushers

2011-12-13 09:09:06

So I see a lot of people are having trouble.. Is it up and working now?

SourApple82

2011-12-14 13:52:48

We have the arrows! Equiping…
Arrows equipped!
Checking for AntiRandoms
Checking for AntiRandoms
Locating Targets…
FindTargets could not find any points.
Could not fire at targets. Please make a post on the thread about the issue.
Whats up with this?

Gushers

2011-12-14 17:38:53

You should update this with the new look of RuneScape.

Kyle Undefined

2011-12-14 17:43:22

I will get to it when I can, no promises of release.

kyocera

2011-12-14 18:05:23

What items do i need to run this? Looks interesting, how much GP would i spend and make for 99?

Vaikiss

2011-12-15 07:38:40

none u can actualy earn money doing range guild

and u need just bow and coins

SourApple82

2011-12-15 11:00:25

From: Vaikiss
none u can actualy earn money doing range guild

and u need just bow and coins


Actually you need about 100k to start out and be able to run for awhile but after that then he can make money I suggest about 100k so u dont have to go bank anytime then. But 50k is fine too

LemonHaze

2011-12-16 07:14:21

I hope you update it soon xD

SourApple82

2011-12-16 13:05:18

From: lordvolt
I hope you update it soon xD


Agreed

Tempt

2011-12-17 09:47:09

How easy do you think it would be for an amateur scripter to fix this? Would It be as simple as replacing colours and maybe fixing the "camera angle" procedures? Any tips in what to look at would be appreciated!

MatchRev

2011-12-17 20:04:14

Found coins in Inventory Slot #2
You can play a total of 500 games!
Did not find Archer Tickets in Inventory.
You have 0 tickets
Locating Judge…
Checking for AntiRandoms
Judge located, attempting to compete…
Talked to Judge.
Checking for AntiRandoms
Looking for arrows…
Checking for AntiRandoms
Could not start competition. Please make a post on the thread about the issue.
Successfully executed.

anciuvis

2011-12-18 02:58:50

Found coins in Inventory Slot #9
You can play a total of 275 games!
Found Archer Tickets in Inventory Slot #4
You have 312 tickets
Locating Judge…
Checking for AntiRandoms
Judge located, attempting to compete…
Talked to Judge.
Checking for AntiRandoms
Looking for arrows…
Checking for AntiRandoms
Could not start competition. Please make a post on the thread about the issue.
Successfully executed.

Gushers

2011-12-18 03:56:02

From: Kyle Undefined
I will get to it when I can, no promises of release.


Alright man. You wouldn't mind if I mess around with it and try to fix it?

Tempt

2011-12-18 05:34:40

I've fixed everything up but I cant seem to fix the part where is selects the "yes" option on compete. I have tried quite a few things, but the mousebox function isn't working properly with the new chat. (I've changed the x1,y1,x2,y2 values, and it is set to click) it just won't click.. could you let me know the function for the script to add 'keyboard input' so it can just press 1. any tips appreciated!

RISK

2011-12-18 06:37:54

TypeSend('1'). :)

From: Tempt
I've fixed everything up but I cant seem to fix the part where is selects the "yes" option on compete. I have tried quite a few things, but the mousebox function isn't working properly with the new chat. (I've changed the x1,y1,x2,y2 values, and it is set to click) it just won't click.. could you let me know the function for the script to add 'keyboard input' so it can just press 1. any tips appreciated!

Gushers

2011-12-18 07:22:25

From: Tempt
I've fixed everything up but I cant seem to fix the part where is selects the "yes" option on compete. I have tried quite a few things, but the mousebox function isn't working properly with the new chat. (I've changed the x1,y1,x2,y2 values, and it is set to click) it just won't click.. could you let me know the function for the script to add 'keyboard input' so it can just press 1. any tips appreciated!


Try something basic like a color click for the green! Let me know if you get it? Please?

procedure ClickOkay;
var
x, y:Integer;
begin
if FindColorSpiralTolerance(x, y, [color], 16, 25, 264, 228, 20) or
begin
MoveMouse(x, y);
ClickMouse(x, y, 1);
end;
end;

SourApple82

2011-12-18 19:22:37

From: Tempt
I've fixed everything up but I cant seem to fix the part where is selects the "yes" option on compete. I have tried quite a few things, but the mousebox function isn't working properly with the new chat. (I've changed the x1,y1,x2,y2 values, and it is set to click) it just won't click.. could you let me know the function for the script to add 'keyboard input' so it can just press 1. any tips appreciated!


will u release this to the public or cant u because he made the most part of it?

fearlesskiller

2011-12-18 21:06:16

"FindTargets could not find any points.
Could not fire at targets. Please make a post on the thread about the issue.
Successfully executed."

Kyle Undefined

2011-12-18 21:10:11

In the process of updating while I have time. Closing thread until then.