SRL Archive - First Scripts

Need help with this Script please! Noob Here!


mikeym

2012-01-10 21:39:32

Here is my script I want it just to click on an arrowshaft but having trouble compiling it. Thanks everyone!


program FriendlyFletcher ;
{$DEFINE SMART}
{$DEFINE CRASHSMART}
{$i SRL\SRL.scar}
{$i SPS\SPS.simba}

const
S_World = 65;
S_Signed = True;
S_Member = True;
Version = '1.00';
SRLstats_Username = ''
SRLstats_Password = ''
BreakEvery = '';// How long until you break
BreakFor = '';// How long the break is
NumberOfPlayers = 1;// Number of players you are using
StartPlayer = 0
-------------------------------------------------------------
procedure DeclarePlayer;
begin
with Players[0] do
begin
Name := ''; //USERNAME
Pass := ''; //PASSWORD
Pin := ''; //PIN (if any)
Active := True;
BoxRewards := ['xp'];
LampSkill := 'fletching'; // or change to whatever skill exp you want
end;
----------------------------------------------------------------------------
end;

Function AddFeathers;

var
ArrowShaft: Integer;


Begin

SetupSRL;

ArrowShaft := DTMFromString('m6wAAAHic42ZgYOAFYkkGCOAGYgEg5gJiMSBmAmIRIBYCYj6oOANUTAJKs0PFuaFqYMBRlRNqAmFsxEA8YCQBIwEAMF0B1w==');

If FindDTM (ArrowShaft, X, Y, MIX1, MIY1, MIX2, MIY2)
Begin
WriteLn('Found Object');
MMouse(X, Y, 7, 7);
If IsUpText ('rrow') Then
Mouse (X, Y, 0, 0, True);
End;


FreeDTM;(ArrowShaft)

kevin33

2012-01-10 21:40:34

Put Simba tags around it please. Also what does the debug say when you compile? What line?

mikeym

2012-01-10 21:46:26

I am so new I don't know how to add them and can U compile it yourself because I fixed a few that can but if sure there is going to be more but this lines 13 and 18 need work.

mikeym

2012-01-10 21:48:53

I also showed the tags I have

kevin33

2012-01-10 21:50:20

From: mikeym
I am so new I don't know how to add them and can U compile it yourself because I fixed a few that can but if sure there is going to be more but this lines 13 and 18 need work.


Will do. Also for simba quotes highlight your script and click (while under advance post) the lion next to the banana icon at the top. Then just Save and it will update. As soon as you do it let me know and I will try to compile. Makes it easier for me to copy and paste.

mikeym

2012-01-10 21:54:41

program FriendlyFletcher ;
{$DEFINE SMART}
{$DEFINE CRASHSMART}
{$i SRL\SRL.scar}
{$i SPS\SPS.simba}

const
S_World = 65;
S_Signed = True;
S_Member = True;
Version = '1.00';
SRLstats_Username = ''
SRLstats_Password = ''
BreakEvery = '';// How long until you break
BreakFor = '';// How long the break is
NumberOfPlayers = 1;// Number of players you are using
StartPlayer = 0
procedure DeclarePlayer;
begin
with Players[0] do
begin
Name := ''; //USERNAME
Pass := ''; //PASSWORD
Pin := ''; //PIN (if any)
Active := True;
BoxRewards := ['xp'];
LampSkill := 'fletching'; // or change to whatever skill exp you want
end;
end;

Function AddFeathers;

var
ArrowShaft: Integer;


Begin

SetupSRL;

ArrowShaft := DTMFromString('m6wAAAHic42ZgYOAFYkkGCOAGYgEg5gJiMSBmAmIRIBYCYj6oOANUTAJKs0PFuaFqYMBRlRNqAmFsxEA8YCQBIwEAMF0B1w==');

If FindDTM (ArrowShaft, X, Y, MIX1, MIY1, MIX2, MIY2)
Begin
WriteLn('Found Object');
MMouse(X, Y, 7, 7);
If IsUpText ('rrow') Then
Mouse (X, Y, 0, 0, True);
End;


FreeDTM;(ArrowShaft)

kevin33

2012-01-10 21:56:40

Lol not the banana the lion here Ill do it for you below:


program FriendlyFletcher ;
{$DEFINE SMART}
{$DEFINE CRASHSMART}
{$i SRL\SRL.scar}
{$i SPS\SPS.simba}

const
S_World = 65;
S_Signed = True;
S_Member = True;
Version = '1.00';
SRLstats_Username = ''
SRLstats_Password = ''
BreakEvery = '';// How long until you break
BreakFor = '';// How long the break is
NumberOfPlayers = 1;// Number of players you are using
StartPlayer = 0
procedure DeclarePlayer;
begin
with Players[0] do
begin
Name := ''; //USERNAME
Pass := ''; //PASSWORD
Pin := ''; //PIN (if any)
Active := True;
BoxRewards := ['xp'];
LampSkill := 'fletching'; // or change to whatever skill exp you want
end;
end;

