SRL Archive - SRL Site Discussion

A thread dissapeared with a nice script


bod1977

2006-12-18 18:56:09

on it. Lol the guy said post your best script you have made, and he had posted an excellent battling script. I am guessing he just took it from someone and reposted it because people seemed to recognize it. Either way I happened to snatch it while it was up (it seems to have been deleted). Anyways the login is kinda messed up, it doesn't seem to log in correctly. It never actually "types" in your name and password. Everything else works great though. :-p Although I am trying to start writing scripts, I can't quite figure out what "this one" is lacking to log in properly. Any tips would be nice.
I kinda sorta added in my info and think I may have changed something I shouldnt have. :duh:. I am not a leecher, I am trying to learn scripting, please don't chastise me and ban me. Lol I do have an interest in this.

I put the things I changed in caps, :( please fill me in. Thankyou.

//+++++++++++++++Anti-Randoms+++++++++++++++
procedure LoginIfNeeded;//A king tut procedure based of many others
var counter:integer;
begin
if(length(username) > 0)and(length(password) > 0)then
begin
if(IsTextAt2(293,251,'I CHANGED THIS',0))and(NotLogedIn)then
Mouse(460,322,10,2,true);
if(IsTextAt2(309,241,'Welcome to RuneScape',0))and(NotLogedIn)then
begin
Mouse(400,280,125,20,true);
if(IsTextAt2(271,214,I CHANGED THIS,50))then
begin
Mouse(400,256,20,5,true);
SendKeysSilentsmooth(username,50);
Mouse(400,270,20,5,true);
SendKeysSilentsmooth(password,50);
Mouse(300,322,20,5,true);
repeat
counter:=counter+1;
wait(100);
until(FindColor(x,y,8421504,0,0,515,338))or(counter=60)
end;
end;
if(FindColor(x,y,8421504,400,0,515,338))then
begin
Mouse(x+5,y+1,15,5,true);
sendarrowsilentwait(0,900+random(200))
wait(200+random(100));
SetFightMode(FightMode);
end;
end;
end;

I Karma I

2006-12-18 20:01:24

Did you set Username and Password?

bod1977

2006-12-18 21:17:41

I did. o_O

//+++++++++++++++Setup+++++++++++++++
Username:='i filled this'; //Set Username
Password:='I also filled this'; //Set Password
color1:=2576236; //Monster Color 1
color2:=2840438; //Monster Color 2
tol:=0; //Tolerance to find the monster color. 0 is default
FightMode:=4; //Set fight mode 1-4 top to bottom
EatFood:=false; //True to eat food, false to not
FoodInvColor:=937341; //Set the color of the food in your invin
CriticalHP:=5; //Percent of HP left when you should run
RunWhere:='n'; //Set Which way to run if fight random occurs
Timeout:=45; //The maximum time (in seconds) a fight should last (will run if lasts longer)
LFTimeout:=3; //The maximum time (in min) between fights
BoneCollecting:=false; //Set True to collect bones, Fasle to not
BoneColor:=12303300; //Set BoneColor on Screen
Report:=10; //Set how often to print progress report (in minutes)

end; //End of Setup

//+++++++++++++++Anti-Randoms+++++++++++++++
procedure LoginIfNeeded;//A king tut procedure based of many others
var counter:integer;
begin
if(length(username) > 0)and(length(password) > 0)then
begin
if(IsTextAt2(293,251,'Username',0))and(NotLogedIn)then
Mouse(460,322,10,2,true);
if(IsTextAt2(309,241,'Welcome to RuneScape',0))and(NotLogedIn)then
begin
Mouse(400,280,125,20,true);
if(IsTextAt2(271,214,'Enter your username',50))then
begin
Mouse(400,256,20,5,true);
SendKeysSilentsmooth(username,50);
Mouse(400,270,20,5,true);
SendKeysSilentsmooth(password,50);
Mouse(300,322,20,5,true);
repeat
counter:=counter+1;
wait(100);
until(FindColor(x,y,8421504,0,0,515,338))or(counter=60)
end;
end;
if(FindColor(x,y,8421504,400,0,515,338))then
begin
Mouse(x+5,y+1,15,5,true);
sendarrowsilentwait(0,900+random(200))
wait(200+random(100));
SetFightMode(FightMode);
end;
end;
end;

:-/

I Karma I

2006-12-18 22:21:40

Log in first, then try it.

bod1977

2006-12-19 18:02:42

From: Kaldo
Log in first, then try it.


Well uh, ya that is how I have gotten it to work. It gets 2 cows a minute, for the most part. It works so well, it just doesn't RElogin or LOGIN on its own. I don't mind logging it in, that isn't an issue, but the relogging in is. I don't sit around watching scripts and it frequently logs itself out.

I Karma I

2006-12-19 18:12:02

Get the GoblinScheduler, it rules.