SRL Archive - RS3 Outdated / Broken Scripts

Tuna dropper wanted.


TkrZ

2009-04-24 19:59:33

Hi, I am starting to fish and bank my swordies, but I want a way to drop my tuna rather than manual srop because im lazy :p
I know that
program Dropper;
{.include srl/srl.scar}
begin
SetupSRL;
repeat
if InvFull then
DropAll;
Wait(1000);
until(false);
end.

Drops all but how to i make it just drop tunas?

impiwimpi

2009-04-24 20:06:55

Make a DTM of Tuna and do something like this:
program Dropper;
{.include srl/srl.scar}
var Tuna: integer;
begin
LoadDTm(Tuna);
SetupSRL;
LoadDTM
repeat
if FindDTM(Tuna, x, y, MIX1, MIY1, MIX2, MIY2) then
MMouse(x,y,4,4);
ChooseOption('rop');
Wait(1000);
end else (alse)
until(false)
FreeDTM(Tuna);
end.


EDIt: DTM of a Tuna;
Tuna := DTMFromString( '78DA637463606038CF800296CC9CC9C00FA41' +
'981F83F1030FA01196719D000231209A40381C405026AAC80C42D' +
'026A2C80C445FC6A00B3840B5E');

Nose Smasher

2009-04-24 20:07:45

I'm assuming you want to run a script while you play legit? Well you need to make SCAR find the tunas… You can do this many different ways… Reflection is the cheap easy way :p or you could make a DTM or bitmap… or you could simply jus use the color of the tuna ;) So go ahead and make your "FindTuna" function, then your script should look somethin like this:
 If FindTuna(x, y) then MMouse(x, y, 5, 5);
if IsUpText('una') then
begin
GetMousePos(x, y);
Mouse(x, y, 0, 0, false);
Wait(75+random(75));
If not ChooseOption('drop') then exit;
end;

Doh, beat me to first post :p

jakeyboy29

2009-04-24 20:15:27

drop (2) - (28)?

TkrZ

2009-04-24 20:16:07

what do i do with the
Tuna := DTMFromString( '78DA637463606038CF800296CC9CC9C00FA41' +
'981F83F1030FA01196719D000231209A40381C405026AAC80 C42D' +
'026A2C80C445FC6A00B3840B5E');

in the script impiwimpi?

TkrZ

2009-04-24 20:17:08

jakeyboy, if my inventorys full while harpooning i want it to drop the tunas and not the swordies

TkrZ

2009-04-24 20:38:25

Can anyone just post a full script please?

ZaSz

2009-04-24 21:28:43

program Dropper;
{.include srl/srl.scar}
var Tuna,x,y: integer;
begin
Tuna := DTMFromString( '78DA637463606038CF800296CC9CC9C00FA41' +
'981F83F1030FA01196719D000231209A40381C405026AAC80 C42D' +
'026A2C80C445FC6A00B3840B5E');
SetupSRL;
LoadDTM
for i := 0 to 27 do
if FindDTM(Tuna, x, y, MIX1, MIY1, MIX2, MIY2) then
MMouse(x,y,4,4);
ChooseOption('rop');
Wait(1000);
end;
FreeDTM(Tuna);
end.

TkrZ

2009-04-25 20:34:05

Error:
program Dropper;
{.include srl/srl.scar}
var Tuna,x,y: integer;
begin
Tuna := DTMFromString( '78DA637463606038CF800296CC9CC9C00FA41' +
'981F83F1030FA01196719D000231209A40381C405026AAC80 C42D' +
'026A2C80C445FC6A00B3840B5E');
SetupSRL;
LoadDTM
for i := 0 to 28 do
if FindDTM(Tuna, x, y, MIX1, MIY1, MIX2, MIY2) then
MMouse(x,y,4,4);
ChooseOption('rop');
Wait(1000);
end;
FreeDTM(Tuna);
end.

Failed when compiling
Line 10: [Error] (16767:1): Invalid number of parameters in script

ZaSz

2009-04-25 20:39:31

and for the vars at the top should have " I, Tuna,x,y "
i said for i := 0 to 27….

0 counts as a slot. 0 1 2 would check the first 3 slots. thats why its 0 to 27 not 0 to 28.

0 to 28 would check 29 times.

TkrZ

2009-04-26 00:12:19

From: zasz
and for the vars at the top should have " I, Tuna,x,y "
i said for i := 0 to 27….

