SRL Archive - RS3 Outdated / Broken Scripts

[SRL4] Range Guild: Bow Competition


vilon

2007-09-28 12:20:15

{==================================================================]
[ Range Guild: Bow Competition ]
[ ]
[ NAME : Range Guild: Bow Competition ]
[ AUTHOR : Vilon ]
[ CATEGORY : Minigame / Ranging ]
[ DESCRIPTION : Does the bow competition. ]
[ MULTIPLAYER : No ]
[ SCAR VERSION : SCAR Divi 3.12 ]
[ SRL VERSION : SRL 4 #rev 4 ]
[ RELEASED ON : 29/09/2007 ]
[ ]
[==================================================================]
[ Instructions ]
[==================================================================]
[ 01. Use runescape with low detail and very bright. ]
[ 02. Set your screen resolution to 32bit true color. ]
[ 03. Setup lines 36 and 44 - 55. ]
[ 04. Position your character inside of the minigame (next to the ]
[ 'Competition Judge') and make sure he is visible. Also, ]
[ wear/wield all equipment you want to use and make sure you ]
[ have money in your inventory. ]
[ 05. Recommend to start logged in (logged out should work). ]
[ 06. Drag crosshair over runescape window and press play. ]
[ 07. Enjoy and please post feedback and progress reports! :D ]
[==================================================================}

Changelog:
[B]v2.1[/B]
A special thanks for this version goes out to "the scar noob".

[I]Added:[/I]
- Failsafe (when aligning the compass).

[I]Improved:[/I]
- More accurate finding of the "Target View" when hitting the targets, also a major speedup.
- Better talking to judge.
- Code cleanup.

[B]v2.0[/B]
This version is a complete re-write of the old script. Here is what has been changed:

[I]Added:[/I]
- New method for aligning the compass.
- Disguise, now shows number of loads in titlebar.

[I]Improved:[/I]
- No more annoying colorpicking, fully autocolor!
- Much more failsafes.
- Better finding of colors (new method), which means no more annoying mouse jumping around the screen trying to find a certain color.
- Now finds the arrows without any problem, no matter where it is in your inventory.
- Better antirandoms.
- Better standards.
- Other small fixes and changes.

[B]v1.1:[/B]
[I]Added:[/I]
- Antiban (hover skill, ranging).
- Progress-report and SRL-random report.

[I]Improved:[/I]
- Finding and wielding of arrows (you don't have to have a specific inventory setup anymore).
- Anti-random.
- More fail-safe and checks after each round if any arrows are still equipped.

Todo for next version:
Nothing yet. Suggestions are welcome!

If you download and/or use this script please leave feedback/progress report!

the scar noob

2007-09-28 12:52:22

1.
procedure LogOutPlayer;
begin
if(LoggedIn)then
begin
LogOut;
end;
TerminateScript;
end;
You don't need the begin/end, this is good enough:
procedure LogOutPlayer;
begin
if(LoggedIn)then LogOut;
TerminateScript;
end;

2.
procedure CheckLogin;
begin
if(not(LoggedIn))then
begin
TerminateScript;
end;
end;
Same as number 1, this should be enough:
procedure CheckLogin;
begin
if(not(LoggedIn))then TerminateScript;
end;

3.
procedure AlignCompass;
begin
CheckLogin;
MakeCompass('S');
KeyDown(VK_LEFT);
repeat
Wait(1);
until(FindColorTolerance(x, y, TargetColor1, MSX1, MSY1, MSX2, MSY2, 5));
KeyUp(VK_LEFT);
end;
a repeat should always have a failsafe, also the wait(1) could be changed to a higher integer value, maybe 50 or 100 or something, you could also raise that 5 tol I think.
For the failsafe, add an integer value and increase it, let me explain it with an example:
procedure AlignCompass;
var
FailSafe: integer;
begin
CheckLogin;
MakeCompass('S');
KeyDown(VK_LEFT);
repeat
Wait(100);//changed 1 to 100 (100 miliseconds is still fast, isn't it?
Inc(failSafe);
until(FindColorTolerance(x, y, TargetColor1, MSX1, MSY1, MSX2, MSY2, 10)) or (Failsafe >100)//the failsafe, 100 times*100ms=10 secs
KeyUp(VK_LEFT);
end;

You could also use a timer instead of that simple integer raise trick ;)
Then you'll have to use MarkTime and TimeFromMark:
procedure AlignCompass;
var
FailSafeMark: longint;//long integer, an integer has a maximum value of 65535, whatever an integer is fine too :)
begin
CheckLogin;
MakeCompass('S');
MarkTime(FailSafeMark);
KeyDown(VK_LEFT);
repeat
Wait(100);//changed 1 to 100 (100 miliseconds is still fast, isn't it?
until(FindColorTolerance(x, y, TargetColor1, MSX1, MSY1, MSX2, MSY2, 10)) or (TimeFromMark(FailSafeMark)>10000)//10secs=10 000 ms
KeyUp(VK_LEFT);
end;

4.
Your AntiRandom procedure: Some things in there aren't really needed, for example the
FindTalk;
because that's already included in FindFastRandoms.

5.
your SetupScript procedure: You use 2 times
ClearDebug;
there's no need to;)

6.
A global remark, try to use global vars, for example in your
procedure TalkToJudge;

7.
    if(JudgeTries = 25)then
begin
LogOutPlayer;
end;
Same as number 1 & 2
I wont tell things like this anymore since tehre are more, you should be manage to find them ;)