Function AddFeathers;

var
ArrowShaft: Integer;


Begin

SetupSRL;

ArrowShaft := DTMFromString('m6wAAAHic42ZgYOAFYkkGCOAGYgEg5gJiMSBmAmIRIBYCYj6oOANUTAJKs0PFuaFqYMBRlRNqAmFsxEA8YCQBIwEAMF0B1w==');

If FindDTM (ArrowShaft, X, Y, MIX1, MIY1, MIX2, MIY2)
Begin
WriteLn('Found Object');
MMouse(X, Y, 7, 7);
If IsUpText ('rrow') Then
Mouse (X, Y, 0, 0, True);
End;


FreeDTM;(ArrowShaft)

mikeym

2012-01-10 21:59:13

Ik i changed it like 2 seconds after I reread your reply haha! sorry for inconvenience.

kevin33

2012-01-10 22:13:41

From: mikeym
Ik i changed it like 2 seconds after I reread your reply haha! sorry for inconvenience.


Sorry for taking so long and no inconvenience lol. Is this the whole script because there is still things you need to add. The ending you have FreeDTM is to be called in your main loop at the end of your script where you recite all your procedures and things like that so I cant do anything with that. Heres what I got so far for you:

program FriendlyFletcher ;
{$DEFINE SMART}
{$DEFINE CRASHSMART}
{$i SRL\SRL.scar}
{$i SPS\SPS.simba}

const
S_World = 65;
S_Signed = True;
S_Member = True;
Version = '1.00';
SRLstats_Username = '';
SRLstats_Password = '';
BreakEvery = '';// How long until you break
BreakFor = '';// How long the break is

procedure DeclarePlayer;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name := ''; //USERNAME
Pass := ''; //PASSWORD
Pin := ''; //PIN (if any)
Active := True;
BoxRewards := ['xp'];
LampSkill := 'fletching'; // or change to whatever skill exp you want
end;
end;

procedure AddFeathers;

