SRL Archive - First Scripts

[SCAR 3.12/3.14][SRL 4 #12/13]Auto raw chicken buyer!


Floor66

2008-02-06 09:55:46

Hello,

I've made this (simple) Raw Chicken buyer as first script :)
I got it to do no more then once, it seems to bumm up the walking on 2nd try.

Will this ban me fast?

It has:

1)
Walk to the store (Located north of the silk trader).

2)
Buy the chickens.

3)
Walk back to bank.

4)
Repeat.

I am not 100% done, but i need more AntiBan, etc.
I dont think it needs AntiRandom..

Why Chickens?
Buy for 9gp ea, sell for ±7 times more!

program RawCkickenZ;
{.include SRL\SRL.scar}

var x, y, Loads : Integer;

const
ToDo = 10; //How much loads?

procedure WalkStone;
begin
Mouse(672, 39, 10, 10, true);
Flag;
end;

procedure WalkMore;
begin
if (FindSymbol(x, y, 'scimitar shop')) then
begin
Mouse(x, y, 25, 5, true);
Flag;
end else
Writeln('Couldnt find sword icon');
Exit;
end;

procedure WalkSilk;
begin
if (FindSymbol(x, y, 'Silk stall')) or FindColorTolerance(x, y, 7478692, 0, 0, 1280, 1024, 15) then
begin
Mouse(x, y, 5, 5, true);
Flag;
End else
begin
Writeln('Silktrader not found');
Exit;
end;
end;

procedure FindQ;
begin
if (FindSymbol(x, y, 'quest')) or FindColorTolerance(x, y, 13670550, 0, 0, 1280, 1024, 15) then
begin
Mouse(x, y, 5, 5, true);
Flag;
Wait(500+random(500));
End else
Writeln('Ali symbol not found!');
Exit;
end;

procedure ClickAli;
begin
if (FindObj(x, y, 'orr', 11385016, 10)) then
begin
Mouse(x, y, 1, 1, true);
Flag;
End else
Writeln('Ali no found no.. dop3?');
Exit;
end;

procedure Talk;
begin
TalkToRand;
Mouse(267, 437, 5, 5, true);
Wait(500);
end;

procedure Buy;
begin
Mouse(84, 72, 5, 10, true);
Wait(1000);
if (FindObj(x, y, 'ick', 10263999, 10)) then
begin
Mouse(x, y, 5, 5, false);
ChooseOption('Buy X');
Wait(750+random(1000));
TypeSend('33');
end;
end;

procedure WalkBack1;
begin
if (FindSymbol(x, y, 'Silk stall')) then
begin
Mouse(x, y, 15, 10, true);
Flag;
end else
Writeln('Didnt find Silk stall');
Exit;
end;

procedure WalkBack2;
begin
if (FindSymbol(x, y, 'scimitar shop')) then
begin
Mouse(x, y, 5, 5, true);
Flag;
end else
Mouse(601, 115, 5, 5, true);
Flag;
end;

procedure WalkBack3;
begin
if (FindSymbol(x, y, 'minigame')) then
begin
Mouse(x, y, 5, 5, true);
Flag;
end else
Writeln('Didnt find minigame sign');
Exit;
end;

procedure WalkBack4;
begin
Mouse(579, 110, 5, 5, true);
Flag;
end;

procedure Walkbank;
begin
if (FindSymbol(x, y, 'bank')) then
begin
Mouse(x, y, 5, 5, true);
Flag;
end;
end;

procedure Bank;
begin
OpenBankQuiet('akb');
Wait(1000+random(500));
begin
MouseItem(2, false);
ChooseOption('All');
Wait(500+random(250));
CloseBank;
end;
end;

begin
SetUpSRL;
ActivateClient;
wait(1000);
repeat
SetRun(False);
WalkStone;
WalkMore;
WalkSilk;
FindQ;
ClickAli;
Talk;
Buy;
WalkBack1;
WalkBack2;
WalkBack3;
WalkBack4;
WalkBank;
Bank;
Loads := Loads + 1;
Until(Loads = ToDo);
ClearDebug;
end.

Jewish Zombeh

2008-02-06 14:50:18

Pretty good idea for making a first script. However, the walking routine is not so great; no randomness and it's not based on colors (just a few cords alone).

Keep reading tutorials and update this, I want to see how well you can get it running :D.

You got the core concepts of SCAR/SRL though.

Richard

2008-02-06 14:58:41

I think this is a pretty good and useful script, the only one thing I noticed is the ammount it buy, it says 33, surely i would be 27 if you were buying a full invent and you would have to have money.

