SRL Archive - OSR Help

First script..


John

2011-12-25 18:44:42

Well since Reflection went down i had to do things legit, then i got to getting agility up…. I don't like it at all. So i watched yohojos Tut for begginers and i made this for the Barbarian outpost. It ONLY clicks on what it needs to advance, but i don't know what to add in to get out of the pit if he fails an obstacle, plus the first obstacle is so thin(the rope one) It always ends up moving off the rope and missing it all together, therefor mucking up the whole script. So my question is, What should i add in to make it work stably, and how can i add in anti-ban?(like randomizing the clicks on some obstacles)
Any help would be greatly appreciated
And A thanks to MAIN from Sythe for showing me this site.

UPDATED CODE still go a problem at line 73 : [Error] (74:5): Identifier expected at line 73
Compiling failed.
program Agilitycourse;
{$i srl/srl.scar}

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := ''
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active:=True;
end;

procedure Course;
begin;
MoveMouse ( 255, 165);
ClickMouse (255, 233, 1);
Wait (5999);
MoveMouse (228, 302);
ClickMouse (255, 302, 1);
Wait (12500);
MoveMouse (142, 168);
ClickMouse (130, 163, 1);
Wait (5000);
MoveMouse (195, 139);
ClickMouse (195, 139, 1);
Wait (10000);
MoveMouse (256, 203);
ClickMouse (256, 203, 1);
Wait (4000);
MoveMouse (312, 19);
ClickMouse (312, 19, 1);
Wait (7000);
MoveMouse (386, 94);
ClickMouse (386, 94, 1);
Wait (7250);
MoveMouse (435, 168);
ClickMouse (435, 168, 1);
Wait (7000);
MoveMouse (456, 148);
ClickMouse (456, 148, 1);
Wait (4000);
MoveMouse (372, 202);
ClickMouse (372, 202, 1);
Wait (4000);

end;
procedure RopeSwing;
var x, y: integer;
begin
if FindObj(x, y, 'ope', 272431, 3) then
begin
Mouse(x, y, 2, 2, false);
ChooseOption('ope');
Wait (7000)
end;
end;

procedure NextObstacle;
var x, y: integer;
begin
if FindObj(x, y, 'og', 1910844, 4) then
begin
Mouse(x, y, 2, 2, false);
ChooseOption('og');
Wait (13000)
end;
if not FindObj(x, y, 'add', 4543578, 2) then RopeSwing;
Mouse(x, y, 2, 2, false);
ChooseOption('add');
[B]then RopeSwing;[/B] <=== Get the error here.
end;
procedure NetClimb;
var x, y: integer;
begin
if FindObj(x, y, 'tac', 3626091, 3) then
begin
Mouse(x, y, 2, 2, false);
ChooseOption('tac');
end;
end;

begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
RopeSwing;
NextObstacle;
NetClimb;
end.

Dynamite

2011-12-25 18:52:39

From: Evlin
Well since Reflection went down i had to do things legit, then i got to getting agility up…. I don't like it at all. So i watched yohojos Tut for begginers and i made this for the Barbarian outpost. It ONLY clicks on what it needs to advance, but i don't know what to add in to get out of the pit if he fails an obstacle, plus the first obstacle is so thin(the rope one) It always ends up moving off the rope and missing it all together, therefor mucking up the whole script. So my question is, What should i add in to make it work stably, and how can i add in anti-ban?(like randomizing the clicks on some obstacles)
Any help would be greatly appreciated
And A thanks to MAIN from Sythe for showing me this site.

program Agilitycourse;
procedure Course;
begin;
MoveMouse ( 255, 165);
ClickMouse (255, 233, 1);
Wait (5999);
MoveMouse (228, 302);
ClickMouse (255, 302, 1);
Wait (12500);
MoveMouse (142, 168);
ClickMouse (130, 163, 1);
Wait (5000);
MoveMouse (195, 139);
ClickMouse (195, 139, 1);
Wait (10000);
MoveMouse (256, 203);
ClickMouse (256, 203, 1);
Wait (4000);
MoveMouse (312, 19);
ClickMouse (312, 19, 1);
Wait (7000);
MoveMouse (386, 94);
ClickMouse (386, 94, 1);
Wait (7250);
MoveMouse (435, 168);
ClickMouse (435, 168, 1);
Wait (7000);
MoveMouse (456, 148);
ClickMouse (456, 148, 1);
Wait (4000);
MoveMouse (372, 202);
ClickMouse (372, 202, 1);
Wait (4000)

end;
begin
repeat
course;
until(false);

end.


DO NOT USE THIS. :duh:
1. You will get banned for no randomization co-ordinate clicking.
2. As soon as you move the compass or angle a tiny bit, your clicking will be out.

Look up DTMs, TPAs etc.
But most of all, look up MMouse and Mouse.

-Boom

Griff

2011-12-25 18:53:17

Try using some object finding, instead if just Mouse functions. That could allow you to incorporate failsafes and antibanning and things like that. Check out my Simba beginners tutorial, I think it could help you out.

And by the way its nice to see a newcomer scripting instead of just leeching!

John

2011-12-25 18:55:57

