SRL Archive - RS3 Outdated / Broken Scripts

QuickTeleGrab


mrpickle

2009-06-03 06:40:28

QuickTeleGrab (FIXED)
This is a script that is used to obtain items by telekinetic grab, then drops it.

Features
- AntiBan
- Quick Customizable macro settings

HOW TO START?

1. Place all characters in the same spot as above picture for script to work properly. (Varrok east bank [underground])
2. Items within the red box will be kept. Items in the blue box will be dropped.
3. Script will stop if you have used up all your runes, or have grabbed enough times.
4. Player will wait for objects to spawn
5. Post any problems with script here.

I've tested and working =)

JAD

2009-06-03 07:09:08

Semi colon needs to go after the Compass const for it to compile.

On line 133, there should not be a semicolon ";" after else for it to compile.

I'm gonna look it over more and will edit this post if I find anything. Looks good though. Good job :)

Edit:

OK, a few things:

Try to use the least amount of global variables possible. Variables like x and y can easily be used locally within the function.

Things like:

if(FindNormalRandoms)then
begin
Result := true;
end;
Do not need a begin end. Any time you only have one statement after an if then, just leave out the begin end and it will only do that statement if the condition is true:

if(FindNormalRandoms)then
Result := true;

I would check for normal randoms before checking for the fight, but that's just me.

In wait for color, you do not use the begin end like you should. This will make it not work correctly. You have:

repeat
wait(DelayCounting);
Timer := Timer + 1
If Timer > MaxDelayCounting then
Writeln ('Timed Out');
Break;
until (FindColor(x,y,Color,0,0,800,600))
if the timer is > maxdelaycounting, then it will just writeln timed out. It will always break right after though, disallowing the loop to reiterate.

You should really put semi colons after assignments and until(condition);'s. Like

Time := 0
Really should be

Time := 0;
Better not to create bad habits :)

On line 127, you call InvCount to return the Inventory Count but do nothing with it. Then, you do if(InvCount = 28)then. Line 127 really isn't necessary.

Near line 151, we have a lack of begin ends:

end else
writeln('Out of runes!');
NextPlayer(False);

It will writeln Out of runes! if the condition is not met, but it will always NextPlayer(False), making the script always switch players here. Same on line 159.

In the main loop, you have:

begin
for a:= 1 to 8 do
counter[a] := 0;
end;
Why have the begin end at all? They are completely unnecessary because there is no condition or anything above it.





Hope I helped some. I know I may have pointed out a lot of things, but you really did do a good job. Just fix up a few things and the script should work great. Keep up the good work!


Edit2:

You should probably use the Integer member array of the Players structure. Each player may have different colored items.

Da 0wner

2009-06-03 07:23:24

Item1color = 1746121;// color of item to pickup
Item1name = 'gold ore'; // name of first item?
Item2color = 941941;// 2nd color of item to pickup
Item2name = 'gold bar'; // name of 2nd item?
1. You can just use arrays.
or 2. You can use a record.

type
TItem = record
Name : string;
Color : integer;
end;

mrpickle

2009-06-03 14:42:16

Ok. I'll fix and upload new one after I come back =).

P1nky

2009-06-03 15:26:44

yeah Compass = 'S' needs a semicolon. and keep going from there.
I would advise you to do it ASAP if you want this script used.
Because alot of people will be like your script isn't working and than move on.

Lol GL

Gu3st...

2009-06-03 16:31:13

And for things like
if BlaBlaBla then
Result := True;
This could be replaced with
Result := BlaBlaBla;

JAD

2009-06-03 19:55:13

From: Zyt3x
And for things like
if BlaBlaBla then
Result := True;
This could be replaced with
Result := BlaBlaBla;


Not in all cases though. Like in his find randoms. if he does

Result := FindFight;
Result := FindNormalRandoms;

then this would be bad, because if it found a fight, it would result true. Then it would look for normal randoms, and if there were none there, would result false even though it should have been true because of the fight.

Naum

2009-06-03 19:58:48

@ Jad he could make good use of X0r there?

Result := FindFight xor FindNormalRandoms
:)

JAD

2009-06-03 20:01:57

From: NaumanAkhlaQ
@ Jad he could make good use of X0r there?

Result := FindFight xor FindNormalRandoms
:)


But it's not actually just Find fight. It's like

if(FindFight)then
begin
result := true;
wioghwge;
wgeioweghoew;
end;
if(FindNormalRandoms)then
Result := true;

If you can make that shorter then you would have to overload some operators, even though I don't think that you can do that in SCAR :p

Richard

2009-06-03 20:12:06

You don't get fighting randoms in RS anymore ;)

Naum

2009-06-03 20:12:51

Your avoid ban procedure wont work at all, Instead of a '-' you need a '..' between the numbers.

What the '-' is telling SCAR to do is subtract it and make it minus, which is something you don't want :).

@JAD didn't read the script ,soz :)

@Richard - lol then its easy, your whole antirandoms procedure is

Result := FindNormalRandoms;

or don't even have a procedure at all!

mrpickle

2009-06-04 00:32:04

I just found out.
This doesn't work when I try it out in game=\. I am not sure why, but seems logical to me.


procedure Grabbing;

begin
If Not LoggedIn Then exit;
WaitForColor(1000,70 + random(10),Item1color xor Item2color)
If (CastSpell(20))then// Casts on the item you are looking for.
begin
If (findcolor(x,y,Item1color or Item2color,0,0,800,600)) then
Mouse(x,y,1+random(4),1+random(4),true);
writeln('Casted spell '+ inttostr(counter[1])+' times in total of all characters.');
counter[1] := counter [1] + 1;
counter[8] := counter [8] + 1;
end else
begin
writeln('Out of runes!');
NextPlayer(False);
end;
end;

ShowerThoughts

2009-06-04 00:42:00

I got a way better idea:
You perform a for to do loop, For I:= 0 to ItemsToBeDroppedCount
You add the info to an array.
Uptextarray := isuptext;
then go to next item ;)
simple but yet effective.

I wrote this fast btw, gtg bed.

mrpickle

2009-06-04 02:43:39

Ok, overcame some problems with script. It now should run properly, but it's specific in its function now. Still, try it out =D.