SRL Archive - First Scripts

How Is This (My Second Script)


souppy

2007-12-06 17:16:46

Hello, I have just created my second script.

It is an auto hunter.


//This is my second script ever
//It will trap birds in the Jungle Hunting Are
//This hunt area is South of Feldip Hills
//Start the script in the area where the "Tropical Wagtails" are flying

program hunting;
{.include SRL/SRL.scar}
var
x,y:integer;
s:integer;
t:integer;
d:integer;

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

Players[0].Name := 'username';
Players[0].Pass := 'password';
Players[0].Nick := 'nickname'; //3 letter from your username, No spaces
Players[0].Active :=True;

Players[1].Name := 'username';
Players[1].Pass := 'password';
Players[1].Nick := 'nickname'; //3 letter from your username, No spaces
Players[1].Active :=False;

NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
end;

procedure clicktrap;
begin
s:=0;
while(s<20)do
begin
s:=s+1;
if FindColorTolerance5(x,y,6130254) then
begin
MMouse(x,y,2,2)
wait(500)
if(IsUpText('snare'))then
begin
s:=21;
Mouse(x,y,2,2,true)
wait(5500)
FindNormalRandoms;
end;
end;
end;
end;

procedure waittrap;
begin
Mouse(149, 253,1,1,true)
wait(600)
flag;
wait(600)
MMouse(382, 101,0,0)
wait(500+random200)
if IsUpText('3 more options')then
begin
repeat
FindNormalRandoms;
wait(3000)
until(IsUpText('2 more options'))
begin
GetMousePos(x,y)
Mouse(x,y,2,2,true)
wait(3500)
Mouse(290,170,2,2,true)
flag;
wait(2000)
end;
end;
end;

procedure DropItems;
begin
d:=0
begin
while(d<27)do
begin
d:=d+1
if FindColorTolerance5(x,y,8816809,787,14813360) then
begin
MMouse(x,y,2,2)
if(IsUpText('bird meat'))then
begin
FindNormalRandoms;
Mouse(x,y,2,2,false)
ChooseOption('Drop')
end;
end;
end;
end;
end;

procedure main;
begin
t:=0
begin
while(t<5)do
begin
t:=t+1
clicktrap;
waittrap;
end;
end;
end;

procedure report;
begin
WriteLn('Welcome to Souppy''s Hunter')
WriteLn('So far you have:')
WriteLn('Attempted to trap '+IntToStr(t)+ ' birds')
WriteLn('and worked for ' + TimeRunning)
SRLRandomsReport;
wait(357)
SendSRLReport;
end;

Could someone test it for me ?

Can't Open Scar right now, and I had it saved somewhere where I cannot open it to test it.

[S]paz

2007-12-06 17:18:37

ermm is it members cos if is then i have no idea if it works or not :p lol wat does it do ??

~Spaz

souppy

2007-12-06 17:39:42

Yes, it is members.

It trains the "hunting" skill for you.

Martin

2007-12-06 17:55:01

procedure report;
begin
WriteLn('Welcome to Souppy''s Hunter')
WriteLn('So far you have:')
WriteLn('Attempted to trap '+IntToStr(t)+ ' birds')
WriteLn('and worked for ' + TimeRunning)
SRLRandomsReport;
wait(357)
SendSRLReport;
end;

:rolleyes:

souppy

2007-12-06 18:31:33

Yes, Martin ?

ss23

2007-12-06 19:05:32

He is saying you missed out a '. Change it to the one he edited it or it wont work ;)

souppy

2007-12-06 19:07:20

Ah, Thanks ss.

Didn't notice that :eek:

mod cheater

2007-12-06 19:37:23

ok i guess
it is sort of out of line though don't u think:google: :google: :google: :google:

souppy

2007-12-06 19:39:19

What exactly do you mean by "out of line"?

NotQuitE30

2007-12-06 19:43:03

From: souppy
What exactly do you mean by "out of line"?


Well, members rarely use scripts, since they dont want to lose thier accounts and such, so the chances of someone trying your script is slim. I give you credit for making it, but personally wouldnt lose my account over it :)

souppy

2007-12-06 19:44:35

Ah, Thanks for interpreting what he meant for me ;)


I do see your point on the whole members thing though.

Pierre14

2007-12-06 21:06:49

it looks like a Nice script for members hope to get a chance to try it!:D

XRaye

2007-12-06 22:43:59

that seems pretty good, but i agree, not many members would want to use autoers if they're going to make it their main, if they made a member for auto flax picking that would be different.

sum41rocks

2007-12-29 04:56:17

umm what exactly is this script hunting?
might test it out a few times


sum 41 fan

superbatman

2009-01-14 21:10:15

From: souppy
Hello, I have just created my second script.

It is an auto hunter.


//This is my second script ever
//It will trap birds in the Jungle Hunting Are
//This hunt area is South of Feldip Hills
//Start the script in the area where the "Tropical Wagtails" are flying