var
ArrowShaft: Integer;
x, y: Integer;
Begin
SetupSRL;
ArrowShaft := DTMFromString('m6wAAAHic42ZgYOAFYkkGCOAGYgEg5gJiMSBmAmIRIBYCYj6oOANUTAJKs0PFuaFqYMBRlRNqAmFsxEA8YCQBIwEAMF0B1w==');
If FindDTM (ArrowShaft, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
WriteLn('Found Object');
MMouse(X, Y, 7, 7);
If IsUpText ('rrow') Then
Mouse (X, Y, 0, 0, True);
End;
FreeDTM;(ArrowShaft)

mikeym

2012-01-10 22:21:31

Ok thanks so much and Thats not the script lol I still need it to click feathers, then when done with x amount of feathers, switch to x amount of arrowtips…can U explain or give me a few lines on how I would tell it to THEN click on feathers, I would be able to do the third part. And nbd about time just watching scripting tuts haha.

mikeym

2012-01-10 22:27:09

Actualy then take headless arrows, then add the arrowtips to the headless arrows

kevin33

2012-01-10 22:28:55

Ok well there are different ways. For clicking…when in simba go to the function list and click mouse then scroll down the different functions to figure out the method you need most. You should firstly make a method of the mouse moving to the feathers such as using MMouse (if it still is usable in SRL5 which I am not quite sure about I think it may have changed) function which also can be found in function box on left side of Simba. You could use a DTM if you wanted it to be more advanced but that is up to you. Let me know if that helps or if you need anything else.

mikeym

2012-01-10 22:33:42

Okay thanks but i am saying how would I link my two clicks? like would would i put right after the script u just edited?

kevin33

2012-01-10 22:44:03

From: mikeym
Okay thanks but i am saying how would I link my two clicks? like would would i put right after the script u just edited?


Well yea you would take out freeDTMs and use it later, make a new function for move mouse to whatever you need. After you would need to make another function for clicking and anything else you need to add like antiban or whatever you feel.
You put it in the order it operates so from what it does first to what it does last so add feathers if its your first thing, will begin the process, next you need the mouse to move to the arrows, click next, then continue with that. That help?

mikeym

2012-01-10 23:01:46

ok but there is an error at line 0 can u check it out for me?……also how would I make a click to chose option "Headless arrow (set of 15)" actually in rs when u add arrowshafts to feathers. Should I use color finder to set a coordinate?



program FriendlyFletcher ;
{$DEFINE SMART}
{$DEFINE CRASHSMART}
{$i SRL\SRL.scar}
{$i SPS\SPS.simba}

const
S_World = 65;
S_Signed = True;
S_Member = True;
Version = '1.00';
SRLstats_Username = '';
SRLstats_Password = '';
BreakEvery = '';// How long until you break
BreakFor = '';// How long the break is

procedure DeclarePlayer;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name := ''; //USERNAME
Pass := ''; //PASSWORD
Pin := ''; //PIN (if any)
Active := True;
BoxRewards := ['xp'];
LampSkill := 'fletching'; // or change to whatever skill exp you want
end;
end;

procedure AddFeathers;

var
Feather: Integer;
ArrowShaft: Integer;
x, y: Integer;
Begin
SetupSRL;
ArrowShaft := DTMFromString('m6wAAAHic42ZgYOAFYkkGCOAGYgEg5gJiMSBmAmIRIBYCYj6oOANUTAJKs0PFuaFqYMBRlRNqAmFsxEA8YCQBIwEAMF0B1w==');
If FindDTM (ArrowShaft, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
WriteLn('Found ArrowShaft');
MMouse(X, Y, 7, 7);
If IsUpText ('rrow') then
Mouse (X, Y, 0, 0, True);
End;

Begin
Feather := DTMFromString('mwQAAAHic42RgYBBggABmIOYGYiEglgBiWSgWh4rLQ+VAfDEg5gViNqheRiBet3w5kGTCi+UYCANGIjAcAACoeQNT');
If FindDTM (Feather, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
WriteLn('Found Feathers')
MMouse(X, Y, 7, 7);
If IsUpText ('eather') then
Mouse (X, Y, 0, 0, True);
End;

kevin33

2012-01-10 23:08:37

Ok heres what Ive fixed for you to make it work.
Also reason your getting error line 0 is because you have not ended script. Once completed the script you have to end it with
end.
. You will get that error but just know if you get it youre doing everything right.

program FriendlyFletcher ;
{$DEFINE SMART}
{$DEFINE CRASHSMART}
{$i SRL\SRL.scar}
{$i SPS\SPS.simba}

const
S_World = 65;
S_Signed = True;
S_Member = True;
Version = '1.00';
SRLstats_Username = '';
SRLstats_Password = '';
BreakEvery = '';// How long until you break
BreakFor = '';// How long the break is

procedure DeclarePlayer;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name := ''; //USERNAME
Pass := ''; //PASSWORD
Pin := ''; //PIN (if any)
Active := True;
BoxRewards := ['xp'];
LampSkill := 'fletching'; // or change to whatever skill exp you want
end;
end;

procedure AddFeathers;

var
ArrowShaft: Integer;
x, y: Integer;
Feather: Integer;
Begin
SetupSRL;
ArrowShaft := DTMFromString('m6wAAAHic42ZgYOAFYkkGCOAGYgEg5gJiMSBmAmIRIBYCYj6oOANUTAJKs0PFuaFqYMBRlRNqAmFsxEA8YCQBIwEAMF0B1w==');
If FindDTM (ArrowShaft, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
WriteLn('Found Object');
MMouse(X, Y, 7, 7);
If IsUpText ('rrow') Then
Mouse (X, Y, 0, 0, True);
End;
Begin
Feather := DTMFromString('mwQAAAHic42RgYBBggABmIOYGYiEglgBiWSgWh4rLQ+VAfDEg5gViNqheRiBet3w5kGTCi+UYCANGIjAcAACoeQNT');
If FindDTM (Feather, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
WriteLn('Found Feathers')
MMouse(X, Y, 7, 7);
If IsUpText ('eather') then
Mouse (X, Y, 0, 0, True);
end;
end;

mikeym

2012-01-10 23:11:17

woot haha thanks alot im gona work on my next click lol i seem so noobish. so much work for one click…oh well its work the experience.

mikeym

2012-01-10 23:13:35

But btw it still has an error at line 0 even with ur edit of "end"

kevin33

2012-01-10 23:14:11

From: mikeym
woot haha thanks alot im gona work on my next click lol i seem so noobish. so much work for one click…oh well its work the experience.


That it is. No problem happy to help. I am making a script also I just hit a wall as it doesnt work like it is supposed to so I am awaiting help. I like to help because it helps me learn also. Good luck making it and feel free to ask more questions if you need help.
You need an end. You need an period "." at the end I will take a look.

mikeym

2012-01-10 23:21:43

ok thanks once more haha and is there a way to look up functions like mouse move, mouse click, etc?

kevin33

2012-01-10 23:29:35

From: mikeym
ok thanks once more haha and is there a way to look up functions like mouse move, mouse click, etc?


Yea when you have simba open the box on the left is the function box. At the bottom type in what you are looking for and a bunch of solutions will appear. Choose the one you need. Also I dont know why it says error at line 0. It wont fix for me either. You can worry about that later though I will look into it more.

mikeym

2012-01-10 23:32:47

OK thanks last thing for tonight… when finding a location for MouseMove using these coordinates how do u set this up for the script.

235,440
235,415
275,415
275,440

Thanks a lot dude u r a life saver.

kevin33

2012-01-10 23:38:16

From: mikeym
OK thanks last thing for tonight… when finding a location for MouseMove using these coordinates how do u set this up for the script.

235,440
235,415
275,415
275,440

Thanks a lot dude u r a life saver.


For the line 0 thing it is all about the end with the period after you call your main loop.
I will look into that I have never used coordinates before.

kevin33

2012-01-10 23:45:58

Ok for choosing something from the menu look into the functions. In the function search box type in choose. Double click chooseoption. Look for the one you need. They are different types of choosing an option from the popup menu. That is your best bet I think. Take a look and give one of them a try.

loser69

2012-01-10 23:49:13

program FriendlyFletcher ;
{$DEFINE SMART}
{$DEFINE CRASHSMART}
{$i SRL\SRL.scar}
{$i SPS\SPS.simba}

const
S_World = 65;
S_Signed = True;
S_Member = True;
Version = '1.00';
SRLstats_Username = '';
SRLstats_Password = '';
BreakEvery = '';// How long until you break
BreakFor = '';// How long the break is

procedure DeclarePlayer;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name := ''; //USERNAME
Pass := ''; //PASSWORD
Pin := ''; //PIN (if any)
Active := True;
BoxRewards := ['xp'];
LampSkill := 'fletching'; // or change to whatever skill exp you want
end;
end;

procedure AddFeathers;

var
ArrowShaft: Integer;
x, y: Integer;
Begin
SetupSRL;
ArrowShaft := DTMFromString('m6wAAAHic42ZgYOAFYkkGCOAGYgEg5gJiMSBmAmIRIBYCYj6oOANUTAJKs0PFuaFqYMBRlRNqAmFsxEA8YCQBIwEAMF0B1w==');
If FindDTM (ArrowShaft, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
WriteLn('Found Object');
MMouse(X, Y, 7, 7);
If IsUpText ('rrow') Then
Mouse (X, Y, 0, 0, True);

FreeDTM(ArrowShaft)
end;
End;


begin
SetUpSRL;
DeclarePlayer;
LogInPlayer;

repeat
AddFeathers
until(false)
end.



this should work.

mikeym

2012-01-10 23:50:12

okay thank you for the thousandth time ur a great help much appreciated!

kevin33

2012-01-10 23:51:19

From: loser69
this should work.


Thanks. We were trying to figure that out. We will be adding more functions and procedures so more will be added to that loop but otherwise it will work.
@Mike I assume you found one you are using? And its not a problem lol. I do it to learn, help and to look good lol jks. Feel free to keep asking and I will do my best. Its hard for me to help cuz Im f2p and most scripts requiring work and help are p2p and so I cant test or actually see what the problem is in game.

mikeym

2012-01-11 00:53:13

program FriendlyFletcher ;
{$DEFINE SMART}
{$DEFINE CRASHSMART}
{$i SRL\SRL.scar}
{$i SPS\SPS.simba}

const
S_World = 65;
S_Signed = True;
S_Member = True;
Version = '1.00';
SRLstats_Username = '';
SRLstats_Password = '';
BreakEvery = '';// How long until you break
BreakFor = '';// How long the break is

procedure DeclarePlayer;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name := ''; //USERNAME
Pass := ''; //PASSWORD
Pin := ''; //PIN (if any)
Active := True;
BoxRewards := ['xp'];
LampSkill := 'fletching'; // or change to whatever skill exp you want
end;
end;

procedure ArrowCreation;

var
ArrowShaft: Integer;
x, y: Integer;
Feather: Integer;
HeadlessArrow: Integer;
Arrowtips: Integer;
Begin
SetupSRL;
ArrowShaft := DTMFromString('m6wAAAHic42ZgYOAFYkkGCOAGYgEg5gJiMSBmAmIRIBYCYj6oOANUTAJKs0PFuaFqYMBRlRNqAmFsxEA8YCQBIwEAMF0B1w==');
If FindDTM (ArrowShaft, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
WriteLn('Found Object');
MMouse(X, Y, 7, 7);
If IsUpText ('rrow') Then
Mouse (X, Y, 0, 0, True);
End;
Begin
Feather := DTMFromString('mwQAAAHic42RgYBBggABmIOYGYiEglgBiWSgWh4rLQ+VAfDEg5gViNqheRiBet3w5kGTCi+UYCANGIjAcAACoeQNT');
If FindDTM (Feather, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
WriteLn('Found Feathers')
MMouse(X, Y, 7, 7);
If IsUpText ('eather') then
Mouse (X, Y, 0, 0, True);
wait (11 + Random (1));
end;
function ChooseOption(Txt: String): Boolean;
begin
Result := ChooseOptionMultiEx([Txt], 'eadless', ClickLeft);
end;
Begin
HeadlessArrow := DTMFromString('mkwEAAHicrc5JCoAwDIXhVIsTDljHIngx738P/8JbuHDZwEehSR5ZzKxHpzeVg0eFgEG9E5uk/4gdJUZcmHCov2LWbqO5lFuj1Wz4ZHhlR93xhLRZZHFbvnIZ/dQLS2oC3Q==');
If FindDTM (HeadlessArrow, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
WriteLn('Found HeadlessArrows')
MMouse(X, Y, 7, 7);
If IsUpText ('eadless') then
Mouse (X, Y, 0, 0, True);
end;
Begin
HeadlessArrow := DTMFromString('mVAEAAHicpc1JCoAwEETRjuKEiHFYuFDvEvD+V9LfUCC4NAUvUKHTiWbWY7U3BWp02HDiwK7uswsiBgTt8JR6W6FRD+qt5vx+xIwJV0r69Z+bM0fI9M0DeUASZg==');
If FindDTM (HeadlessArrow, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
WriteLn('Found HeadlessArrow')
MMouse(X, Y, 7, 7);
If IsUpText ('eadless','rrow') then
Mouse (X, Y, 0, 0, True);
end;
Begin
Arrowtips := DTMFromString('mVAEAAHicpc1JCoAwEETRjuKEiHFYuFDvEvD+V9LfUCC4NAUvUKHTiWbWY7U3BWp02HDiwK7uswsiBgTt8JR6W6FRD+qt5vx+xIwJV0r69Z+bM0fI9M0DeUASZg==');
If FindDTM (Feather, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
WriteLn('Found Arrowtips')
MMouse(X, Y, 7, 7);
If IsUpText ('rrowtips') then
Mouse (X, Y, 0, 0, True);
end;
function ChooseOption(Txt: String): Boolean;
begin
Result := ChooseOptionMultiEx([Txt], 'rrow', ClickLeft);
wait (11 + Random (1));

FreeDTM(ArrowShaft)
end;
End;

begin
SetUpSRL;
DeclarePlayer;
LogInPlayer;

repeat
ArrowCreation
until(false)
end.

kevin33

2012-01-11 08:19:56

From: mikeym
program FriendlyFletcher ;
{$DEFINE SMART}
{$DEFINE CRASHSMART}
{$i SRL\SRL.scar}
{$i SPS\SPS.simba}

const
S_World = 65;
S_Signed = True;
S_Member = True;
Version = '1.00';
SRLstats_Username = '';
SRLstats_Password = '';
BreakEvery = '';// How long until you break
BreakFor = '';// How long the break is

procedure DeclarePlayer;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name := ''; //USERNAME
Pass := ''; //PASSWORD
Pin := ''; //PIN (if any)
Active := True;
BoxRewards := ['xp'];
LampSkill := 'fletching'; // or change to whatever skill exp you want
end;
end;

procedure ArrowCreation;

var
ArrowShaft: Integer;
x, y: Integer;
Feather: Integer;
HeadlessArrow: Integer;
Arrowtips: Integer;
Begin
SetupSRL;
ArrowShaft := DTMFromString('m6wAAAHic42ZgYOAFYkkGCOAGYgEg5gJiMSBmAmIRIBYCYj6oOANUTAJKs0PFuaFqYMBRlRNqAmFsxEA8YCQBIwEAMF0B1w==');
If FindDTM (ArrowShaft, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
WriteLn('Found Object');
MMouse(X, Y, 7, 7);
If IsUpText ('rrow') Then
Mouse (X, Y, 0, 0, True);
End;
Begin
Feather := DTMFromString('mwQAAAHic42RgYBBggABmIOYGYiEglgBiWSgWh4rLQ+VAfDEg5gViNqheRiBet3w5kGTCi+UYCANGIjAcAACoeQNT');
If FindDTM (Feather, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
WriteLn('Found Feathers')
MMouse(X, Y, 7, 7);
If IsUpText ('eather') then
Mouse (X, Y, 0, 0, True);
wait (11 + Random (1));
end;
function ChooseOption(Txt: String): Boolean;
begin
Result := ChooseOptionMultiEx([Txt], 'eadless', ClickLeft);
end;
Begin
HeadlessArrow := DTMFromString('mkwEAAHicrc5JCoAwDIXhVIsTDljHIngx738P/8JbuHDZwEehSR5ZzKxHpzeVg0eFgEG9E5uk/4gdJUZcmHCov2LWbqO5lFuj1Wz4ZHhlR93xhLRZZHFbvnIZ/dQLS2oC3Q==');
If FindDTM (HeadlessArrow, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
WriteLn('Found HeadlessArrows')
MMouse(X, Y, 7, 7);
If IsUpText ('eadless') then
Mouse (X, Y, 0, 0, True);
end;
Begin
HeadlessArrow := DTMFromString('mVAEAAHicpc1JCoAwEETRjuKEiHFYuFDvEvD+V9LfUCC4NAUvUKHTiWbWY7U3BWp02HDiwK7uswsiBgTt8JR6W6FRD+qt5vx+xIwJV0r69Z+bM0fI9M0DeUASZg==');
If FindDTM (HeadlessArrow, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
WriteLn('Found HeadlessArrow')
MMouse(X, Y, 7, 7);
If IsUpText ('eadless','rrow') then
Mouse (X, Y, 0, 0, True);
end;
Begin
Arrowtips := DTMFromString('mVAEAAHicpc1JCoAwEETRjuKEiHFYuFDvEvD+V9LfUCC4NAUvUKHTiWbWY7U3BWp02HDiwK7uswsiBgTt8JR6W6FRD+qt5vx+xIwJV0r69Z+bM0fI9M0DeUASZg==');
If FindDTM (Feather, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
WriteLn('Found Arrowtips')
MMouse(X, Y, 7, 7);
If IsUpText ('rrowtips') then
Mouse (X, Y, 0, 0, True);
end;
function ChooseOption(Txt: String): Boolean;
begin
Result := ChooseOptionMultiEx([Txt], 'rrow', ClickLeft);
wait (11 + Random (1));

FreeDTM(ArrowShaft)
end;
End;

begin
SetUpSRL;
DeclarePlayer;
LogInPlayer;

repeat
ArrowCreation
until(false)
end.


After school I will take a look for sure!

mikeym

2012-01-11 15:44:22

sounds good but i also want it to repeat one step at a time for x amount of times do u know how i can do that?

kevin33

2012-01-11 15:51:43

From: mikeym
sounds good but i also want it to repeat one step at a time for x amount of times do u know how i can do that?


About to try it out to fix. Also for the repeat you make a repeat…until kinda thing and set a constant for how many to do so you can use it as your x amount.

mikeym

2012-01-11 15:57:26

Ok can u show me that line in simba with an example if repeat 1000x just so I can see it thanks

cause

2012-01-11 16:26:31

Nice work guys, mikeym are you wondering about loops?
http://villavu.com/forum/showthread.php?t=54339 is a great tut on loops

var
x, y, COUNTER: integer;
begin
repeat
if (CurrentOre.ID >= STEEL) and (CurrentOre.ID <= ADDY) then
if not FindDTM(CoalDTM, x, y, 386, 86, 430, 125) then
begin
inc(COUNTER);
wait(100 + Random(100));
end;
if COUNTER>5 then
begin
GameTab(tab_Inv);
wait(100 + Random(100));
end
else
begin
Break;
end;
until(COUNTER>10);
if COUNTER >= 10 then
begin
QuitPlayer('Out of coal');
Exit;
end;
end;
this is a bit of code from marpis's autoheater, I added the loop to it.

mikeym

2012-01-11 16:41:12

Thanks! no i was going to do loops but then I decided its more humanlike and faster to do one item at a time. You know… I would like to put feathers on the arrowshafts at x amounts, then put arrowtips onto the headless arrows at x amount, then script shuts off

kevin33

2012-01-11 16:43:13

From: mikeym
Thanks! no i was going to do loops but then I decided its more humanlike and faster to do one item at a time. You know… I would like to put feathers on the arrowshafts at x amounts, then put arrowtips onto the headless arrows at x amount, then script shuts off


I will help after I get the problem I have compiling your script looked at. I dont know how to fix it so I pmed someone who can help.

mikeym

2012-01-11 16:51:11

Ok thanks alot! Looking forward to seeing whats up.

kevin33

2012-01-11 17:36:07

Alright I think hes coming here to help you a little better using posts. Its easier then pming him a bunch.

Kyle Undefined

2012-01-11 17:40:43

Update to SRL5. Change "{$i srl/srl.scar}" to "{$i srl/srl.simba}". Then, for all of your "Mouse" procedures, need to change the True/False parameters to "mouse_Left" or "mouse_Right".

mikeym

2012-01-11 18:19:12

Exact error:[Error] (61:2): Identifier expected at line 60
Compiling failed.


program FriendlyFletcher ;
{$DEFINE SMART}
{$DEFINE CRASHSMART}
{$i srl/srl.simba}
{$i SPS\SPS.simba}

const
S_World = 65;
S_Signed = True;
S_Member = True;
Version = '1.00';
SRLstats_Username = '';
SRLstats_Password = '';
BreakEvery = '';// How long until you break
BreakFor = '';// How long the break is

procedure DeclarePlayer;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name := ''; //USERNAME
Pass := ''; //PASSWORD
Pin := ''; //PIN (if any)
Active := True;
end;
end;

procedure ArrowCreation;

var
ArrowShaft: Integer;
x, y: Integer;
Feather: Integer;
HeadlessArrow: Integer;
Arrowtips: Integer;
Begin
SetupSRL;
ArrowShaft := DTMFromString('m6wAAAHic42ZgYOAFYkkGCOAGYgEg5gJiMSBmAmIRIBYCYj6oOANUTAJKs0PFuaFqYMBRlRNqAmFsxEA8YCQBIwEAMF0B1w==');
If FindDTM (ArrowShaft, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
WriteLn('Found Object');
MMouse(X, Y, 7, 7);
If IsUpText ('rrow') Then
Mouse (X, Y, 0, 0, True);
End;
Begin
Feather := DTMFromString('mwQAAAHic42RgYBBggABmIOYGYiEglgBiWSgWh4rLQ+VAfDEg5gViNqheRiBet3w5kGTCi+UYCANGIjAcAACoeQNT');
If FindDTM (Feather, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
WriteLn('Found Feathers')
MMouse(X, Y, 7, 7);
If IsUpText ('eather') then
Mouse (X, Y, 0, 0, True);
wait (11 + Random (1));
end;
function ChooseOption(Txt: String): Boolean;
begin
Result := ChooseOptionMultiEx([Txt], 'eadless', ClickLeft);
end;
Begin
HeadlessArrow := DTMFromString('mkwEAAHicrc5JCoAwDIXhVIsTDljHIngx738P/8JbuHDZwEehSR5ZzKxHpzeVg0eFgEG9E5uk/4gdJUZcmHCov2LWbqO5lFuj1Wz4ZHhlR93xhLRZZHFbvnIZ/dQLS2oC3Q==');
If FindDTM (HeadlessArrow, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
WriteLn('Found HeadlessArrows')
MMouse(X, Y, 7, 7);
If IsUpText ('eadless') then
Mouse (X, Y, 0, 0, True);
end;
Begin
HeadlessArrow := DTMFromString('mVAEAAHicpc1JCoAwEETRjuKEiHFYuFDvEvD+V9LfUCC4NAUvUKHTiWbWY7U3BWp02HDiwK7uswsiBgTt8JR6W6FRD+qt5vx+xIwJV0r69Z+bM0fI9M0DeUASZg==');
If FindDTM (HeadlessArrow, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
WriteLn('Found HeadlessArrow')
MMouse(X, Y, 7, 7);
If IsUpText ('eadless','rrow') then
Mouse (X, Y, 0, 0, True);
end;
Begin
Arrowtips := DTMFromString('mVAEAAHicpc1JCoAwEETRjuKEiHFYuFDvEvD+V9LfUCC4NAUvUKHTiWbWY7U3BWp02HDiwK7uswsiBgTt8JR6W6FRD+qt5vx+xIwJV0r69Z+bM0fI9M0DeUASZg==');
If FindDTM (Feather, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
WriteLn('Found Arrowtips')
MMouse(X, Y, 7, 7);
If IsUpText ('rrowtips') then
Mouse (X, Y, 0, 0, True);
end;
function ChooseOption(Txt: String): Boolean;
begin
Result := ChooseOptionMultiEx([Txt], 'rrow', ClickLeft);
wait (11 + Random (1));

FreeDTM(ArrowShaft)
end;
End;

begin
SetUpSRL;
DeclarePlayer;
LogInPlayer;

repeat
ArrowCreation
until(false)
end.

mikeym

2012-01-11 18:22:36

and for mouse movements like MMouse those do not need true/false right?

Kyle Undefined

2012-01-11 18:37:02

This compiles.


program FriendlyFletcher ;
{$DEFINE SMART}
{$DEFINE CRASHSMART}
{$i srl/srl.simba}
{$i SPS\SPS.simba}

const
S_World = 65;
S_Signed = True;
S_Member = True;
Version = '1.00';
SRLstats_Username = '';
SRLstats_Password = '';
BreakEvery = '';// How long until you break
BreakFor = '';// How long the break is

procedure DeclarePlayer;
begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;

with Players[0] do
begin
Name := ''; //USERNAME
Pass := ''; //PASSWORD
Pin := ''; //PIN (if any)
Active := True;
end;
end;

procedure ArrowCreation;
var
x, y, ArrowShaft, Feather, HeadlessArrow, Arrowtips : Integer;
Begin
ArrowShaft := DTMFromString('m6wAAAHic42ZgYOAFYkkGCOAGYgEg5gJiMSBmAmIRIBYCYj6oOANUTAJKs0PFuaFqYMBRlRNqAmFsxEA8YCQBIwEAMF0B1w==');
If FindDTM (ArrowShaft, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
WriteLn('Found Object');
MMouse(X, Y, 7, 7);
If IsUpText ('rrow') Then
Mouse (X, Y, 0, 0, mouse_Left);
End;

Feather := DTMFromString('mwQAAAHic42RgYBBggABmIOYGYiEglgBiWSgWh4rLQ+VAfDEg5gViNqheRiBet3w5kGTCi+UYCANGIjAcAACoeQNT');
If FindDTM (Feather, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
WriteLn('Found Feathers')
MMouse(X, Y, 7, 7);
If IsUpText ('eather') then
Mouse (X, Y, 0, 0, mouse_Left);
wait (11 + Random (1));
end;

HeadlessArrow := DTMFromString('mkwEAAHicrc5JCoAwDIXhVIsTDljHIngx738P/8JbuHDZwEehSR5ZzKxHpzeVg0eFgEG9E5uk/4gdJUZcmHCov2LWbqO5lFuj1Wz4ZHhlR93xhLRZZHFbvnIZ/dQLS2oC3Q==');
If FindDTM (HeadlessArrow, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
WriteLn('Found HeadlessArrows')
MMouse(X, Y, 7, 7);
If IsUpText ('eadless') then
Mouse (X, Y, 0, 0, mouse_Left);
end;

HeadlessArrow := DTMFromString('mVAEAAHicpc1JCoAwEETRjuKEiHFYuFDvEvD+V9LfUCC4NAUvUKHTiWbWY7U3BWp02HDiwK7uswsiBgTt8JR6W6FRD+qt5vx+xIwJV0r69Z+bM0fI9M0DeUASZg==');
If FindDTM (HeadlessArrow, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
WriteLn('Found HeadlessArrow')
MMouse(X, Y, 7, 7);
If IsUpTextMultiCustom (['eadless','rrow']) then
Mouse (X, Y, 0, 0, mouse_Left);
end;

Arrowtips := DTMFromString('mVAEAAHicpc1JCoAwEETRjuKEiHFYuFDvEvD+V9LfUCC4NAUvUKHTiWbWY7U3BWp02HDiwK7uswsiBgTt8JR6W6FRD+qt5vx+xIwJV0r69Z+bM0fI9M0DeUASZg==');
If FindDTM (Feather, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
WriteLn('Found Arrowtips')
MMouse(X, Y, 7, 7);
If IsUpText ('rrowtips') then
Mouse (X, Y, 0, 0, mouse_Left);
end;

FreeDTM(ArrowShaft);
FreeDTM(Arrowtips);
FreeDTM(Feather);
FreeDTM(HeadlessArrow);
End;

begin
SetUpSRL;
DeclarePlayer;
LogInPlayer;

repeat
ArrowCreation;
until(false);
end.

mikeym

2012-01-11 18:39:13

thanks can i ask you what you did and if you took out anything?

Kyle Undefined

2012-01-11 18:42:24

  • You don't need to define "ChooseOption" as a function since that's already included in SRL, so I took those out.
  • I made all the Mouse methods use "mouse_Left" per SRL5.
  • I made sure everything had a ";" where applicable.
  • I added FreeDTM()'s at the end of your procedure.
  • Just cleaned up the standards

mikeym

2012-01-11 18:43:12

 HeadlessArrow := DTMFromString('mVAEAAHicpc1JCoAwEETRjuKEiHFYuFDvEvD+V9LfUCC4NAUvUKHTiWbWY7U3BWp02HDiwK7uswsiBgTt8JR6W6FRD+qt5vx+xIwJV0r69Z+bM0fI9M0DeUASZg==');
If FindDTM (HeadlessArrow, X, Y, MIX1, MIY1, MIX2, MIY2) then
begin
WriteLn('Found HeadlessArrow')
MMouse(X, Y, 7, 7);
If IsUpTextMultiCustom (['eadless','rrow']) then
Mouse (X, Y, 0, 0, mouse_Left);
end;

and you took out my choose option like make headless arrow

^^ we posted at the same time sorry and thanks for explaining!

mikeym

2012-01-11 18:48:13

when I start it said members false? I have it as true?

mikeym

2012-01-11 18:58:00

also I tried to run it it finds the feathers good but has trouble with the arroqshafts can some1 experienced try it out the members thing isnt a huge deal atm.

Kyle Undefined

2012-01-11 19:02:48

Add:

Smart_Server := S_World;
Smart_Members := S_Members;
Smart_Signed := S_Signed;

Right above the "SetupSRL;"

mikeym

2012-01-11 19:06:25

Thanks do you think you can test it out, or contact some1 because i am not sure whats it wrong thanks.

This is a arrow maker it should go from arrowshafts,to feathers, then headless arrows to arrowtips.

Thanks

mikeym

2012-01-11 19:08:47

 S_World = 65;
S_Signed = True;
S_Member = True;

kevin33

2012-01-11 21:08:46

From: mikeym
 S_World = 65;
S_Signed = True;
S_Member = True;


Yes it should. I would love to test but no membership here so it is not possible I'm f2p only. Sorry bout before I'm sick at the moment so I needed a break.

mikeym

2012-01-12 21:18:35

its okay do u know why it isn't doing the right thing by just looking at it?

kevin33

2012-01-13 16:06:37

From: mikeym
its okay do u know why it isn't doing the right thing by just looking at it?


No I have no idea sorry. Testing would be much more useful because then you will know where you went wrong.

mikeym

2012-01-13 16:39:47

Do u know any1 that can test this then :/

kevin33

2012-01-13 16:43:18

From: mikeym
Do u know any1 that can test this then :/


Sadly no. Anyone in this community really can. Ask some of the active people. Or make a new thread asking for a few testers. I can ask a few people maybe but no promises.

mikeym

2012-01-13 21:01:43

ok thanks