8.
        Wait(750+random(500));                          // Start talking to the judge
ClickToContinue
instead of using "ClickToContinue" in combination with a wait, you can use
function ClickContinue(Click, Wait: Boolean): Boolean; 
where you can combine them ;)


Othere then these it is a nice piece of work you have created, you're knew man;)
If you will keep studying further this way then you will be an SRL member ;)

Also, I LOVE FindObjCustom:p

-Tsn.

vilon

2007-09-29 02:03:06

Thanks for the great feedback! :D
You should know that I really appreciate it!

1. I was aware that this could be done in other programming languages but was not sure about pascal but now i know, thanks.
3. Ops, seem to have forgot the failsafe here (we're all humans after all, aren't we? ;)).
4. Most procedures in there are double checks and copies of each other. Btw, why doesn't the procedure for finding randoms include the pinball solving? (or does it?).
6. I don't really understand what you are talking about here…How does declaring of global/local variables work in pascal/scar?
8. Thanks! That function was really useful!

From: the scar noob
Othere then these it is a nice piece of work you have created, you're knew man
If you will keep studying further this way then you will be an SRL member

Also, I LOVE FindObjCustom


Thanks!
I LOVE FindObjCustom too ;)

Edit: v2.1 is out!

the scar noob

2007-09-29 05:25:09

From: vilon
Thanks for the great feedback! :D
You should know that I really appreciate it!

1. I was aware that this could be done in other programming languages but was not sure about pascal but now i know, thanks.
3. Ops, seem to have forgot the failsafe here (we're all humans after all, aren't we? ;)).
4. Most procedures in there are double checks and copies of each other. Btw, why doesn't the procedure for finding randoms include the pinball solving? (or does it?).
6. I don't really understand what you are talking about here…How does declaring of global/local variables work in pascal/scar?
8. Thanks! That function was really useful!


Thanks!
I LOVE FindObjCustom too ;)

Edit: v2.1 is out!

Np;)
I've looked through the code again (to be honestly rather fast:p) and I see improvment;)
Glad you've liked my feedback:)
Now, what I mean with Globar Variables is:
Let's say that you have a var that you only use in 1 procedure, why should you give SCAR the task to get it loaded all the time?
Why shouldn't you defnine the variable in the procedure/function so it does reduces lagg?

That's what I meant, make global(in the procedure/function were you need it), so that your script would edven work better and so that SCAR don't have to load the variable all the time;)

-Tsn.

vilon

2007-09-29 05:33:54

From: the scar noob

That's what I meant, make global(in the procedure/function were you need it), so that your script would edven work better and so that SCAR don't have to load the variable all the time;)

-Tsn.


Yeh, I figured out what you meant with that but what I wanted to know is how this work practically…Like, how do you declare a variable global and not global (for a certain function/procedure), does it work like this?:

Global
var
x, y, whatever : Integer;

Local
procedure someprocedure;
var
target, main : Integer;
begin
DoScript;
end;

or? :P

the scar noob

2007-09-29 05:59:18

From: vilon
Yeh, I figured out what you meant with that but what I wanted to know is how this work practically…Like, how do you declare a variable global and not global (for a certain function/procedure), does it work like this?:

Global
var
x, y, whatever : Integer;

Local
procedure someprocedure;
var
target, main : Integer;
begin
DoScript;
end;

or? :P


Indeed, variables that you use all the time you can store them in the beginning of your script, the stay loaded all the time.

If you have a variable that you only use in a certain procedure/function then you declare it inside that procedure/function:
program New;

procedure WhatEver;
var
i: integer;
begin
ClearDebug;
for i:=0 to 4 do
begin
Writeln('value of i = '+inttostr(i));
end;
end;

begin
WhatEver;
end.
you see? I only am going to use those variables in that procedure, so I declare them inside the procedure.

-Tsn.

vilon

2007-09-29 06:22:37

Yes, just as I thought.
Thanks for clearing it up :)

the scar noob

2007-09-29 15:27:36

From: vilon
Yes, just as I thought.
Thanks for clearing it up :)


Np, I like helping people ;)

Dumpin

2007-09-30 10:54:37

ooh thanks :)

I might use it for long time :P ( if it works nice)

mstandlee

2007-11-05 18:01:25

Is there anything that you need to do to update it for the ltest srl version?

j3nkinz

2007-11-06 19:05:12

looks good i shall try if wrks will post results

bgxsaer

2007-11-13 06:54:55

Can any1 that tried it post a proggy?

red eyes 20

2007-11-24 15:57:21

sweet, any with the free mills i get from autoing this is painless training ^_^ thanks, i'll post a proggie when i use, like always =D

codx1

2007-11-25 06:07:04

So this script does the bow competition over and over again
and gains good range exp?

Timer

2008-02-24 19:21:42

Mind Updating?

StrikerX

2008-02-27 21:25:17

lawl he hasent been here for a while

ZaSz

2008-02-27 21:39:05

2 shovels working eh? This is a grave dont dig it.

Deni_mulic

2008-03-01 07:47:33

You're just as bad.
Anyway, This script has potential for creating bounty hunter freak pures with like 80 range 80 str and 55 combat.