0 counts as a slot. 0 1 2 would check the first 3 slots. thats why its 0 to 27 not 0 to 28.

0 to 28 would check 29 times.



program Dropper;
{.include srl/srl.scar}
var I,Tuna,x,y: integer;
begin
Tuna := DTMFromString( '78DA637463606038CF800296CC9CC9C00FA41' +
'981F83F1030FA01196719D000231209A40381C405026AAC80 C42D' +
'026A2C80C445FC6A00B3840B5E');
SetupSRL;
LoadDTM
for i := 0 to 27 do
if FindDTM(Tuna, x, y, MIX1, MIY1, MIX2, MIY2) then
MMouse(x,y,4,4);
ChooseOption('rop');
Wait(1000);
end;
FreeDTM(Tuna);
end.



Still not working! :confused:

Pure1993

2009-04-26 00:16:52

program Dropper;

{.include srl/srl.scar}

var
Tuna,x,y: integer;
NotFind : Boolean;

begin
Tuna := DTMFromString( '78DA637463606038CF800296CC9CC9C00FA41' +
'981F83F1030FA01196719D000231209A40381C405026AAC80 C42D' +
'026A2C80C445FC6A00B3840B5E');
SetupSRL;
repeat
if FindDTM(Tuna, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x,y,4,4,false);
ChooseOption('rop');
Wait(1000);
end else
NotFind := True;
until NotFind;
end.

Erm, guys, it really isn't that hard… ;)

Edit: He has tuna AND Swordies in his inventory, not ONLY tunas, as far as I got it, secondly, why load a DTM when it is already declared? Thirdly, no Standards = epic fail, by posting on a help thread you are setting giving an example from which people will/might learn… :)

ian.

2009-04-26 00:17:03

MMouse(x, y, 4, 4); -> Mouse(x, y, 3, 3, False);

Ninja'd. >:/

TkrZ

2009-04-26 00:19:16

In:
program Dropper;

{.include srl/srl.scar}

var
Tuna,x,y: integer;
NotFind : Boolean;

begin
Tuna := DTMFromString( '78DA637463606038CF800296CC9CC9C00FA41' +
'981F83F1030FA01196719D000231209A40381C405026AAC80 C42D' +
'026A2C80C445FC6A00B3840B5E');
SetupSRL;
repeat
if FindDTM(Tuna, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x,y,4,4,false);
ChooseOption('rop');
Wait(1000);
end else
NotFind := True;
until NotFind;
end.

and
program Dropper;

{.include srl/srl.scar}

var
Tuna,x,y: integer;
NotFind : Boolean;

begin
Tuna := DTMFromString( '78DA637463606038CF800296CC9CC9C00FA41' +
'981F83F1030FA01196719D000231209A40381C405026AAC80 C42D' +
'026A2C80C445FC6A00B3840B5E');
SetupSRL;
repeat
if FindDTM(Tuna, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x,y,3,3,false);
ChooseOption('rop');
Wait(1000);
end else
NotFind := True;
until NotFind;
end.

[Runtime Error] : Exception: "Invalid encrypted string" in line 10 in script

footballjds

2009-04-26 00:20:31

program Dropper;
{.include srl/srl.scar}
var I,Tuna,x,y: integer;
begin
Tuna := DTMFromString( '78DA637463606038CF800296CC9CC9C00FA41' +
'981F83F1030FA01196719D000231209A40381C405026AAC80 C42D' +
'026A2C80C445FC6A00B3840B5E');
SetupSRL;
for i := 0 to 27 do
begin
if FindDTM(Tuna, x, y, MIX1, MIY1, MIX2, MIY2) then
MMouse(x,y,4,4);
ChooseOption('rop');
Wait(1000);
end;
FreeDTM(Tuna);
end.
FIX^^
lol, some retards post here….

Pure1993

2009-04-26 00:21:06

Lol, never had that errror before… looking into it, give me a sec… :O
LOL, Footballjds, how are you going to choose an option without clicking the object? xD

Pure1993

2009-04-26 00:24:17

