View Full Version : My high and low alcher, I need some help plz.
Buckleyindahouse
12-03-2006, 02:58 PM
Ok, i finished my first script which was just a high alcher i would like to attempt to make a high and low alcher. also how do u make it stop alching when the item u alch is all gone?
here is the script help me out on improving it and stuff.
program autoalcher;
{.include srl/SRL.scar}
{.include srl/srl/core/antirandoms.scar}
const
highalch=true //true for high alch false for low alch
procedure Declareplayers;
begin
HowManyPlayers:=1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:=0;
Players[0].Name :='USERNAME HERE' //PlayerName
Players[0].Pass :='PASSWORD HERE' //Password
Players[0].Nick :='NICK NAME HERE' //Players nick name( a few letters from playername)
Players[0].Loc :=''; //leave this alone
Players[0].Active:=True;// Leave this alone 2
NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
end;
procedure alch;
begin
if(highalch = true)then begin
highalch;
or
if(highalch = False)then begin
lowalch;
end;
procedure highalch;
begin
mouse(711,372,5,5,true)
randoms;
wait(2000+random(500));
mouse(711,372,5,5,true)
randoms;
end;
procedure settab;
begin
gametab(7)
randoms;
end;
procedure lowalch;
begin
mouse(708,294,5,5,true)
randoms;
wait(2000+random(500));
randoms;
mouse(708,294,5,5,true)
end;
procedure randoms;
begin
FindNormalRandoms;
if(FindFight)then begin
RunAwayDirection('N');
wait(10000+random(5000));
RunBack;
end;
procedure main;
SetupSRL;
Declareplayers;
settab;
randoms;
repeat
if(highalch=true)then highalch;
if(highalch-false)then lowalch;
end.
Wrycu
12-03-2006, 03:37 PM
Add in a loop statement.
Hey321
12-03-2006, 03:40 PM
You also need to put the Randoms; procedure BEFORE anything you call it in, or you'll get problems.
XcanadamanX
12-03-2006, 04:30 PM
also your main loop is only a procedure in what is shown.
change form this...
procedure main;
SetupSRL;
Declareplayers;
settab;
randoms;
repeat if(highalch=true)then highalch;
if(highalch-false)then lowalch;
end.
to this...
Begin
SetupSRL;
Declareplayers;
settab;
randoms;
repeat if(highalch=true)then highalch;
if(highalch=false)then lowalch;
end.
also add a loop(think it was already said) right now u have a repeat but u dont have an until(blah) so put an until(blah) after if(highalch=false)then lowalch;
P.S. dont use blah. u have to use like until not(findcolortol(x,y,345345,1,1))
Buckleyindahouse
12-03-2006, 05:12 PM
ok dokie thank you for yall help once again.
<edit> Now its getting me this error
Failed when compiling
Line 31: [Error] (15529:1): Semicolon (';') expected in script C:\Program Files\SCAR 2.03\Scripts\joshs first auto high and low alcher.scar
how can i fix this 1?
Hey321
12-03-2006, 05:21 PM
Put a semicolon at the end of it :).
Buckleyindahouse
12-03-2006, 05:29 PM
this is line 31 where it says procedure, there is already a colon there
procedure Declareplayers;
begin
HowManyPlayers:=1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:=0;
Players[0].Name :='USERNAME HERE' //PlayerName
Players[0].Pass :='PASSWORD HERE' //Password
Players[0].Nick :='NICK NAME HERE' //Players nick name( a few letters from playername)
Players[0].Loc :=''; //leave this alone
Players[0].Active:=True;// Leave this alone 2
NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
end;
XcanadamanX
12-03-2006, 06:42 PM
what is the line before it?
Hey321
12-03-2006, 08:49 PM
procedure Declareplayers;
begin
HowManyPlayers:=1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:=0;
Players[0].Name :='USERNAME HERE'; //PlayerName
Players[0].Pass :='PASSWORD HERE'; //Password
Players[0].Nick :='NICK NAME HERE';//Players nick name( a few letters from playername)
Players[0].Loc :=''; //leave this alone
Players[0].Active:=True;// Leave this alone 2
NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
Use that.
end;
Boreas
12-03-2006, 08:53 PM
multiplayer with player form template
( you need to do when currentplayer=howmanyplayers, currentplayer:=0 to make it loop around the cycle again)
Buckleyindahouse
12-03-2006, 09:03 PM
I am still getting that error:
Failed when compiling
Line 31: [Error] (15529:1): Semicolon (';') expected
its happens on the declare players procedure here is full script:
program autoalcher;
{.include srl/SRL.scar}
const
highalch=true //true for high alch false for low alch
procedure Declareplayers;
begin
HowManyPlayers:=1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:=0;
Players[0].Name :='USERNAME HERE'; //PlayerName
Players[0].Pass :='PASSWORD HERE'; //Password
Players[0].Nick :='NICK NAME HERE';//Players nick name( a few letters from playername)
Players[0].Loc :=''; //leave this alone
Players[0].Active:=True;// Leave this alone 2
NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
end;
///////////////////////*************DONT TOUCH BELOW********\\\\\\\\\\\\\\\\\\\\
procedure randoms;
begin
FindNormalRandoms;
if(FindFight)then begin
RunAwayDirection('N');
wait(10000+random(5000));
RunBack;
end;
procedure alch;
begin
if(highalch = true)then begin
highalch;
or
if(highalch = False)then begin
lowalch;
end;
procedure highalch;
begin
mouse(711,372,5,5,true)
randoms;
wait(2000+random(500));
mouse(711,372,5,5,true)
randoms;
end;
procedure settab;
begin
gametab(7)
randoms;
end;
procedure lowalch;
begin
mouse(708,294,5,5,true)
randoms;
wait(2000+random(500));
randoms;
mouse(708,294,5,5,true)
end;
//////*******************Main Loop********************\\\\\\\\\\\\\\\\\\\\\\\\\\
procedure main;
Begin
SetupSRL;
Declareplayers;
settab;
randoms;
repeat if(highalch=true)then highalch;
if(highalch=false)then lowalch;
end.
Hey321
12-03-2006, 09:51 PM
You dont have a semicolon after something. Go through and put it after EVERYTHING besides Begins
Hey321
12-03-2006, 10:41 PM
Ok, well since im tired of answering questions i went in and fixed it! It works now:
program autoalcher;
{.include srl/SRL.scar}
const
highalcher=true; //true for high alch false for low alch
procedure Declareplayers;
begin
HowManyPlayers:=1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer:=0;
Players[0].Name :='USERNAME HERE'; //PlayerName
Players[0].Pass :='PASSWORD HERE'; //Password
Players[0].Nick :='NICK NAME HERE';//Players nick name( a few letters from playername)
Players[0].Loc :=''; //leave this alone
Players[0].Active:=True;// Leave this alone 2
NickNameBMP := CreateBitmapMaskFromText(Players[CurrentPlayer].Nick, UpChars);
end; ///////////////////////*************DONT TOUCH BELOW********\\\\\\\\\\\\\\\\\\\\
procedure randoms;
begin
FindNormalRandoms;
if(FindFight)then begin
RunAwayDirection('N');
wait(10000+random(5000));
RunBack;
end;
end;
procedure highalch;
begin
mouse(711,372,5,5,true)
randoms;
wait(2000+random(500));
mouse(711,372,5,5,true)
randoms;
end;
procedure lowalch;
begin
mouse(708,294,5,5,true)
randoms;
wait(2000+random(500));
randoms;
mouse(708,294,5,5,true) end;
procedure alch;
begin
if(highalcher)then
highalch;
if(highalcher=false)then
lowalch;
end;
procedure settab;
begin
gametab(7)
randoms;
end;
//////*******************Main Loop********************\\\\\\\\\\\\\\\\\\\\\\\\\\
Begin
SetupSRL;
Declareplayers;
settab;
randoms;
repeat
if(highalcher=true)then
highalch;
if(highalcher=false)then
lowalch;
until(false);
end.
XcanadamanX
12-03-2006, 11:01 PM
i just looked at it again...wow that was simple...i shouldve knew that, ive fixed that so many times in my own script.
edit: i just noticed that u basically have the same thing in a procedure and the main loop.
Begin
SetupSRL;
Declareplayers;
settab;
randoms;
repeat
if(highalcher=true)then
highalch;
if(highalcher=false)then
lowalch;
until(false);
end.
and then this...
procedure alch;
begin
if(highalcher)then
highalch;
if(highalcher=false)then
lowalch;
end;
just take out if(highalcher=true)then
highalch;
if(highalcher=false)then
lowalch;
from the main loop and put alch; instead
Buckleyindahouse
12-04-2006, 02:06 AM
wow thank you so much folks
Choroid
11-08-2008, 08:03 PM
cool whats best thing to alch
Sandstorm
11-08-2008, 08:14 PM
Wow, crazy gravedig. I remember this post to. Rofl.
12-03-2006, 07:06 PM
Buckleyindahouse
11-08-2008, 10:53 PM
Wow, crazy gravedig. I remember this post to. Rofl.
12-03-2006, 07:06 PM
Yea back in my noob days, Hopefully a mod can delete that noob's grave dig post.
Sandstorm
11-08-2008, 10:55 PM
Hell, this was back before I knew cases xD.
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.