SRL Archive - RS3 Outdated / Broken Scripts

Gods Lumbridge Bow Stringer *Beta*


godspower55

2009-06-09 19:27:04

This is my 2nd public script, it still needs alot of work but im hoping to finish it within 1 or 2 days. Any Suggestions or feedback is greatly helpful.
Please someone help me with the walking, i do not have a clue on walking plus help with the menus and stuff, please test and see if it works.
Release -
Beta – 6/9/09
Version 0.5 - 6/9/09

program New;
{.include srl/srl.scar}
{.SRL\Core\Bank.scar}
{.SRL\Core\Inventory.scar}
{.SRL\Core\FlagChat.scar}
{.SRL\Core\MapWalk.scar}


var
x,y,i,counter,Loads :integer;
Const
LoadsToDo = 9999;

function FlaxScreen : Boolean;
begin
Result := FindText(x, y, 'spin', NPCChars,314 ,50 ,346 ,57 );
end;

procedure DeclarePlayers;
begin
HowManyPlayers :=1; //How many players to use in script
NumberOfPlayers(HowManyPlayers);
CurrentPlayer :=0;

Players[0] .Name := ''; // Username
Players[0] .Pass := ''; // Pass
Players[0] .Nick := ''; //3/4 of the characters name (bobbey = bob)
Players[0] .Active := True; // True=yes, False=no//
Players[0] .Booleans[1] := False; // False for brightness Check Once. Just leave at false.
Players[0] .Pin := '0000'; // Your BANK-Pin - Leave at 0000 if you don't have a pin
end;

procedure GetFlax;
begin
MakeCompass('n');
FindObjCustom(x, y, ['ban', 'ooth'], [5137010,8687513], 2);
Mouse(x,y,5,5,false);
wait(800+random(300));
chooseoption('uickly');
wait(1000+random(800));
begin
FindObjCustom(x,y, ['lax', 'ax'], [12696923, 65536], 3);
wait(200+random(340));
Mouse(x,y,5,5,false);
wait(500+random(400));
ChooseOption('X');
wait(500+random(300));
Typesend('28');
wait(200+random(100));
CloseBank;
end;
end;


Procedure Walk1;
begin
Counter := 0
Mouse(622,128,5,5,true);
wait(8000+random(2000));
repeat
until FindObjCustom(x, y, ['stair', 'case'], [6844272,6712430], 2) or (counter=20);
wait(600+random(100));
Mouse(x,y,5,5,false);
ChooseOption('own');
wait(1900+random(900));
end;

Procedure Walk2;
begin
wait(1000+random(800));
if (FindSymbol(x,y,'spin')) then
mouse(x,y,5,5,true);
wait(3000+random(700));
end;

Procedure Spin;
begin
repeat
until FindObjCustom(x, y, ['inning', 'heel'], [14672099,5137011], 5) or (counter=20);
Mouse(x,y,5,5,true);
wait(1300+random(900));
begin
Mouse(265,119,5,5,false);
wait(500+random(800));
ChooseOption('X');
Wait(300+random(400));
TypeSend('28');
HoverSkill('crafting',False );
GameTab(4);
wait(46000+random(4000));
end;
end;


Procedure Walk3;
begin
Mouse(611,97,5,5,true);
FFlag(2);
FindObjCustom(x,y, ['air', 'case'], [6712686,8028803], 5);
Mouse(x,y,5,5,false);
wait(500+random(600));
chooseoption('up');
wait(500+random(700));
end;

Procedure BankFlax;
begin
Mouse(636,44,5,5,true);
FFlag(2);
FindObjCustom(x, y, ['ban', 'ooth'], [5137010,8687513], 2);
Mouse(x,y,5,5,false);
wait(800+random(300));
chooseoption('uickly');
wait(1500+random(900));
if FindDTM(605191, x, y, Mix1, Miy1, Mix2, Miy2) then
begin
Mouse(x, y, 5, 5, False);
wait(400+random(400));
ChooseOption('28');
wait(400+random(400));
begin
Mouse(54,106,5,5,false)
wait(800+random(340));
ChooseOption('X');
wait(800+random(300));
Typesend('28');
wait(300+random(100));
Mouse(486,35,5,5,true);
if not LoggedIn then Exit;
end;
end;
end;