Found the error, the dtm is wrong, create a new one… there is a space in "…C80 C42D'" which isn't allowed in a DTM ^^
Sorry for double post, thought someone posted in the mean time :(

Okay, working DTm included, works perfectly, just tested it:

program Dropper;

{.include srl/srl.scar}

var
Tuna,x,y: integer;
NotFind : Boolean;

begin
SetupSRL;
Tuna := DTMFromString('78DA63CC616260E0616440068BA64F636005D' +
'220D1FF40C0580654C381AA06240B5303E6A503D5881250930A54' +
'C34E404D1C508D3001357940352CF8D50000B19F08CE');
repeat
if FindDTM(Tuna, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x,y,4,4,false);
ChooseOption('rop');
Wait(1000);
end else
NotFind := True;
until NotFind;
end.

ZaSz

2009-04-26 00:47:24

From: Pure1993
Found the error, the dtm is wrong, create a new one… there is a space in "…C80 C42D'" which isn't allowed in a DTM ^^
Sorry for double post, thought someone posted in the mean time :(

Okay, working DTm included, works perfectly, just tested it:

program Dropper;

{.include srl/srl.scar}

var
Tuna,x,y: integer;
NotFind : Boolean;

begin
SetupSRL;
Tuna := DTMFromString('78DA63CC616260E0616440068BA64F636005D' +
'220D1FF40C0580654C381AA06240B5303E6A503D5881250930A54' +
'C34E404D1C508D3001357940352CF8D50000B19F08CE');
repeat
if FindDTM(Tuna, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x,y,4,4,false);
ChooseOption('rop');
Wait(1000);
end else
NotFind := True;
until NotFind;
end.


nothing to set it back false for next time it calls procedure.


program Dropper;

{.include srl/srl.scar}

var
Tuna,x,y: integer;
NotFind : Boolean;

begin
SetupSRL;
Tuna := DTMFromString('78DA63CC616260E0616440068BA64F636005D' +
'220D1FF40C0580654C381AA06240B5303E6A503D5881250930A54' +
'C34E404D1C508D3001357940352CF8D50000B19F08CE');
for i := 0 to 27 do
if FindDTM(Tuna, x, y, MIX1, MIY1, MIX2, MIY2) then
begin
Mouse(x,y,4,4,false);
ChooseOption('rop');
Wait(1000);
end;
end.

^ more efficient.

Pure1993

2009-04-26 00:50:05

lol, but he doesn't have 27 tunas… he also has some swordies… so we are looking for the tuna way to often with i := 0 to 27… And he is restarting the script every time he wants to drop his tuna, thus reseting the values automatically to false… ;)

ZaSz

2009-04-26 00:55:38

it checks for tuna 28 times… Swordies are non-relevant in the procedure… That way if its found in slot 1 to slot 28 it drops.

Don't you know the procedure
for i := blank to Blank do
0 to 27 is like 0 1 2…26 27 = 28 times it calls…

here use this example for my evidence.


program New;
var
me,i:integer;


begin
for i := 0 to 4 do
begin
me := me + 1;
end;
writeln(inttostr(me));
end.

because of the I goes the the loop 1 time at 0, 2 at 1, 3 at 2, 4 at 3, 5 at 4. You get me? Result
Successfully compiled (347 ms)
5
Successfully executed

Pure1993

2009-04-26 01:00:00

lol, of course I know the procedure, but my methode only searches for tuna as long as there is still tuna to find… let's say you only have 13 tunas in your inventory, but you check 28 times, then it will search 15 times more than needed…
Of course the findDTM function is so fast that techincally, it doesn't really matter, but still, I preffer to only search as long as there is something to search for :)

Edit:

From: zasz
here use this example for my evidence.


program New;
var
me,i:integer;


begin
for i := 0 to 4 do
begin
me := me + 1;
end;
writeln(inttostr(me));
end.

because of the I goes the the loop 1 time at 0, 2 at 1, 3 at 2, 4 at 3, 5 at 4. You get me? Result
Successfully compiled (347 ms)
5
Successfully executed


Quite honestly, I think we are talking past each other… I know your way works as well as mine does, but mine works faster… Anyway, I became a member quite a while back ( member = must know "for to do"), and I did release a script or two (even though I must admit, none of them were high quality, for the ones I am using I will not release until I maxed out the corresponding skills), but if you take a look at ANY of them, you will see the usage of "for to do" a lot of times…

footballjds

2009-04-26 03:26:37

From: Pure1993
Lol, never had that errror before… looking into it, give me a sec… :O
LOL, Footballjds, how are you going to choose an option without clicking the object? xD


lol, its not as if i wrote that. i just edited so it compiled ;)

it is crap ftl…