program hunting;
{.include SRL/SRL.scar}
var
x,y:integer;
s:integer;
t:integer;
d:integer;

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

Players[0].Name := 'username';
Players[0].Pass := 'password';
Players[0].Nick := 'nickname'; //3 letter from your username, No spaces
Players[0].Active :=True;

Players[1].Name := 'username';
Players[1].Pass := 'password';
Players[1].Nick := 'nickname'; //3 letter from your username, No spaces
Players[1].Active :=False;

NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
end;

procedure clicktrap;
begin
s:=0;
while(s<20)do
begin
s:=s+1;
if FindColorTolerance5(x,y,6130254) then
begin
MMouse(x,y,2,2)
wait(500)
if(IsUpText('snare'))then
begin
s:=21;
Mouse(x,y,2,2,true)
wait(5500)
FindNormalRandoms;
end;
end;
end;
end;

procedure waittrap;
begin
Mouse(149, 253,1,1,true)
wait(600)
flag;
wait(600)
MMouse(382, 101,0,0)
wait(500+random200)
if IsUpText('3 more options')then
begin
repeat
FindNormalRandoms;
wait(3000)
until(IsUpText('2 more options'))
begin
GetMousePos(x,y)
Mouse(x,y,2,2,true)
wait(3500)
Mouse(290,170,2,2,true)
flag;
wait(2000)
end;
end;
end;

procedure DropItems;
begin
d:=0
begin
while(d<27)do
begin
d:=d+1
if FindColorTolerance5(x,y,8816809,787,14813360) then
begin
MMouse(x,y,2,2)
if(IsUpText('bird meat'))then
begin
FindNormalRandoms;
Mouse(x,y,2,2,false)
ChooseOption('Drop')
end;
end;
end;
end;
end;

procedure main;
begin
t:=0
begin
while(t<5)do
begin
t:=t+1
clicktrap;
waittrap;
end;
end;
end;

procedure report;
begin
WriteLn('Welcome to Souppy''s Hunter')
WriteLn('So far you have:')
WriteLn('Attempted to trap '+IntToStr(t)+ ' birds')
WriteLn('and worked for ' + TimeRunning)
SRLRandomsReport;
wait(357)
SendSRLReport;
end;

Could someone test it for me ?

Can't Open Scar right now, and I had it saved somewhere where I cannot open it to test it.


Lolz, ok, first off im going to state that im not very good at scar at all, but when i looked at your code i saw alot of errors, just looking at it, not even compiling:
x,y:integer;
s:integer;
t:integer;
d:integer;

This isnt that much of an error, but you could just do this:

x,y,s,t,d:integer;
I compiled it and right away:

NumberOfPlayers(HowManyPlayers);1

Compiler returns 'identifier expected in script'

Fixed that to:
NumberOfPlayers(HowManyPlayers):=1

There are many more Errors in the script,
FindColorTolerance5
Should be FindColorTolerance(x,y,color,xs,ys,xe,ye,tolerance);

Also, you use alot of Mouse WIth the coords put in, it might work for yuo, but not for alot of others. you should Use Findcolortolerance to find the color of where you want to click then use mouse(x,y,1,1,true);

You dont even have a mainloop. I dunno why everyone else is complimenting you, but i didnt find that very good at all, to be quite honest.

PS: Also your spacing is all wrong.

I really think that post By XOXOXOXO cant be true, casue this looks beyond repair to me….

Tniffoc

2009-01-14 21:33:04

I don't mean to be harsh, but I would suggest reading some tutorials and then starting all over again. I could tell you all the things wrong with the script, but that would take a while. I appreciate your eagerness to learn instead of just l33ching though. Good luck learning how to script!

ian.

2009-01-15 01:57:07

:p

can't believe nobody noticed that you didn't setupsrl :o

it won't work unless you setupsrl in the ml..

and theres some other stuff to change, but I think it was already said..

oh.. you need to add randomness to your waits, and you never call your DeclarePlayers or WaitTrap procs :o

superbatman

2009-01-15 16:33:55

We didnt point that out cause he doesnt even have a mianloop =p.

Tickyy

2009-01-15 19:22:22

Last Post : 12-29-2007, 04:56 AM

Congratulations superbatman, you just made a Grave dig… but this gave me an idea to make a hunter script :p :D

ian.

2009-01-15 21:14:32

o.o

just noticed.. thought it said 12-29-2008

>.>

Drew Bledsoe

2009-01-18 16:04:15

hey looks good ill try it out now

Baked0420

2009-01-18 16:13:56

do you even read posts? this script has way to many errors to work, and it does not have a main loop, that is what actually tells the script to do those procedures and functions you make, w/o a main loop the script will do nothing, actually, it won't even compile. Please don't spam and read some posts before you post/use a script (that won't even work).

Lvl6

2009-01-21 06:02:47

I'm not a member :(