begin
SetupSRL;
DeclarePlayers;
ActivateClient;
LoginPlayer;
GetFlax;
repeat
Walk1;
Walk2;
Spin;
Walk3;
Until (Loads>=LoadsToDo);
end.

Naike

2009-06-09 20:01:27

I would suggest reading - http://www.villavu.com/forum/showthread.php?t=3293
So you learn standards, as for now, many people wouldn't even mind reading your script.

godspower55

2009-06-09 21:21:47

is that better?

Dynamite

2009-06-09 21:25:22

I just read, Try using DTMs instead of FindObjCustom.
Put failsafes in.
Apart from that good start ;)
If you need any help msn is in my siggy.

T~M

King of the Nites

2009-06-09 21:29:01

You don't want to put exact coordinates in Mouse because it is very detectable. You have actual numbers defined like this in your GetFlax procedure:

Mouse(54, 106, 5, 5, False);

You have randomness added, but if you are always clicking near the 245, 34 area it will likely get you a ban and can miss click if the screen moves. If you are trying to click an item in your inventory, make a DTM. For you it would need to be something like:

if FindDTM(Flax, x, y, Mix1, Miy1, Mix2, Miy2) then
begin
Mouse(x, y, 5, 5, False);

In the FindDTM function, x and y store the coordinates in which it was found so even if the flax gets moved around somewhere, it will still find it and click it.


Also, some of your procedures you have repeat then right after that have until blah or counter = 20. Your counter will never reach 20 unless you have like counter := counter + 1 somewhere between repeat and until.
Like this from your Spin procedure:

repeat
until FindObjCustom(x, y, ['inning', 'heel'], [14672099,5137011], 5) or (counter=20);
Your counter will never reach 20, look at this:


Begin
Counter := 0// You have to make sure the counter is set at 0
Repeat
counter := counter + 1; //now your counter can reach 20 cause it keeps adding one to the counter.
Wait(200 + random (200));
until FindObjCustom(x, y, ['inning', 'heel'], [14672099,5137011], 5) or (counter=20);

See how the counter will keep adding by one until it reaches 20 or if it finds the spinning wheel?


Now, for the walking I would really recommend not using Mouse anywhere really (It can mess up so easily when its clicking on the minimap)… There are so many good ways to walk, for your script i would recommend looking at a couple good functions in MapWalk.scar (ask me if you don't know where to find this) that could help you out tremendously. Like radialwalk:

function RadialWalk(TheColor: Integer; StartRadial, EndRadial: Integer; Radius: Integer; Xmod, Ymod: Integer): Boolean;

I will guide you to a couple tutorials later that will help you with walking. With the walking, once you find out how to do it, it is simple! :)


There is one big thing your script is semi-missing and it is failsafes! If you get a missclick, what will happen, will it go into an endless loop, or reset itself? Failsafes will help keep your script from getting lost, stuck, or being put into endless loop. You have already gotten the basic failsafe with the counters. You need more while you are walking, I will link you to a tutorial.


I am glad you took the chance and made your own script. This is just one of the building blocks to becoming a good scripter. If you ever need help: get on IRC, add someone as a friend on AIM or MSN, create a thread looking for help, or send me or anyone a PM that you think could help. Also, if you have trouble with something, look at some other scripts and learn If you need anything else explained a little more in depth, ask me :). Here are a couple tutorials that I want you to look at:
DTM's:
http://www.villavu.com/forum/showthread.php?t=31021
http://www.villavu.com/forum/showthread.php?t=29175

Failsafes:
http://www.villavu.com/forum/showthread.php?t=37886

Walking:
http://www.villavu.com/forum/showthread.php?t=19162

If you don't get enough info from these tutorials, check out this place!!!
http://www.villavu.com/forum/forumdisplay.php?f=28

Have fun learning and good luck!!!
~King of the Nites

Dynamite

2009-06-09 21:34:00

Rep+ for you King of the Nites.
Very detailed ;)

T~M

godspower55

2009-06-09 21:35:16

Ty King of the Nites

Da 0wner

2009-06-09 21:42:09

Btw, on your thread I posted one with proper standards ;).