From: Dynamite
DO NOT USE THIS. :duh:
1. You will get banned for no randomization co-ordinate clicking.
2. As soon as you move the compass or angle a tiny bit, your clicking will be out.

Look up DTMs, TPAs etc.
But most of all, look up MMouse and Mouse.

-Boom


I am well aware, please don't insult a first time scripter for making a mistake.
From: Griff
Try using some object finding, instead if just Mouse functions. That could allow you to incorporate failsafes and antibanning and things like that. Check out my Simba beginners tutorial, I think it could help you out.

And by the way its nice to see a newcomer scripting instead of just leeching!

thank you Griff for posting something useful.

Griff

2011-12-25 18:59:45

From: Evlin
I am well aware, please don't insult a first time scripter for making a mistake.


He was just making sure you didn't get your character banned :p
Feedback can seem insulting sometimes, but they mean the best.

Olly

2011-12-25 19:03:08

Take a look into object finding, you basically created a ghost mouse if im correct? Gets the job done I assume but I don't think your account would last long :P

Dynamite

2011-12-25 19:05:03

From: Evlin
I am well aware, please don't insult a first time scripter for making a mistake.


Oh, I am ever so sorry for worrying about your character and trying to improve your scripting skills. :spongebob:

-Boom

John

2011-12-25 19:17:43

From: akonowns
Take a look into object finding, you basically created a ghost mouse if im correct? Gets the job done I assume but I don't think your account would last long :P


could anyone link me to what he means?

Griff

2011-12-25 19:19:28

From: Evlin
could anyone link me to what he means?


There are many different types of object finding. The simplest of which would be just a FindObj (which you can find out in the tutorial I linked you to), but you should work your way up to TPAs, which you can find out about in tutorial island.

John

2011-12-25 19:29:22

From: Griff
There are many different types of object finding. The simplest of which would be just a FindObj (which you can find out in the tutorial I linked you to), but you should work your way up to TPAs, which you can find out about in tutorial island.
In your tut it uses