Anyway, I think it looks good.

DR

Cazax

2008-02-06 15:00:03

GOod work. The script should work better with more failsafes.

Richard

2008-02-06 15:03:04

From: cazax
GOod work. The script should work better with more failsafes.



Yeah, more failsafes and also anti-randoms as you get them when you talk to some NPCs and auto-respond if someone asks you levels or things like that.

And if you made it login and logout (sleeptime) then it would be less likely to get randoms and more humanlike (as buying stuff is boring!)

EDIT: W00T 100th post :D

Floor66

2008-02-06 16:23:34

Would learnin radialwalk help?

Cazax

2008-02-06 16:36:48

in this case, radialwalk should work as a failsafe. Yes, radialwalk would help.

Floor66

2008-02-07 09:56:18

Then first, i need to find a tut on it :P

Cazax

2008-02-07 10:34:01

Click Here
then Click Here

Floor66

2008-02-07 11:21:54

I made a sort of V2 with just RadialWalking:
program RawCkickenZ;
{.include SRL\SRL.scar}

var x, y, Loads : Integer;

const
ToDo = 10; //How much loads?

procedure AntiBan;
begin
case 5 of
0 : BoredHuman;
1 : SleepAndMoveMouse(3000+random(1337));
2 : RandomRClick;
3 : HoverSkill('random', False);
4 : AlmostLogout;
end;
end;

procedure WalkStone;
begin
RadialWalk(2115946, 0, 90, 72, 99, 99)
AntiBan;
FFlag(10);
end;

procedure WalkMore;
begin
RadialWalk(4871101, 0, 90, 72, 99, 99);
AntiBan;
FFlag(10);
end;

procedure WalkSilk;
begin
RadialWalk(2978876, 0, 90, 99, 99, 99);
AntiBan;
FFlag(10);
end;

procedure HalfStep;
begin
RadialWalk(863023, 270, 90, 92, 99, 99);
AntiBan;
FFlag(10);
end;

procedure FindQ;
begin
if (FindSymbol(x, y, 'quest')) then
begin
Mouse(x, y, 5, 5, true);
AntiBan;
FFlag(10);
end;
end;

procedure ClickAli;
begin
if (FindObj(x, y, 'orr', 11385016, 10)) then
begin
Mouse(x, y, 1, 1, true);
Flag;
End else
Writeln('Ali no found no.. dop3?');
Exit;
end;

procedure Talk;
begin
TalkToRand;
Mouse(267, 437, 5, 5, true);
Wait(500);
end;

procedure Buy;
begin
Mouse(84, 72, 5, 10, true);
Wait(1000);
if (FindObj(x, y, 'ick', 10263999, 10)) then
begin
Mouse(x, y, 5, 5, false);
ChooseOption('Buy X');
Wait(750+random(1000));
TypeSend('33');
end;
end;

procedure WalkBack1;
begin
RadialWalk(7871140, 270, 90, 72, 99, 99);
AntiBan;
FFlag(10);
end;

procedure WalkBack2;
begin
RadialWalk(9803906, 270, 90, 52, 99, 99);
AntiBan
FFlag(10);
end;

procedure WalkBack3;
begin
RadialWalk(4871101, 0, 90, 62, 99, 99);
AntiBan;
FFlag(10);
end;

procedure WalkBack4;
begin
RadialWalk(2978876, 270, 180, 52, 99, 99);
AntiBan;
FFlag(10);
end;

procedure Walkbank;
begin
if (FindSymbol(x, y, 'bank')) then
begin
Mouse(x, y, 5, 5, true);
AntiBan;
FFlag(10);
end;
end;

procedure Bank;
begin
OpenBankQuiet('akb');
Wait(1000+random(500));
begin
MouseItem(2, false);
ChooseOption('All');
Wait(500+random(250));
CloseBank;
end;
end;

begin
SetUpSRL;
ActivateClient;
wait(1000);
repeat
SetRun(False);
WalkStone;
WalkMore;
WalkSilk;
FindQ;
HalfStep;
ClickAli;
Talk;
Buy;
WalkBack1;
WalkBack2;
WalkBack3;
WalkBack4;
WalkBank;
Bank;
Loads := Loads + 1;
Until(Loads = ToDo);
ClearDebug;
end.

Do the colors of RS change every time i log?!
They never seem to be good..

Richard

2008-02-07 16:18:04

The one with radial walk looks good, btw theres also a script that can help alot when using radial walk.

I'll attach at the bottom of this when I find it

EDIT: I founded it!