procedure ChopTree;
var x, y: integer;
begin
if FindObj(x, y, 'hop', 1785912, 35) then
begin
Mouse(x, y, 2, 2, false);
ChooseOption('hop');
end;
end;
Would i change that to somthing like ope For Rope swing?
so it would become:
procedure Rope Swing;
var x, y: integer;
begin
if FindObj(x, y, 'ope, 1785912, 35) then
begin
Mouse(x, y, 2, 2, false);
ChooseOption('ope');
end;
end;

Griff

2011-12-25 19:30:59

Exactly! The tolerance might need some adjusting, but other than that it should work!

Dynamite

2011-12-25 19:33:36

From: Griff
Exactly! The tolerance might need some adjusting, but other than that it should work!


+ the color.

John

2011-12-25 19:35:18

From: Griff
Exactly! The tolerance might need some adjusting, but other than that it should work!

so if i were to run this it should:
-login
-cross the rope swing.
- then stop.?

Griff

2011-12-25 19:43:48

From: Dynamite
+ the color.


Oh I thought he changed it already, you're right :p

From: Evlin
so if i were to run this it should:
-login
-cross the rope swing.
- then stop.?

If it had that plus declare players and all the usual stuff, then yes.

John

2011-12-25 19:46:54

From: Griff
Oh I thought he changed it already, you're right :p


If it had that plus declare players and all the usual stuff, then yes.


how do i change the tolerence, where is the number i need to changed?

Griff

2011-12-25 19:48:19

From: Evlin
how do i change the tolerence, where is the number i need to changed?


The tolerance is the last number in FindObj, so the 35 in the example.

John

2011-12-25 19:50:16

From: Griff
The tolerance is the last number in FindObj, so the 35 in the example.

yeah i changed it and played it, It swung the rope :DD
what if i fall down(fail the rope swing?)

Griff

2011-12-25 19:52:37

From: Evlin
yeah i changed it and played it, It swung the rope :DD
what if i fall down(fail the rope swing?)


Nice!

If you fell, you would have to do an if… then statement. So for your next obstacle, do the same thing as the first like if it finds it then click, but if it doesn't find it (if not), then you would assume it fell down, so you would need to do go back to the start and do it again.

John

2011-12-25 19:55:08

From: Griff
Nice!

If you fell, you would have to do an if… then statement. So for your next obstacle, do the same thing as the first like if it finds it then click, but if it doesn't find it (if not), then you would assume it fell down, so you would need to do go back to the start and do it again.


could you give me an example in code? it would help me grasp what you mean.

Griff

2011-12-25 20:01:19

From: Evlin
could you give me an example in code? it would help me grasp what you mean.


procedure RopeSwing;
var x, y: integer;
begin
if FindObj(x, y, 'ope', 1785912, 35) then
begin
Mouse(x, y, 2, 2, false);
ChooseOption('ope');
end;
end;

procedure NextObstacle;
var x, y: integer;
begin
if FindObj(x, y, 'ope', 1785912, 35) then
begin
Mouse(x, y, 2, 2, false);
ChooseOption('ope');
end;
if not FindObj(x, y, 'ope', 1785912, 35) then RopeSwing;
end;

begin
RopeSwing
NextObstacle;
end.

This is assuming you can immediately try the rope swing again, not having climb up something. (I don't know what happens when you fail)

John

2011-12-25 20:05:21

From: Griff
procedure RopeSwing;
var x, y: integer;
begin
if FindObj(x, y, 'ope', 1785912, 35) then
begin
Mouse(x, y, 2, 2, false);
ChooseOption('ope');
end;
end;

procedure NextObstacle;
var x, y: integer;
begin
if FindObj(x, y, 'ope', 1785912, 35) then
begin
Mouse(x, y, 2, 2, false);
ChooseOption('ope');
end;
if not FindObj(x, y, 'ope', 1785912, 35) then RopeSwing;
end;

begin
RopeSwing
NextObstacle;
end.

This is assuming you can immediately try the rope swing again, not having climb up something. (I don't know what happens when you fail)


When you fail you fall into a pit underrond you have to go back up the ladder in the pit then , walk back to the ropeswing.

John

2011-12-25 21:15:05

keep getting this: [Error] (87:6): Identifier expected at line 86
Compiling failed.
Line 86 is the end.

cause

2011-12-25 21:20:20

So then you will have to create a FindObj for the ladder.
EDIT: post your code

John

2011-12-25 21:22:02

From: cause
So then you will have to create a FindObj for the ladder.
EDIT: post your code


i did but now there is an error, (look above your last post.)

lilcmp1

2011-12-25 21:23:13

From: Evlin
keep getting this: [Error] (87:6): Identifier expected at line 86
Compiling failed.
Line 86 is the end.


See if adding a semicolon after ropeswing helps

John

2011-12-25 21:23:33

From: Evlin
i did but now there is an error, (look above your last post.)

Code requested. IGNORE THE MOUSECLICKS< MOUSE MOVE ECT,ect
program Agilitycourse;
{$i srl/srl.scar}

Procedure DeclarePlayers;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

Players[0].Name := ''
Players[0].Pass := '';
Players[0].Nick := '';
Players[0].Active:=True;
end;

procedure Course;
begin;
MoveMouse ( 255, 165);
ClickMouse (255, 233, 1);
Wait (5999);
MoveMouse (228, 302);
ClickMouse (255, 302, 1);
Wait (12500);
MoveMouse (142, 168);
ClickMouse (130, 163, 1);
Wait (5000);
MoveMouse (195, 139);
ClickMouse (195, 139, 1);
Wait (10000);
MoveMouse (256, 203);
ClickMouse (256, 203, 1);
Wait (4000);
MoveMouse (312, 19);
ClickMouse (312, 19, 1);
Wait (7000);
MoveMouse (386, 94);
ClickMouse (386, 94, 1);
Wait (7250);
MoveMouse (435, 168);
ClickMouse (435, 168, 1);
Wait (7000);
MoveMouse (456, 148);
ClickMouse (456, 148, 1);
Wait (4000);
MoveMouse (372, 202);
ClickMouse (372, 202, 1);
Wait (4000);

end;
procedure RopeSwing;
var x, y: integer;
begin
if FindObj(x, y, 'ope', 272431, 10) then
begin
Mouse(x, y, 2, 2, false);
ChooseOption('ope');
end;
end;

procedure NextObstacle;
var x, y: integer;
begin
if FindObj(x, y, 'bal', 2042174, 15) then
begin
Mouse(x, y, 2, 2, false);
ChooseOption('bal');
end;
if not FindObj(x, y, 'Lad', 4477785, 15) then RopeSwing;

end;
procedure NetClimb;
var x, y: integer;
begin
if FindObj(x, y, 'tac', 3626091, 15) then
begin
Mouse(x, y, 2, 2, false);
ChooseOption('tac');
end;
begin
SetUpSRL;
ActivateClient;
DeclarePlayers;
RopeSwing;
NextObstacle;
NetClimb;
end.

lilcmp1

2011-12-25 21:26:35

Looks like you need one more "end;" for the procedure NetClimb

John

2011-12-25 21:34:18

From: lilcmp1
Looks like you need one more "end;" for the procedure NetClimb


worked but now the mouse is going every where.

Griff

2011-12-25 21:35:42

Yeah you need the other end. And just a few other things: First, you should use proper standards, you can learn them here

Next, remember that you need to use not the first letter for the thing that you are finding. So instead of Lad, use adder.

If you need to climb back up, instead of
 if not FindObj(x, y, 'Lad', 4477785, 15) then RopeSwing;

Go
 if not FindObj(x, y, 'Lad', 4477785, 15) then Climb;

And you will need to make a "Climb" procedure.

John

2011-12-25 21:51:43

From: Griff
Yeah you need the other end. And just a few other things: First, you should use proper standards, you can learn them here

Next, remember that you need to use not the first letter for the thing that you are finding. So instead of Lad, use adder.

If you need to climb back up, instead of
 if not FindObj(x, y, 'Lad', 4477785, 15) then RopeSwing;

Go
 if not FindObj(x, y, 'Lad', 4477785, 15) then Climb;

And you will need to make a "Climb" procedure.


would it still work how i have it? plus do you have msn? can we talk over it?